simulateDiscreteSaemix: Perform simulations under the model for an saemixObject...

View source: R/func_simulations.R

simulateDiscreteSaemixR Documentation

Perform simulations under the model for an saemixObject object defined by its log-likelihood

Description

This function is used to simulate from discrete response models.

Usage

simulateDiscreteSaemix(
  object,
  nsim,
  seed,
  predictions = TRUE,
  uncertainty = FALSE,
  verbose = FALSE
)

Arguments

object

an saemixObject object returned by the saemix function. The model must contain a slot simulate.function, containing a function with the same structure as the model functions (arguments (psi, id, xidep)) which returns simulated responses when given a set of individual parameters (psi) and the corresponding predictors (xidep)

nsim

Number of simulations to perform. Defaults to the nb.simpred element in options

seed

if non-null, seed used to initiate the random number generator (defaults to NULL)

predictions

Whether the simulated parameters should be used to compute predictions. Defaults to TRUE. If FALSE, only individual parameters are simulated.

uncertainty

Uses uncertainty (currently not implemented). Defaults to FALSE

verbose

if TRUE, prints messages (defaults to FALSE)

Details

To call this function, the user needs to define a simulate.function matching the model function in the object. The function will then be used to simulate data under the empirical design, using the model and estimated parameters from a fit.

This function calls simulate.SaemixObject with the prediction=FALSE option to simulate individual parameters, then the simulate.function to obtain corresponding predictions.

Author(s)

Emmanuelle Comets emmanuelle.comets@inserm.fr

See Also

SaemixObject,saemix, simulate.SaemixObject


saemix documentation built on May 29, 2024, 10:43 a.m.