calc_residuals | R Documentation |
calc_residuals
provides optional residuals as the basis for Correspondence
Analysis
calc_residuals(mat, residuals = "pearson", clip = FALSE, cutoff = NULL)
mat |
A numerical matrix or coercible to one by 'as.matrix()'. Should have row and column names. |
residuals |
character string. Specifies which kind of residuals should be calculated. Can be "pearson" (default), "freemantukey" or "NB" for negative-binomial. |
clip |
logical. Whether residuals should be clipped if they are higher/lower than a specified cutoff |
cutoff |
numeric. Residuals that are larger than cutoff or lower than -cutoff are clipped to cutoff. |
A named list. The elements are:
"S": standardized residual matrix.
"tot": grand total of the original matrix.
"rowm": row masses.
"colm": column masses.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.