regression - Discrepancies between lmerTest and lme4 results -
i have value dv (dependent variable), , interested in effect of bmi on dv. have multiple observations dv (i.e., every subject responds 5 times), wanted fit mixed model (for repeated measures of each id).
so did was:
use bodo winters tutorial - compute difference between complicated , simpler model.
use
lmertest
now, results different, , cannot figure out why.
m1 <- lmer(value ~ bmi + dummy + (1|id), data=data) m2 <- lmer( value ~ bmi + (1|id), data=data) anova(m1, m2)
here, results highly significant
require(lmertest) m3<-lmer(value ~ bmi + (1|id), data=data) anova(m3)
here, results not significant @ all. sorry, cannot provide reproducible example, discrepancy happens bmi effect, not other effects of interest. wonder: why have suggestions, somewhere maybe made mistake?
here output get
> m1 <- lmer(value ~ bmi + (1|id), data=data, reml=false) > m2 <- lmer(value ~ 1 + (1|id), data=data, reml=false) > anova(m1, m2) data: data models: ..1:value ~ 1 + (1 | id) object: value ~ bmi + (1 | id) df aic bic loglik deviance chisq chi df pr(>chisq) ..1 3 2188.1 2201.0 -1091.1 2182.1 object 4 2149.4 2166.6 -1070.7 2141.4 40.687 1 1.787e-10 *** --- signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
and
anova(lmer(value ~ bmi + (1|id), data=data, reml=false)) analysis of variance table of type 3 satterthwaite approximation degrees of freedom sum sq mean sq numdf dendf f.value pr(>f) bmi 0.17868 0.17868 1 110 0.059873 0.8072
it seems me considering wrong models lr tets. testing bmi :
m1 <- lmer(value ~ bmi + (1|id), data=data)
m2 <- lmer( value ~ 1 + (1|id), data=data)
anova(m1, m2)
Comments
Post a Comment