This function is used to simulate from discrete response models.
simulateDiscreteSaemix(
object,
nsim,
seed,
uncertainty = FALSE,
verbose = FALSE
)
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)
Number of simulations to perform. Defaults to the nb.simpred element in options
if non-null, seed used to initiate the random number generator (defaults to NULL)
Uses uncertainty (currently not implemented). Defaults to FALSE
if TRUE, prints messages (defaults to FALSE)
Emmanuelle Comets emmanuelle.comets@inserm.fr
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.
SaemixObject
,saemix
,
simulate.SaemixObject