cpts-BinSeg-method: Obtain the changepoints estimated by the analysis.

Description Usage Arguments Value Details

Description

Obtain the changepoints estimated by the analysis.

Usage

1
2
## S4 method for signature 'BinSeg'
cpts(object, ncpts = seq_len(nrow(object@models_summary)))

Arguments

object

A valid BinSeg object.

ncpts

The number of changepoints to return (from 1 up to the number of changepoints indicated in BinSegModel).

Value

A numeric vector

Details

The changepoints are not sorted. Instead, they are arranged according to the decrease in cost. The first changepoint will always be the last data point. From there, the next changepoint will be the one that decreases the most the overall cost of the model, if there was only one changepoint, and so on.


diego-urgell/BinSeg documentation built on Dec. 19, 2021, 11:11 p.m.