mcChi.Rd
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
mcChi(Y, R0, eps = 1e-06)
Y | a matrix for which standardised chi-square residuals are to be calculated. |
---|---|
R0 | row weights. |
eps | tolerance - leave as default. |
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{R_0}\) and post-multiplication of Q by \(\sqrt{K}\), where K is the column sums of Y.
A list with the following components:
the matrix of standardised chi-squared residuals of Y
the column sums (K) of Y divided by sum(K)
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
Gavin L. Simpson, based on Matlab code by C.J.F. ter Braak and A.P. Schaffers.
This function is not intended for casual use by users.