Learn R Programming

cocorresp (version 0.4-6)

scaleChi: Standardised chi-square residuals

Description

Scales a matrix, Y, to is standardised chi-square residuals \((o - e) / \sqrt{e}\) (given \(K_n\) and \(R_0\) metrics derived from an external matrix \(Y_0\)) so that further analysis can be unweighted.

Usage

scaleChi(Y, Kn, R0, eps = 1e-06)

Value

Yr

the matrix of standardised chi-squared residuals of Y.

Arguments

Y

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

Kn

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

R0

row weights.

eps

a tolerance.

Author

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