最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

poisson - Creating a weight variable in Mixed Effects model using GLMMadapatve to constrain baseline values - Stack Overflow

programmeradmin0浏览0评论

I am using GLMMadaptive package (.html) to estimate mixed effects hurdle model and wanting to weight the baseline values to be equal at baseline. The code for the model is as follows:


Model1 <- mixed_model(fixed = Y ~ Time + Contrast1 + Contrast2, 
              zi_fixed = ~ 1+Time + Contrast1,
              zi_random = ~ 1 | ID,
              random = ~ 1 | ID,
              weights = varIdent(form = ~ 1 | Time), #Weighting for baseline constraints
              data = data1, 
              na.action = na.omit,
              family = hurdle.poisson())

However, the varIdent(form = ~ 1 | Time) function generates an error for this model, but the same code of lme() model doesn't generate an error.

The error reads quote Error in mixed_model(fixed = Y ~ Time + Contrast1 + Contrast2, : the length of 'weights' does not match with the number of groups in 'data

Is there a way to create the varIdent(form = ~ 1 | Time) weights externally for this type of model?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论