logLik-BinSeg-method: btain the overall costs of the computed models, from 1 up to...

Description Usage Arguments Value

Description

This function returns the overall cost for each one of the models. When you perform a BinSegModel, the models up to the sepcified number of changepoints are computed. This functions returns the cost of each one of them. The first value is the cost of the model without segmentation (remember the first changepoint is the last datapoint). Then, it tells the overall cost with each addition of a segment.

Usage

1
2
## S4 method for signature 'BinSeg'
logLik(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 matrix with the overall cost at each number of changepoints


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