cpop.crops.models {cpop}R Documentation

Extract the cpop models created by cpop.crops

Description

Obtains a list of models corresponding to each of the beta (penalty) values considered during a cpop.crops analysis.

Usage

cpop.crops.models(object)

Arguments

object

An S4 object of type cpop.crops.class produced by cpop.crops.

Value

A list of S4 cpop.class objects corresponding to the beta values considered by a cpop.crops analysis.

References

Haynes K, Eckley IA, Fearnhead P (2017). “Computationally Efficient Changepoint Detection for a Range of Penalties.” Journal of Computational and Graphical Statistics, 26(1), 134-143. doi:10.1080/10618600.2015.1116445.

Grose D, Fearnhead P (2021). crops: Changepoints for a Range of Penalties (CROPS). R package version 1.0.1, https://CRAN.R-project.org/package=crops.

See Also

cpop.crops,crops

Examples


library(cpop)

set.seed(1)
n <- 500
x <- 1:n
m <- 10
mu <- simchangeslope(x,changepoints=(n/(m+1))*0:m,change.slope=c(0.1,0.2*(-1)^(1:m)),sd=0)
epsilon <- rnorm(n+2)
y <- mu+(epsilon[1:n]+epsilon[2:(n+1)]+epsilon[3:(n+2)])/sqrt(3)
res.crops <- cpop.crops(y,x,beta_min=0.5*log(length(y)),beta_max=40*log(length(y)))
models <- cpop.crops.models(res.crops)
for(m in models)
{
  plot(m)
}



[Package cpop version 1.0.6 Index]