Description Usage Arguments Details Value Author(s) See Also
rowZs() calculates Z-scores across rows of a matrix using fast row methods.
1 | rowZs(X, vs, robust = F, parts = F, na.rm = T, min.sd)
|
X |
Numeric matrix, or object that can be coerced to matrix. |
vs |
Indices (numeric or character) of the columns of X to be used in the calculation of the mean or median and sd or mad of each row. If omitted, defaults to all columns of X. |
robust |
Logical. If TRUE, calculate Z-scores as (x-median)/mad; otherwise, as (x - mean) / sd. |
parts |
Logical; if TRUE, return the mean/median and sd/ |
na.rm |
Logical; should NA's be omitted? |
min.sd |
Optional numeric value, *quantile* of the non-zero sd's (or mad's) to replace very low (~zero) sd or mad values with. A typical value might be in the range 0 to 0.1. Meant to prevent very large or unrealistic Z-scores when the sd is small by chance or because of pile-up at a signal limit (e.g., saturation). |
This function is meant to help find samples or groups of samples with extreme values, typically relative to a control group (vs)
Returns a matrix with the same dimensions as X with z-scores for each element of X calculated from the row means/medians and sds/mads. If parts==TRUE, will have named attributes: "vs.mean" and "vs.sd" or "vs.median" and "vs.mad", plus "vs".
M.W.Rowe, mwr.stats@gmail.com
mad
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.