robust_zscore {cmapR} | R Documentation

## Compoute robust z-scores

### Description

robust zscore implementation takes in a 1D vector, returns 1D vector after computing robust zscores rZ = (x-med(x))/mad(x)

### Usage

    robust_zscore(x, min_mad = 1e-06, ...)

### Arguments

`x` | numeric vector to z-score
`min_mad` | the minimum allowed MAD, useful for avoiding division by very small numbers
`...` | further options to median, max functions

### Value

transformed version of x

### Examples

    (x <- rnorm(25))
    (robust_zscore(x))

    # with min_mad
    (robust_zscore(x, min_mad=1e-4))

[Package cmapR version 1.6.0 Index]