LanguageR / lme4: Any help on p-values ββfor models with random correlation parameters?
I am using the languageR
mixed effect model package with syntax at the end of this post. I can use pvals.fnc
to get p values ββfor models 1 and 3 ( hd_lmer1
and hd_lmer2
). Using this with model two gives the following error message:
p2 = pvals.fnc (hd_lmer2) Error in pvals.fnc (hd_lmer2): MCMC sampling is not yet implemented in lme4_0.999375 for models with random correlation parameters
I would appreciate it if someone could help me on how to get p-values ββfor such models.
Models:
hd_lmer1 <- lmer(
rot ~ time + group + sex + gen + (1 | subject) + (1 | rot.pre),
data = data_long,
REML = TRUE
)
hd_lmer2 <- lmer(
rot ~ time + group + sex + gen + (time | subject) + (1 | rot.pre),
data = data_long,
REML = TRUE
)
hd_lmer3 <- lmer(
rot ~ time * group + sex + gen + (1 | subject) + (1 | rot.pre),
data = data_long,
REML = TRUE
)
source to share
This is an old post, but here is one possible solution that might be helpful, using the model comparison method to check if hd_lmer2 is better than hdlmer1 (i.e. if adding random effect is significant or not).
hdlmer1ml<-update(hdlmer1,REML=FALSE)
hdlmer2ml<-update(hdlmer2,REML=FALSE)
anova(hdlmer2ml,hdlmer1ml)
source to share