[R-sig-ME] interpretation of predict plot (glmer)
Ben Bolker
bbolker at gmail.com
Sun Feb 2 17:34:57 CET 2014
As you can see, these kinds of e-mails to me personally often slip
through the cracks. It's quite a bit better to send them to
r-sig-mixed-models at r-project.org, where someone else might answer them,
and where the answers
On 14-01-16 09:42 AM, Barbara horta e costa wrote:
> Dear Ben Bolker,
> I'd like to ask you one question about a result I am obtaining, if it's
> possible for you. Thanks so much in advance.
>
> I have run the following functions glmer and predict:
>
> mF2<- glmer(CapturasTotaisInOutMenosRej_g ~ CovosTotalInOut_amostrados +
> Season3 + (1 | VesselCode),family=Gamma(link=log),dataCovosOctopus)
>
> newdata2 <- with(dataCovosOctopus, data.frame
> (CovosTotalInOut_amostrados=seq (10, 1000, length.out= 1000),
> Season3=rep (c("Sp", "SAW"), 500),VesselCode=rep(c("SB-1281-L",
> "SB-1287-L", "SB-1308-L", "SB-1324-L"),250)))
>
> p4 <- predict(mF2,newdata2,type="response",REform=~(1|VesselCode))
>
> Am I doing right? Is this newdata2 ok?
Well, I don't know; it seems reasonable, except that (1) you might
want to have values of your continuous predictor repeated for all the
factor combinations and (2) 1000 values of your continuous predictor
might be overkill. I like to use expand.grid for this, e.g.
newdat2 <- with(dataCovosOctopus,
expand.grid(CovosTotalInOut_amostrados=seq(10, 1000, length.out=101),
Season3=levels(Season3),
VesselCode=levels(VesselCode)))
>
> And I run the following plot. I'd like to correctly interpret the plot,
> that has 3 response curves.
> Inline images 2
>
>
> How can I interpret this plot?
Don't quite know what to say about this. It looks like there are a
bunch of overlapping values along the lower curve, so perhaps you have
two 'outlier' random effects? Don't know why one can't easily see the
response. I often use ggplot to add distinctions among random effect
levels and fixed effects.
> I run the same predict but selecting the option REform=NA, and the
> subsequent plot only has 2 responses so I'm thinking one curve one is
> due to the random effect. But how can I explain the different responses
> and to which predictors should I relate with?
Again hard to say.
>
> Thanks a lot for your help,
> Best,
> Barbara
>
>
> --
> Bárbara H. Costa
> Marine Biologist Researcher
> Sciaena - Marine Sciences and Cooperation
> www.sciaena.org <http://www.sciaena.org/>
>
> CCMAR | http://www.ccmar.ualg.pt <http://www.ccmar.ualg.pt/biomares/>
> ISPA | http://www.ispa.pt/ui/uie/index.asp
> BIOMARES | http://www.ccmar.ualg.pt/biomares/
> MSI-UCSB | http://www.msi.ucsb.edu/
>
More information about the R-sig-mixed-models
mailing list