| simulate.GPPM | R Documentation |
This function is used to simulate from a Gaussian process panel model,
which has been specified using gppm.
## S3 method for class 'GPPM'
simulate(
object,
nsim = 1,
seed = NULL,
parameterValues = NULL,
verbose = FALSE,
...
)
object |
object of class GPPM. The Gaussian process panel model from which to simulate. |
nsim |
integer. Number of data sets to generate. |
seed |
numeric. Random seed to be used. |
parameterValues |
numeric vector. Used to specify the values for the parameters. Which value belongs to which parameter is determined by the names attribute of parameterValues. See also the example. |
verbose |
boolean. Print diagnostic output? |
... |
additional parameters (currently not used). |
A simulated data set, which is an object of class 'LongData'. If nsim>1 a list of nsim simulated data sets.
data("demoLGCM")
lgcm <- gppm(
"muI+muS*t", "varI+covIS*(t+t#)+varS*t*t#+(t==t#)*sigma",
demoLGCM, "ID", "y"
)
parameterValues <- c(10, -1, 0, 10, 0, 0.1)
names(parameterValues) <- c("muI", "muS", "varI", "varS", "covIS", "sigma")
simData <- simulate(lgcm, parameterValues = parameterValues)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.