Skip to contents

Simulates new responses for a manyglm object.

Usage

# S3 method for manyglm
simulate(object, nsim = 1, seed = NULL, newdata = object$data, ...)

Arguments

object

a manyglm object from the mvabund package.

nsim

number of simulated datasets to generate.

seed

a seed for random number generation (defaults to NULL)

newdata

a new dataset with predictors to simulate new values for. Defaults to data model was fitted to.

...

additional optional arguments.

Value

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).

Details

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.

Author

David Warton <david.warton@unsw.edu.au>