我在使用 lme4 中的 glmer 函数估计以下模型时遇到了一些计算问题:
glmer(Y ~ x1*x2 + x2*x3 + (1+x1+x2|class) + (1|obs), family=poisson)
- where
class指的是我的分组, obs指的是观察(因为我想要观察级别的随机效应)。
我想试试这个MCMCglmm包(不幸的是,没有深入了解 MCMC),但不知道如何指定随机效果。到目前为止,我的草稿命令是:
MCMCglmm(fixed = Y ~ x1*x2 + x2*x3,
random = ~ class + x1:class + x2:class + obs, family="poisson")
你能帮我指定型号吗?