Skip to contents

Flags \(|x_i - \mu|/\sigma > k\). Both the centre and the scale come from the series being screened, so a large outlier inflates sigma and masks itself – this is a screen, not a test.

Usage

ZscoreA(x, k, ddof = 1)

Arguments

x

Series to screen.

k

Threshold in standard deviations.

ddof

Delta degrees of freedom of the standard deviation.

Value

Named list with estimate, z, flags, indices, mean, sd, k, n, method.

References

Basic descriptive screening; no single owning source.

Examples

ZscoreA(c(1, 2, 3, 4, 50), 2)
#> $estimate
#> [1] 0
#> 
#> $z
#> [1] 0.5171105 0.4701005 0.4230904 0.3760804 1.7863819
#> 
#> $flags
#> [1] FALSE FALSE FALSE FALSE FALSE
#> 
#> $indices
#> integer(0)
#> 
#> $mean
#> [1] 12
#> 
#> $sd
#> [1] 21.27205
#> 
#> $k
#> [1] 2
#> 
#> $n
#> [1] 5
#> 
#> $method
#> [1] "z-score anomaly flagging"
#>