## use Salamanders data for structure/covariates
simulate_new(~ mined + (1|site),
zi = ~ mined,
newdata = Salamanders, show_pars = TRUE)
sim_count <- simulate_new(~ mined + (1|site),
newdata = Salamanders,
zi = ~ mined,
family = nbinom2,
newparams = list(beta = c(2, 1),
betazi = c(-0.5, 0.5), ## logit-linear model for zi
betad = log(2), ## log(NB dispersion)
theta = log(1)) ## log(among-site SD)
)
head(sim_count[[1]])
Run the code above in your browser using DataLab