Skip to content
Prev 20493 / 20628 Next

glmmTMB syntax to brm() syntax

You should be getting version 1.1.10 from CRAN, unless you're using 
an outdated mirror, see 
https://cran.r-project.org/web/packages/glmmTMB/index.html ... you will 
need version 1.1.10 to avoid the error.

    If you want a dispersion parameter of 1.0 then you probably want 
betadisp = 0 (since the dispersion model uses a log link).

   You also need to provide only a vector of length 1 for theta, since 
you only have a single (scalar) random effect term.  And you need to 
provide two values for betadisp (since you are specifying ~con, and con 
is a two-level factor), i.e.

  dd$VOCD <- simulate_new(
    ~ 0+con + (1|ID),
    dispformula = ~ con,
    newdata = dd,
    newparams = list(beta = c(0, 0.5), theta = -1,
                     betadisp = rep(0,2)))[[1]]
On 2024-10-28 1:39 p.m., Simon Harmel wrote: