在logistic回归模型中使用sjplot和子集函数时遇到问题
问题解决了:我将R从4.2.0更新为4.2.1,并且该问题是自主解决的。任何遇到类似问题的人都可以首先尝试一下。
我正在尝试使用“子集”功能根据模型的标准化残差从模型中删除离群值。但是,我遇到了一个错误,即在使用sjplot :: tab_model时。错误在下面。
Error in vectbl_as_row_location(i, nr, i_arg, assign) :
ℹ Logical subscripts must match the size of the indexed input.
✖ Input has size 2560 but subscript `r` has size 1006.
问:我可以知道如何解决这个问题吗?
这是我的模型:
model_2 <- glmer (score~ TIME+ READING_ABILITY + (PARITICIPANT) + (1| WORD), family = binomial (link = "logit"), control = glmerControl(optimizer = "bobyqa"), data = MY_DATA, subset = abs(scale(resid(model))) <2.5)
sjPlot::tab_model (model_2)
Issue solved: I updated my R from 4.2.0 to 4.2.1 and the issue was solved autonomically. Anyone who ran into the similar problem could try this first.
I am trying use the "subset" function to remove the outliers from my model based on standardized residual of the model. However I ran into an error that while using sjPlot::tab_model. The error is as beneath.
Error in vectbl_as_row_location(i, nr, i_arg, assign) :
ℹ Logical subscripts must match the size of the indexed input.
✖ Input has size 2560 but subscript `r` has size 1006.
Q. May I know how to fix this?
This is my model:
model_2 <- glmer (score~ TIME+ READING_ABILITY + (PARITICIPANT) + (1| WORD), family = binomial (link = "logit"), control = glmerControl(optimizer = "bobyqa"), data = MY_DATA, subset = abs(scale(resid(model))) <2.5)
sjPlot::tab_model (model_2)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论