mcChi: Standardised chi-square residuals

Description Usage Arguments Details Value Note Author(s) References

Description

Scales a matrix, Y, to its standardised chi-square residuals (o - e) / sqrt(e) (if R_0 = R, where R contains the row sums of matrix Y) so that further analysis can be unweighted

Usage

1
mcChi(Y, R0, eps = 1e-06)

Arguments

Y

a matrix for which standardised chi-square residuals are to be calculated.

R0

row weights.

eps

tolerance - leave as default.

Details

This function implements equation 8 of ter Braak and Schaffers (2004) by firstly applying equation 7 to form matrix Q using row and column sums of Y as weights, and, secondly, by applying equation 8 to form a matrix of standardised chi-square residuals from Q by pre-multiplication of Q by sqrt(R0) and post-multiplication of Q by sqrt(K), where K is the column sums of Y.

Value

A list with the following components:

Ychi

the matrix of standardised chi-squared residuals of Y

Kn

the column sums (K) of Y divided by sum(K)

Note

This function is not intended for casual use by users.

Author(s)

Gavin L. Simpson, based on Matlab code by C.J.F. ter Braak and A.P. Schaffers.

References

Ter Braak, C.J.F and Schaffers, A.P. (2004) Co-Correspondence Analysis: a new ordination method to relate two community compositions. Ecology 85(3), 834–846


gavinsimpson/cocorresp-old documentation built on May 16, 2019, 10:10 p.m.