cusum: A C++ implementation of the CUSUM statistic

Description Usage Arguments Author(s) References Examples

View source: R/RcppExports.R

Description

This function is an internal C++ function wrapped by finner.prod.iter.

Usage

1
cusum(x)

Arguments

x

A time series

Author(s)

K. Korkas and P. Fryzlewicz

References

K. Korkas and P. Fryzlewicz (2017), Multiple change-point detection for non-stationary time series using Wild Binary Segmentation. Statistica Sinica, 27, 287-311. (http://stats.lse.ac.uk/fryzlewicz/WBS_LSW/WBS_LSW.pdf)

Examples

1
2
3
4
5
6
 
cps=seq(from=1000,to=2000,by=200)
y=sim.pw.arma(N =3000,sd_u = c(1,1.5,1,1.5,1,1.5,1),
b.slope=rep(0.99,7),b.slope2 = rep(0.,7), mac = rep(0.,7),br.loc = cps)[[2]]
z=ews.trans(y,scales=c(11,9,8,7,6))
ts.plot(abs(wbsts::cusum(z[10:2990,2])))

wbsts documentation built on July 1, 2020, 5:23 p.m.