使用多级回归时的错误(LME4)

发布于 2025-02-09 23:51:29 字数 488 浏览 3 评论 0原文

我想使用多级回归来分析某些自变量对因变量的影响,并使用不同的截距和斜率。

我的回归包括非数字自变量,我想将其用于不同的截距和斜率。因变量是数字变量。使用此多级回归时,我会收到以下错误:

错误:观察数(= 88594)< =术语的随机效果数(= 337477)的数量(1 + x | z);随机效应参数和残差方差(或比例参数)可能无法识别

xz是字符,并且相互关联,并且与y 。这是我使用的回归:

multi_reg1 <- lmer(y~ 1 + x + (1 + x| z), REML = FALSE, data = data_frame1)

有没有办法解决此问题,还是不可能,我必须使用其他回归方法?

I want to use a multilevel regression to analyse the effect of some independent variables on a dependent variable and use varying intercept and slope.

My regression includes non-numeric independent variables which I want to use for the varying intercept and slope. The dependent variable is a numeric variable. When using this multilevel regression I get the following error:

Error: number of observations (=88594) <= number of random effects (=337477) for term (1 + x | z); the random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable

x and z are characters and are correlated with each other and with y. This is the regression I use:

multi_reg1 <- lmer(y~ 1 + x + (1 + x| z), REML = FALSE, data = data_frame1)

Is there a way to fix this problem or is it not possible and I have to use other regression methods?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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