simulate.manyglm {ecostats} | R Documentation |
Simulate from manyglm objects
Description
Simulates new responses for a manyglm object.
Usage
## S3 method for class 'manyglm'
simulate(object, nsim = 1, seed = NULL, newdata = object$data, ...)
Arguments
object |
a |
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. |
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.
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)
.
Author(s)
David Warton <david.warton@unsw.edu.au>