Simulates new responses for a manyglm object.
# S3 method for manyglm
simulate(object, nsim = 1, seed = NULL, newdata = object$data, ...)
Simulates a data frame of new values for responses. If multiple datasets are requested, these are
stacked one under the other (see example(simulate.cord)
.
a manyglm
object from the mvabund
package.
number of simulated datasets to generate.
a seed for random number generation (defaults to NULL)
a new dataset with predictors to simulate new values for. Defaults to data model was fitted to.
additional optional arguments.
David Warton <david.warton@unsw.edu.au>
Returns a data frame containing the response and predictors. This function just calls simulate.cord
from the ecoCopula
package, on a cord
object constructed under default settings -- that is,
it fits a copula latent variable model with two latent variables, then uses this to simulate new data.
manyglm
, cord
, simulate.cord