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

I am using GLMMadaptive package (.html) to estimate mixed effects hurdle model and wanting to weight th

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745586315a4634560.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信