In Stata, I know that if I use the following command, I can get the logits for each possible combination between my dependent variable ( thkbins
) and my two predictor variables ( cc
& tv
):
melogit thkbins cc#tv || school:,
Is there a way to produce a similar output in R? I have been using the glmer
command from the lme4
package, and while I can get the output with the interaction term, it isn't exactly what I can produce in Stata.
model1 <- glmer(thkbin ~ cc + tv + cc*tv + (1|school),
data=thkdata, family = binomial, nAGQ = 7)
summary(model1)
I would use clmm
from the package ordinal
(tutorial here ):
model<-clmm(DepVar~IndVar+(1|WithinVar),data=df)
I hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.