Learn R Programming

cpcens (version 0.1.0)

multiple.mrc1: Most recent changepoints from mrc method.

Description

Detecting most recent changepoints using mrc method consisting of many related univariate timeseries (Bardwell, Eckley, Fearnhead, and Smith, 2016) and pools information across the time-series by solving the K-median problem using tb.raw (Teitz and Bart, 1968).

Usage

multiple.mrc1(mrc, pmax = 10, alpha = 2, elbow.thresh = 0.5,
  n = 144)

Arguments

mrc

data obtained from mrc.mean1

pmax

Maximum number of most recent changepoints to search for. Default value pmax=10.

alpha

The variable penalty used to penalise the addition of a given changepoint into a given variable. Default value alpha = 2.

elbow.thresh

default 0.5

n

length of series

Value

indicates the most recent changepoint in each series .

See Also

mrc.mean1

Examples

Run this code
# NOT RUN {
#example(right censoring)
library(cpcens)
data("censoredex")
data=censoredex
n=144
N=100
mrc = mrc.mean1( data , beta = 1.5*log(n) )
c = multiple.mrc1( mrc , pmax=10, alpha = 2 , elbow.thresh = 0.5 , n=144)
p.hat = c$MDL
mrc.chpts = c$locs[[p.hat]][ c$affected[[p.hat]] ]
mrc.chpts
# }

Run the code above in your browser using DataLab