cpop.crops.models | R Documentation |
Obtains a list of models corresponding to each of the beta (penalty) values considered during a cpop.crops
analysis.
cpop.crops.models(object)
object |
An S4 object of type |
A list of S4 cpop.class
objects corresponding to the beta values considered by a cpop.crops
analysis.
crops-articlecpop
\insertRefcrops-packagecpop
\insertRefcpop-jss-article-2024cpop
cpop.crops
,crops
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.