[英]R + Multilevel Logistic Regression + Group Fixed Effects
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
): 在Stata中,我知道如果使用以下命令,则可以获取因变量( thkbins
)和两个预测变量( cc
& tv
)之间每种可能组合的对数:
melogit thkbins cc#tv || school:,
Is there a way to produce a similar output in R? 有没有办法在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. 我一直在使用lme4
软件包中的glmer
命令,尽管我可以使用交互项获得输出,但这并不是我可以在Stata中产生的。
model1 <- glmer(thkbin ~ cc + tv + cc*tv + (1|school),
data=thkdata, family = binomial, nAGQ = 7)
summary(model1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.