simulate() draws new response values from the fitted drmTMB model. For
univariate Gaussian models with known sampling covariance, simulation uses
the total observation covariance implied by the known sampling covariance
plus the fitted residual scale. For Student-t models, simulation uses fitted
mu, sigma, and nu. For lognormal models, simulation uses fitted
log-scale mu and sigma. For Gamma models, simulation uses fitted mean
mu and coefficient of variation sigma. For beta models, simulation uses
fitted mean mu and public scale sigma with internal
phi = 1 / sigma^2. For beta-binomial models, simulation draws latent
success probabilities from the fitted beta distribution and then success
counts from the stored trial denominators. For cumulative-logit ordinal
models, simulation draws ordered categories from the fitted cumulative-logit
probabilities. For Poisson models, simulation uses the fitted mean mu. For
zero-inflated Poisson models, simulation uses
fitted conditional mean mu and structural-zero probability zi. For
negative-binomial 2 models, simulation uses fitted mu and overdispersion
scale sigma, with Var(y) = mu + sigma^2 * mu^2; zero-truncated NB2
models draw from this NB2 component conditional on positive counts. The
zero-inflated NB2 path adds structural-zero probability zi; the hurdle NB2
path adds hurdle-zero probability hu and draws nonzero counts from the
zero-truncated NB2 component. For bivariate
Gaussian models without known
sampling covariance, simulation uses the fitted mu1, mu2, sigma1,
sigma2, and residual rho12. If a dense bivariate known V was supplied,
simulation uses the full row-paired observation covariance V + Omega.
Usage
# S3 method for class 'drmTMB'
simulate(object, nsim = 1, seed = NULL, ...)