0
votes

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:,

enter image description here

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)

enter image description here

1

1 Answers

1
votes

I would use clmm from the package ordinal (tutorial here):

model<-clmm(DepVar~IndVar+(1|WithinVar),data=df)

I hope this helps.