This generic function generates a sample of responses from a fitted
model object using the parameter estimates from the fit. Typically
these simulated responses are used in a parametric bootstrap sample of
a test statistic.
Usage
simulate(object, nsim, seed, ...)
Arguments
object
an object representing a fitted model.
nsim
number of response vectors to simulate. Defaults to 1.
seed
an integer that will be used in a call to set.seed
before simulating the response vectors. The value is saved as an
attribute named "seed" in the returned value. Defaults to a
random integer between 0 a
...
additional optional arguments.
Value
A data frame with nsim columns and nobs, the number
of observations in the fitted model object, rows.