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,
  simulate.function,
  nsim,
  seed,
  uncertainty = FALSE
)

Arguments

object

an saemixObject object returned by the saemix function

simulate.function

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)

uncertainty

Uses uncertainty (currently not implemented). 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


iame-researchCenter/saemix documentation built on March 26, 2022, 10:33 p.m.