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条)