mrc.mean: Segmenting data generated from AR1.data/MA1.data using PELT...

Description Usage Arguments Value References See Also Examples

View source: R/aut(mrc).R

Description

To find changepoints using mrc method, segmenting the data (obtained from AR1.data/MA1.data) using PELT (Killick, Fearnhead and Eckley 2012) function in such a way that cost is minimum .

Usage

1
mrc.mean(data, beta = 1.5 * log(n))

Arguments

data

a censored data matrix obtained from AR1.data/ MA1.data .

beta

default 1.5*log(n).

Value

data

References

Killick, R., Fearnhead, P., and Eckley, I. A. (2012). Optimal detection of changepoints with a linear computational cost. Journal of the American Statistical Association, 107(500):1590–1598.

See Also

AR1.data, MA1.data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#example(right censoring)
library(cpcens)
n=500
N=100
# Generate censored data using AR model
# The size 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
mrc = mrc.mean( data , beta = 1.5*log(n) )
mrc
#example(left censoring)
library(cpcens)
n=500
N=100
# Generate censored data using MA model
# The size of series(n) should be greater than 200.
sim=MA1.data(n = 500, N = 100, K = 5, eps = 1,
rho = 0.4, mu = 0, siga = 1, rates = c(0.6,NA), Mrate = 0)
data=sim$data
mrc = mrc.mean( data , beta = 1.5*log(n) )
mrc

cpcens documentation built on Aug. 2, 2019, 5:05 p.m.

Related to mrc.mean in cpcens...