simulate.SLik_j | R Documentation |
SLik_j
object.
simulate
method for SLik_j
objects, by default simulating realizations of the vector of projected summary statistics, drawn from their inferred distribution, given the summary-ML estimates which are the default value of the given
argument.
For any non-default given
argument, the sampling distribution is still deduced from the multivariate Gaussian mixture fit of the reference table, by conditioning it on given
values. Any variable included in the mixture model may be included in given
, allowing to simulate from other distributions than that of the vector of projected summary statistics.
This usage should not be confused with simulating the sample-generating process, necessarily distinctly available to the user, and which does not rely on the mixture model stored in the fit object.
Simulations of the sample-generating process for given
parameter values can be obtained by setting non-default option SGP=TRUE
.
## S3 method for class 'SLik_j'
simulate(object, nsim = 1, seed = NULL, given=object$MSL$MSLE,
norm_or_t=.wrap_rmvnorm, SGP=FALSE, ...)
object |
An object of class |
nsim |
number of response vectors of projected summary statistics to simulate. |
seed |
Seed for the random number generator (RNG). Here this controls the |
given |
The default is the summary-MLE, a full vector of fitted parameters; but Any variable included in the mixture fit of the referencetable may be included (see Description). |
norm_or_t |
Controls the sampler in in cluster of the mixture. The default value is a trivial wrapper around the |
SGP |
Boolean. Whether to sample from the sample-generating process. |
... |
Additional arguments. Currently ignored, except when |
By default (SGP=FALSE
), a matrix of size nsim
times the number of projected summary statistics; if SGP=TRUE
, a data frame with columns for parameters, for raw summary statistics, and optionally for latent variables if relevant.
## Assuming an object 'slik_j' of class 'SLik_j':
# simulate(slik_j, nsim=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.