Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

wascores

Weighted Averages Scores for Species


Description

Computes Weighted Averages scores of species for ordination configuration or for environmental variables.

Usage

wascores(x, w, expand=FALSE)
eigengrad(x, w)

Arguments

x

Environmental variables or ordination scores.

w

Weights: species abundances.

expand

Expand weighted averages so that they have the same weighted variance as the corresponding environmental variables.

Details

Function wascores computes weighted averages. Weighted averages “shrink”: they cannot be more extreme than values used for calculating the averages. With expand = TRUE, the function “deshrinks” the weighted averages by making their biased weighted variance equal to the biased weighted variance of the corresponding environmental variable. Function eigengrad returns the inverses of squared expansion factors or the attribute shrinkage of the wascores result for each environmental gradient. This is equal to the constrained eigenvalue of cca when only this one gradient was used as a constraint, and describes the strength of the gradient.

Value

Function wascores returns a matrix where species define rows and ordination axes or environmental variables define columns. If expand = TRUE, attribute shrinkage has the inverses of squared expansion factors or cca eigenvalues for the variable. Function eigengrad returns only the shrinkage attribute.

Author(s)

Jari Oksanen

See Also

Examples

data(varespec)
data(varechem)
vare.dist <- vegdist(wisconsin(varespec))
vare.mds <- monoMDS(vare.dist)
vare.points <- postMDS(vare.mds$points, vare.dist)
vare.wa <- wascores(vare.points, varespec)
plot(scores(vare.points), pch="+", asp=1)
text(vare.wa, rownames(vare.wa), cex=0.8, col="blue")
## Omit rare species (frequency <= 4)
freq <- apply(varespec>0, 2, sum)
plot(scores(vare.points), pch="+", asp=1)
text(vare.wa[freq > 4,], rownames(vare.wa)[freq > 4],cex=0.8,col="blue")
## Works for environmental variables, too.
wascores(varechem, varespec)
## And the strengths of these variables are:
eigengrad(varechem, varespec)

vegan

Community Ecology Package

v2.5-7
GPL-2
Authors
Jari Oksanen, F. Guillaume Blanchet, Michael Friendly, Roeland Kindt, Pierre Legendre, Dan McGlinn, Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, Eduard Szoecs, Helene Wagner
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.