simulate.manyglm | R Documentation |
Simulates new responses for a manyglm object.
## S3 method for class 'manyglm'
simulate(object, nsim = 1, seed = NULL, newdata = object$data, ...)
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. |
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.
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)
.
David Warton <david.warton@unsw.edu.au>
manyglm
, cord
, simulate.cord
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.