Learn R Programming

ecp (version 2.0.0)

e.divisive: ENERGY DIVISIVE

Description

A divisive hierarchical estimation algorithm for multiple change point analysis.

Usage

e.divisive(X, sig.lvl=.05, R=199, k=NULL, min.size=30, alpha=1)

Arguments

X
A T x d matrix containing the length T time series with d-dimensional observations.
sig.lvl
The level at which to sequentially test if a proposed change point is statistically significant.
R
The maximum number of random permutations to use in each iteration of the permutation test. The permutation test p-value is calculated using the method outlined in Gandy (2009).
k
Number of change point locations to estimate, suppressing the permutation based testing. If k=NULL then only the statistically significant estimated change points are returned.
min.size
Minimum number of observations between change points.
alpha
The moment index used for determining the distance between and within segments.

Value

  • The returned value is a list with the following components.
  • k.hatThe number of clusters within the data created by the change points.
  • order.foundThe order in which the change points were estimated.
  • estimatesLocations of the statistically significant change points.
  • considered.lastLocation of the last change point, that was not found to be statistically significant at the given significance level.
  • permutationsThe number of permutations performed by each of the sequential permutation test.
  • clusterThe estimated cluster membership vector.
  • p.valuesApproximate p-values estimated from each permutation test.

Details

Segments are found through the use of a binary bisection method and a permutation test. The computational complexity of this method is O(kT^2), where k is the number of estimated change points, and T is the number of observations.

References

Matteson D.S., James N.A. (2013). A Nonparametric Approach for Multiple Change Point Analysis of Multivariate Data.

Nicholas A. James, David S. Matteson (2014). "ecp: An R Package for Nonparametric Multiple Change Point Analysis of Multivariate Data.", "Journal of Statistical Software, 62(7), 1-25", URL "http://www.jstatsoft.org/v62/i07/"

Gandy, A. (2009) "Sequential implementation of Monte Carlo tests with uniformly bounded resampling risk." Journal of the American Statistical Association.

Rizzo M.L., Szekely G.L (2005). Hierarchical clustering via joint between-within distances: Extending ward's minimum variance method. Journal of Classification.

Rizzo M.L., Szekely G.L. (2010). Disco analysis: A nonparametric extension of analysis of variance. The Annals of Applied Statistics.

See Also

e.agglo

Examples

Run this code
set.seed(100)
x1 = matrix(c(rnorm(100),rnorm(100,3),rnorm(100,0,2)))
y1 = e.divisive(X=x1,sig.lvl=0.05,R=199,k=NULL,min.size=30,alpha=1)
x2 = rbind(MASS::mvrnorm(100,c(0,0),diag(2)),MASS::mvrnorm(100,c(2,2),diag(2)))
y2 = e.divisive(X=x2,sig.lvl=0.05,R=499,k=NULL,min.size=30,alpha=1)

Run the code above in your browser using DataLab