simulate.HLfit: Simulate realizations of a fitted correlated mixed model.
Description
From an HLfit object, simulate.HLfit function generates new samples given the estimated fixed effects
and dispersion parameters, and given the design matrix for random effects (hence, given the correlation parameters and spatial locations, if relevant).
simulate.HLCor and simulate.corrHLfit are wrapper functions that extract from their respective input objects the HLfit object
and apply simulate.HLfit to it.
Usage
## S3 method for class 'HLfit':
simulate(object, nsim = 1, seed = NULL, ...)
## S3 method for class 'HLCor':
simulate(object,...)
## S3 method for class 'corrHLfit':
simulate(object,...)
Arguments
object
The return object of an HLfit, HLCor or corrHLfit call.
nsim
number of response vectors to simulate. Defaults to '1'.
seed
A seed for set.seed. If such a value is provided, the initial state of the random number generator at a global level
is restored on exit from simulate.
...
further arguments passed to or from other methods.
Value
A vector (if nsim=1) or a matrix with nsim columns, each containing a simulated response.