simulate.rda {vegan}R Documentation

Simulate Responses with Gaussian Error for Redundancy Analysis

Description

Function simulates a response data frame so that it adds Gaussian error to the fitted responses of Redundancy Analysis (rda). The function is a special case of generic simulate, and works similarly as simulate.lm.

Usage

## S3 method for class 'rda':
simulate(object, nsim = 1, seed = NULL, ...)

Arguments

object an object representing a fitted rda model.
nsim number of response vectors to simulate. (Not yet used, and values above 1 will give an error).
seed an object specifying if and how the random number generator should be initialized (‘seeded’). See simulate for details.
... additional optional arguments (ignored).

Details

The implementation follows "lm" method of simulate, and adds Gaussian (Normal) error to the fitted values (fitted.rda using function rnorm. The standard deviations are estimated independently for each species (column) from the residuals after fitting the constraints.

Value

Returns a data frame with similar additional arguments on random number seed as simulate.

Note

The function is not implemented for cca or capscale objects, but only for rda.

Author(s)

Jari Oksanen

See Also

simulate for the generic case and for lm objects. Function fitted.rda returns fitted values without the error component.

Examples

data(dune)
data(dune.env)
mod <- rda(dune ~  Moisture + Management, dune.env)
## One simulation
update(mod, simulate(mod) ~  .)
## An impression of confidence regions of site scores
plot(mod, display="sites")
for (i in 1:5) lines(procrustes(mod, update(mod, simulate(mod) ~ .)), col="blue")

[Package vegan version 1.16-32 Index]