Rsqr.sims: Simulate community data for testing R squares

Description Usage Arguments Value See Also

Description

Simulate community data for testing R squares

Usage

1
2
3
4
5
6
  Rsqr.sims(n = 100, m = 10, p = 10, sigmaE = 1,
    sigmaB = 1, mu = 0,
    cmt = cor(matrix(rnorm(p * (p + 1)), p + 1, p)),
    cmv = cmt,
    B = matrix(rnorm(m * p, mean = mu, sd = sigmaB), p, m),
    hell = TRUE, untr = TRUE)

Arguments

n

Number of sites

m

Number of species

p

Number of environmental variables

sigmaE

Standard deviation of the error term

sigmaB

Standard deviation of the coefficients relating species to environment

mu

Mean of the coefficients relating species to environment

cmt

Correlation matrix of the environmental variables in the training set

cmv

Correlation matrix of the environmental variables in the validation set

B

p by m matrix of coefficients relating species to environment

hell

Should the Hellinger transformed results be returned?

untr

Should untransformed results be returned?

Value

A vector with the sample, adjusted, predictive, and validation set R-squares. If both hell and untr are TRUE, then the vector contains 8 values.

See Also

Other sims: rep.Rsqr.sims


pr2 documentation built on May 2, 2019, 6:12 p.m.