使用多级回归时的错误(LME4)
我想使用多级回归来分析某些自变量对因变量的影响,并使用不同的截距和斜率。
我的回归包括非数字自变量,我想将其用于不同的截距和斜率。因变量是数字变量。使用此多级回归时,我会收到以下错误:
错误:观察数(= 88594)< =术语的随机效果数(= 337477)的数量(1 + x | z);随机效应参数和残差方差(或比例参数)可能无法识别
x
和z
是字符,并且相互关联,并且与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 技术交流群。

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