[R-sig-ME] lmer model specification
jude girard
jude.girard at gmail.com
Wed Nov 30 21:22:14 CET 2011
Hi,
I am hoping the list can help me ensure that I am specifying my model
correctly.
In my study, we compared invertebrate biomass in paired organic and
conventional fields. I had 9 conventional and 9 organic fields, for a
total of 18. Each field was sampled in May and in July. At each
sampling time, two transects, each of 4 traps, were placed in each
field.
My fixed effects are management type and month (I expect invertebrate
abundance to be higher in July than in May), and the interaction
between them. At first I specified my random effects as
pair/month/transect. However, when I run this model
model.edge<-lmer(biomass~management*month+(1|pair/month/transect), data=edge)
summary(model.edge)
Linear mixed model fit by REML
Formula: biomass ~ management + month + (1 | pair/month/transect)
Data: edge
AIC BIC logLik deviance REMLdev
535.8 559.8 -260.9 513.4 521.8
Random effects:
Groups Name Variance Std.Dev.
transect:(month:pair) (Intercept) 0.071400 0.26721
month:pair (Intercept) 0.000000 0.00000
pair (Intercept) 0.018794 0.13709
Residual 0.491406 0.70100
Number of obs: 230, groups: transect:(month:pair), 36; month:pair, 18; pair, 9
Fixed effects:
Estimate Std. Error t value
(Intercept) -1.84429 0.11147 -16.545
managementorg 0.29042 0.09474 3.065
monthR2 0.45889 0.12924 3.551
Correlation of Fixed Effects:
(Intr) mngmnt
managemntrg -0.399
monthR2 -0.571 -0.022
the variance for month:pair is 0, which I think might be because the
month is already specified in the fixed effects? So, now I am
wondering if a better way to run the model might be
model2.edge<-lmer(biomass~management*month+(1|pair/transect.unique),
data=edge) where is transect is treated as a unique level,
irrespective of which month it was run in?
When I run the second model I get
summary(model2.edge)
Linear mixed model fit by REML
Formula: biomass ~ management * month + (1 | pair/transect.unique)
Data: edge
AIC BIC logLik deviance REMLdev
524.2 548.3 -255.1 501.7 510.2
Random effects:
Groups Name Variance Std.Dev.
transect.unique:pair (Intercept) 0.17567 0.41913
pair (Intercept) 0.01887 0.13737
Residual 0.39778 0.63070
Number of obs: 230, groups: transect.unique:pair, 70; pair, 9
Fixed effects:
Estimate Std. Error t value
(Intercept) -1.8028 0.1374 -13.122
managementorg 0.1665 0.1866 0.892
monthR2 0.3745 0.1842 2.033
managementorg:monthR2 0.1866 0.2645 0.705
Correlation of Fixed Effects:
(Intr) mngmnt mnthR2
managemntrg -0.655
monthR2 -0.663 0.488
mngmntrg:R2 0.461 -0.704 -0.697
I'd appreciate if anyone could give me some insight on this
Thanks, Jude Girard
More information about the R-sig-mixed-models
mailing list