cpop.crops.models-methods: Extract the cpop models created by cpop.crops

cpop.crops.modelsR 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

\insertRef

crops-articlecpop

\insertRef

crops-packagecpop

\insertRef

cpop-jss-article-2024cpop

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)
}



grosed/cpop documentation built on May 31, 2024, 11:16 a.m.