comp_std_residuals: Compute Standardized Residuals

View source: R/CA.R

comp_std_residualsR Documentation

Compute Standardized Residuals

Description

'comp_std_residuals' computes the standardized residual matrix S, which is the basis for correspondence analysis and serves as input for singular value decomposition (SVD).

Usage

comp_std_residuals(mat)

Arguments

mat

A numerical matrix or coercible to one by 'as.matrix()'. Should have row and column names.

Details

Calculates standardized residual matrix S from the proportion matrix P and the expected values E according to S = \frac{(P-E)}{sqrt(E)}.

Value

A named list with standardized residual matrix "S", grand total of the original matrix "tot" as well as row and column masses "rowm" and "colm" respectively.


ClemensKohl/APL documentation built on May 25, 2024, 3:15 p.m.