Hi,
this is not a new doubt, but is a doubt that I cant find a good response.
Look this output:
m.lme <- lme(Yvar~Xvar,random=~1|Plot1/Plot2/Plot3)
numDF denDF F-value p-value
(Intercept) 1 860 210.2457 <.0001
Xvar 1 2 1.2352 0.3821
Linear mixed-effects model fit by REML
Data: NULL
AIC BIC logLik
5416.59 5445.256 -2702.295
Random effects:
Formula: ~1 | Plot1
(Intercept)
StdDev: 0.000745924
Formula: ~1 | Plot2 %in% Plot1
(Intercept)
StdDev: 0.000158718
Formula: ~1 | Plot3 %in% Plot2 %in% Plot1
(Intercept) Residual
StdDev: 0.000196583 5.216954
Fixed effects: Yvar ~ Xvar
Value Std.Error DF t-value p-value
(Intercept) 2.3545454 0.2487091 860 9.467066 0.0000
XvarFactor2 0.3909091 0.3517278 2 1.111397 0.3821
Number of Observations: 880
Number of Groups:
Plot1 Plot2 %in% Plot1
4 8
Plot3 %in% Plot2 %in% Plot1
20
This is the correct result, de correct denDF for Xvar.
I make this using lmer.
m.lmer <- lmer(Yvar~Xvar+(1|Plot1)+(1|Plot1:Plot2)+(1|Plot3))
anova(m.lmer)
Analysis of Variance Table
Df Sum Sq Mean Sq Denom F value Pr(>F)
Xvar 1 33.62 33.62 878.00 1.2352 0.2667
Linear mixed-effects model fit by REML
Formula: Yvar ~ Xvar + (1 | Plot1) + (1 | Plot1:Plot2) + (1 | Plot3)
AIC BIC logLik MLdeviance REMLdeviance
5416.59 5445.27 -2702.295 5402.698 5404.59
Random effects:
Groups Name Variance Std.Dev.
Plot3 (Intercept) 1.3608e-08 0.00011665
Plot1:Plot2 (Intercept) 1.3608e-08 0.00011665
Plot1 (Intercept) 1.3608e-08 0.00011665
Residual 2.7217e+01 5.21695390
# of obs: 880, groups: Plot3, 20; Plot1:Plot2, 8; Plot1, 4
Fixed effects:
Estimate Std. Error DF t value Pr(>|t|)
(Intercept) 2.35455 0.24871 878 9.4671 <2e-16 ***
XvarFactor2 0.39091 0.35173 878 1.1114 0.2667
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Look the wrong P value, I know that it is wrong because the DF used. But, In
this case, the result is not correct. Dont have any difference of the result
using random effects with lmer and using a simple analyses with lm.