1

I read the glmmTMB package vignettes (https://cran.r-project.org/web/packages/glmmTMB/vignettes/covstruct.html) and have the following questions:

  1. In the vignetts, they fit the model using
glmmTMB(y~ar1(times+0|group),data=dat0)

and mentioned that the time+0 correspondes to a design matrix Z linking observation vector y (rows) with a random effects vector u(columns)"

What's the meaning of +0? Is there any difference with (times|group), (times+1|group) and (1|group)?

Are there any comprehensive summary about the syntax of the covariance structure?

  1. If I want to fit a Negtive binomial model when outcome y_{ij} is generated from R function: rnbinom(mu=x_{ij}beta+b_i+e_{ij},size=1), where i is the group index and j is the individual index, and b_i~N(0,1), e_{ij}~N(0,1). Would the following code correctly specify to model?
dat <- data.frame(y,x,group)
glmmTMB(y~x+(1|group),data=dat,family=nbinom2)

Any suggestion and help is appreciated. Thanks in advance for your help!

0 Answers0