Learn R Programming

cpcens (version 0.1.0)

Bin_segAR: Most recent changepoints from dcbs method using censored AR timeseries.

Description

Detecting most recent changepoints from double CUSUM binary segmentation (DCBS) method (Cho, 2016) after generating censored data from AR model. The DCBS method focuses on finding the position of detected changepoints. The consistency of the double CUSUM statistic based on the binary segmentation algorithm that is established in terms of both number and locations of estimated changepoints.

Usage

Bin_segAR(data, beta = 10)

Arguments

data

a censored data matrix obtained from AR1.data.

beta

threshold for testing whether or not a change is significant, default 10.

Value

indicates the most recent changepoint in each series.

See Also

AR1.data

Examples

Run this code
# NOT RUN {
library(cpcens)
#example(right censoring)
# The length of series(n) should be greater than 200.
sim=AR1.data(n = 500, N = 100, K = 5, eps = 1,
rho = 0.4, mu = 0, siga = 1, rates = c(NA, 0.4), Mrate = 0)
data=sim$data
ans = Bin_segAR(data,beta=10)
# }

Run the code above in your browser using DataLab