model.fixednum | R Documentation |
Return a solution with the given number of change-points or change-point-type features from the solution path
model.fixednum(cptpath.object, fixednum = NULL)
cptpath.object |
A solution-path object, returned by a |
fixednum |
The number of change-points or change-point-type features |
The model selection method which returns results with a given number of change-points or change-point-type features. If there are multiple such elements on the solution path, the one with the smaller residual sum of squares will be returned. On the other hand, if no such element exists, an empty set (i.e. with no change-points) will be returned.
An S3 object of class cptmodel
, which contains the following fields:
solution.path |
The solution path method used to obtain |
type |
The model type used, inherited from the given |
model.selection |
The model selection method used to return the final change-point or change-point-type feature estimators object, here its value is |
no.of.cpt |
The number of estimated features in the mean of the vector |
cpts |
The locations of estimated features in the mean of the vector |
est |
An estimate of the mean of the vector |
sol.idetect
, sol.not
, sol.tguh
, sol.wbs
, sol.wbs2
, sol.wcm
, breakfast
x <- c(rep(0, 100), rep(1, 100), rep(0, 100)) + rnorm(300)
model.fixednum(sol.wbs(x),2)
model.fixednum(sol.not(x),2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.