[R-lang] Random slopes
Zhenguang Cai
s0782345@sms.ed.ac.uk
Thu Dec 30 15:12:52 PST 2010
Hi all,
I built the following models and did a comparison of them (to determine
whether I should include in the model the subject slope for the
interaction).
model1 <- lmer (Y ~ A*B+(A+B+1|Subject)+(1|Item), data=dat, family=binomial)
model1 <- lmer (Y ~ A*B+(A*B+1|Subject)+(1|Item), data=dat, family=binomial)
In order to determine whehter the inclusion of the subject slope for the
A*B interaction signficantly improves the model fit, I did a comparison
of the the two models.
anova (model1, model2)
In the output, model1 was autmoatically changed into
model1 <- lmer (Y ~ A*B+(A:B+1|Subject)+(1|Item), data=dat, family=binomial)
What does the A:B mean here? In my original model, I intended to have
the main effects of A and B (i.e., A+B). Is there any other way to
determine whether the subject slope for the A*B interaction shold be
included in the final model?
Thanks,
Zhenguang
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the ling-r-lang-L
mailing list