Learn R Programming

changepoint.mv (version 1.0.2)

costs: Uses the changepoint locations to determine the penalised cost of the segmented data.

Description

For results obtained using mrc, costs calculates the the total penalised cost for all segments across all variates for different numbers of most recent change point values (p). It also calculates the code length \({\rm log}_{2}n^{p}p^{N}\) and the total of the penalised cost and code length. The result is a data frame containing p, the penalised cost, the code length and the sum of penalised cost and code length. The row in the data frame with the smallest total corresponds to the minimum description length (MDL). See Bardwell, Eckley, Fearnhead and Smith, (2016) for more details about the cost and code length.

Usage

# S4 method for changepoint.mv.mrc.class
costs(x)

Arguments

x

An S4 object as returned by mrc.

Value

Data frame containing cost information as described in the description section (above).

References

doi:10.1080/00401706.2018.1438926changepoint.mv

Examples

Run this code
# NOT RUN {
library(changepoint.mv)
data(mrcexample)
res<-mrc(mrcexample,pmax=8)
costs(res)

# }

Run the code above in your browser using DataLab