在logistic回归模型中使用sjplot和子集函数时遇到问题

发布于 2025-02-11 17:57:09 字数 664 浏览 0 评论 0原文

问题解决了:我将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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文