Description Usage Arguments Details Value References See Also Examples
Finds covariance changepoints within multivariate time series data using either the Ratio method \insertCiteRyan2020changepoint.cov or a CUSUM based method \insertCiteAue2009changepoint.cov.
1 2 3 4 5 6 7 8 9 10 |
X |
Data matrix of dimension n by p. |
method |
Covariance changepoint method to be used. Choice of "Ratio" or "CUSUM". |
threshold |
Threshold choice for determining significance of changepoints. Choices include:
If numCpts is numeric then the threshold is not used as the number of changepoints is known. |
numCpts |
Number of changepoints in the data. Choices include:
|
msl |
Minimum segment length allowed between the changepoints. NOTE this should be greater than or equal to p, the dimension of the time series. |
thresholdValue |
Either the manual threshold value when threshold="Manual" or the (1-thresholdValue)-quantile of asymptotic distribution of the test statistic when threshold="Asymptotic". |
LRCov |
The long-run covariance estimator to be used for CUSUM method. Currently, only "Bartlett" and "Empirical" are supported. Alternatively, a matrix containing the long-run covariance estimate can be inputted. |
Class |
Logical. If TRUE then an S4 class is returned. If FALSE the estimated changepoints are returned. |
This is a simple wrapper function for the functions
cptRatio
and cptCUSUM
. If no method is specified
then the method used will depend on the dimension of the time series. For
p<10, the CUSUM method will be used and for p>=10 the Ratio method will be
used.
An object of S4 class cptCovariance-class
is returned. If Class="FALSE", just the vector of changepoints are returned.
Ryan2020changepoint.cov
\insertRefAue2009changepoint.cov
cptRatio
, cptCUSUM
, cptCovariance
, wishartDataGeneration
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | set.seed(1)
dataAMOC <- wishartDataGeneration(n=100,p=3,tau=50)$data
dataMultipleCpts <- wishartDataGeneration(n=200,p=3,tau=c(50,100,150))$data
ansRatio <- cptCov(X=dataAMOC,method="Ratio")
summary(ansRatio)
plot(ansRatio)
ansCUSUM <- cptCov(X=dataAMOC,method='CUSUM')
show(ansCUSUM)
ansRatio2 <- cptCov(X=dataMultipleCpts,method='Ratio',threshold='Manual',numCpts='BinSeg',
msl=10,thresholdValue=20)
summary(ansRatio2)
cptsSig(ansRatio2)
plot(ansRatio2)
ansCUSUM2 <- cptCov(X=dataAMOC,method='CUSUM',numCpts=3,
msl=15,LRCov='Empirical')
summary(ansCUSUM2)
cptsSig(ansCUSUM2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.