Description Usage Arguments References Examples
Detects the Most Recent Changepoints (mrc) for panel data consisting of many related univariate timeseries (Bardwell, Eckley, Fearnhead and Smith, 2016). The method first determines the most recent univariate changepoints using PELT (Killick, Fearnhead and Eckley 2012) and then pools information across the time-series by solving the K-median problem using tb.raw (Teitz and Bart, 1968).
1 2 3 4 5 6 7 8 9 |
data |
An n \times N matrix or data frame representing a length n time series containing observations of N variables. The data can contain missing values which are indicated by NA. |
cost |
A string indicating which cost function to use. Possible choices are "mean" (change in mean) or "var" (change in variance).
The default value is |
alpha |
The variable-specific penalty used to penalise the addition of a given changepoint into a given variable. This can be specified as a real positive value or as a function of n. The latter form is used when the data contains missing values which leads to time series of different lengths. Default value |
pmax |
Maximum number of most recent changepoints to search for. Default value |
indexed |
Boolean value indicating that the first column of |
mad |
Boolean value indicating if the variates should be scaled by an estimate of the their standard deviation obtained using mean absolute deviation (Zhang, Nancy, Siegmund and David 2007).
This is useful in conjunction with |
phi |
Lag 1 autocorrelation to model the temporal dependence in the residuals of the time series assuming a MA(1) process. Default |
doi:10.1080/00401706.2018.1438926changepoint.mv
\insertRefOR:TEITZBARTchangepoint.mv
\insertRefdoi:10.1080/01621459.2012.737745changepoint.mv
1 2 3 4 5 6 7 8 9 | library(changepoint.mv)
data(mrcexample)
res<-mrc(mrcexample,pmax=2)
MDL(res) # MDL == pmax (possibly under-estimating MDL, retry)
res<-mrc(mrcexample,pmax=6)
MDL(res) # MDL = 5 (< pmax)
# view the most recent changepoints (corresponding to pmax = 5)
unique(cpts.mr(res,p=5)[,1])
summary(res) # summary of result
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.