anomaly (version 2.0.1)

pass: Detection of multivariate anomalous segments using PASS.

Description

Implements the PASS (Proportion Adaptive Segment Selection) procedure of Jeng et al. (2012). PASS uses a higher criticism statistic to pool the information about the presence or absence of a collective anomaly across the components. It uses Circular Binary Segmentation to detect multiple collective anomalies.

Usage

pass(x, alpha = 2, lambda = NULL, Lmax = 10, Lmin = 1,
  transform = robustscale)

Arguments

x

An n x m real matrix representing n observations of m variates.

alpha

A positive integer > 0. This value is used to stabilise the higher criticism based test statistic used by PASS leading to a better finite sample familywise error rate. Anomalies affecting fewer than alpha components will however in all likelihood escape detection.

lambda

A positive real value setting the threshold value for the familywise Type 1 error. The default value is \((1.1 {\rm log}(n \times Lmax) +2 {\rm log}({\rm log}(m))) / \sqrt{{\rm log}({\rm log}(m))}\).

Lmax

A positive integer (Lmax > 0) corresponding to the maximum segment length. The default value is 10.

Lmin

A positive integer (Lmax >= Lmin > 0) corresponding to the minimum segment length. The default value is 1.

transform

A function used to transform the data prior to analysis. The default value is to scale the data using the median and the median absolute deviation.

Value

An S4 object of type .pass.class containing the data X, procedure parameter values, and the results.

References

10.1093/biomet/ass059anomaly

Examples

Run this code
# NOT RUN {
library(anomaly)
# generate some multivariate data
set.seed(0)
sim.data<-simulate(n=500,p=200,mu=2,locations=c(100,200,300),
                   duration=6,proportions=c(0.04,0.06,0.08))
res<-pass(sim.data)
summary(res)
plot(res,variate_names=FALSE)

# }

Run the code above in your browser using DataCamp Workspace