[R-sig-ME] Plot a "mer" object

Luciano La Sala lucianolasala at yahoo.com.ar
Sat Jul 31 00:01:02 CEST 2010


Hello all,  

Sorry to re-post, but I got no response from the list and I am still
struggling with this. 
 
I fitted a glmm on a small dataset using lme4. Data consist of dependent
variable "Egg_Volume" (continuous) and independent variables "Hatching
Order" (3 factors: first, second, third), "Year" (2 factors: 2006, 2007) and
their interaction (Hatching_Order*Year). Nest IDs were included as random
intercepts. 

Model output: 

> model.2 <- lmer(EggVolume~HatchOrder*Year+(1|NestID),REML=FALSE)

Linear mixed model fit by maximum likelihood 
Formula: EggVolume ~ HatchOrder * Year + (1 | NestID) 
   AIC   BIC logLik deviance REMLdev
 745.4 768.4 -364.7    729.4   720.4

Random effects:
 Groups   Name        Variance Std.Dev.
 NestID   (Intercept) 25.272   5.0271  
 Residual              5.930   2.4352  
Number of obs: 130, groups: NestID, 55

Fixed effects:
                          Estimate Std. Error t value
(Intercept)                79.6515     1.1092   71.81
HatchOrderSecond           -0.5676     0.7714   -0.74
HatchOrderThird            -4.7545     0.8817   -5.39
Year2007                    3.6288     1.5408    2.36
HatchOrderSecond:Year2007  -2.8466     1.0600   -2.69
HatchOrderThird:Year2007   -2.8900     1.1946   -2.42

Correlation of Fixed Effects:
            (Intr) HtchOS HtchOT Yr2007 HOS:Y2
HtchOrdrScn -0.267                            
HtchOrdrThr -0.221  0.367                     
Year2007    -0.720  0.192  0.159              
HtcOS:Y2007  0.195 -0.728 -0.267 -0.294       
HtcOT:Y2007  0.163 -0.271 -0.738 -0.297  0.404

I've been trying to come to grips with the function "plotLMER.fnc" from
"languageR" package to plot my results, but so far I have not succeeded. 

>From the relevant documentation
(http://bm2.genes.nig.ac.jp/RGM2/R_current/library/languageR/man/plotLMER.fn
c.html) there are some arguments which I am not sure how to specify
(indicated with "???" below).  

plotLMER.fnc(mixto.4a, xlabel = NA, xlabs = "Year", ylabel = "Egg Volume",
ylimit = NA, fun = NA, pred = NA, n = ????, intr = ????, "end", mcmcMat =
NA, lockYlim = TRUE, addlines = TRUE, withList = FALSE, cexsize = 0.5)

Could someone help me out with this? If there is a better and simpler way of
plotting this kind of models, I'd like to know it. I am quite new to R and
its language. 

I'd be thrilled if there were a better, more straightforward way of plotting
my results (considering the RE and interaction term). 

Thanks in advance! 

LFLS




More information about the R-sig-mixed-models mailing list