badData: Identifies spurious observations

Description Usage Arguments Value Examples

Description

This function identifies spurious observations using a mix of stochastic and deterministic thresholds.

Usage

1
badData(X, meds=NULL, mads=NULL, nMads=1.96, t=0)

Arguments

X

X must be a numeric matrix.

meds

Vector containing column center. If NULL will calculate the median.

mads

Vector containing column variability. If NULL will calculate the Median Absolute Deviation.

nMads

The stochastic threshold specified in terms of MADs

t

The deterministic threshold. Specified in percentage distance from median.

Value

Returns a matrix with NaN where data was identified as spurious

Examples

1
2
3
x<-rnorm(100)
x[20]<-30
badData(x)

FIACH documentation built on May 1, 2019, 8:02 p.m.

Related to badData in FIACH...