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:

  1. use bodo winters tutorial - compute difference between complicated , simpler model.

  2. use lmertest

now, results different, , cannot figure out why.

  1. m1 <- lmer(value  ~ bmi + dummy + (1|id), data=data) m2 <- lmer( value ~ bmi + (1|id), data=data) anova(m1, m2) 

here, results highly significant

  1. 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

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -