Learn R Programming

ecp (version 1.5.2)

e.agglo: ENERGY AGGLOMERATIVE

Description

Agglomerative hierarchical algorithm for change point analysis.

Usage

e.agglo(data, member, alpha=1)

Arguments

data
A matrix containing the time series with observations in R^d.
member
Segment membership vector for the time series.
alpha
Index used for determining the distance between and within segments.

Value

  • Returns a list with the following components.
  • mergedA matrix indicating which segments were merged at each step of the agglomerative procedure.
  • fitVector showing the progression of the goodness-of-fit statistic.
  • listMatrix showing the progression of the set of change points.
  • optThe location of the estimated change points.

Details

Segments are created based on the initial segmentation provided by the member argument. In each iteration, segments are merged so as to maximize a goodness of fit statistic. The time complexity of this method is O(T^2), where T is the number of data points.

References

James NA, Matteson DS (2013). A Nonparametric Approach for Multiple Change Point Analysis of Multivariate Data.

James NA, Matteson DS (2013). ecp: An R Package for Nonparametric Multiple Change Point Analysis of Multivariate Data.

Rizzo ML, Szekely GL (2005). Hierarchical clustering via joint between-within distances: Extending ward's minimum variance method. Journal of Classification. pp. 151 - 183.

Rizzo ML, Szekely GL (2010). Disco analysis: A nonparametric extension of analysis of variance. The Annals of Applied Statistics. pp. 1034 - 1055.

See Also

e.divisive

Examples

Run this code
set.seed(100)
mem = rep(c(1,2,3,4),c(10,10,10,10))
x = c(rnorm(10),rnorm(20,2),rnorm(10,-1))
y = e.agglo(as.matrix(x),mem,1)
y$opt
#11 31

Run the code above in your browser using DataLab