Description Usage Arguments Value See Also Examples
Detecting most recent changepoints from AGG method (detect changepoint in univariate time series) after generating censored data from MA model. We use PELT for segmenting a time series into changing mean, assuming normally distributed observations with changing mean but constant variance.
1 |
data |
a censored data matrix obtained from MA1.data . And then we add this data matrix column wise and use this as a first argument in PELT.ma function. |
pen |
penalty term, default 200*log(dim(data)[2]). Here dim(data)[2] means length of series (n). |
indicates the most recent changepoint in each series .
MA1.data
1 2 3 4 5 6 7 8 9 10 | #example
library(cpcens)
# The size of series(n) should be greater than 200.
sim=MA1.data(n = 500, N = 100, K = 5, eps = 1,
rho = 0.6, mu = 0, siga = 1, rates = c(NA, 0.2), Mrate = 0)
data=sim$data
N=100
agg = apply( data , 2 , sum )
pagg = PELT.ma( agg , 200*log(dim(data)[2]) )
agg.chpts = rep( rev( pagg$cpts )[1] , N )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.