MDL: Maximum Descriptive Length

View source: R/aaa_generics.R

MDLR Documentation

Maximum Descriptive Length

Description

Generic function to compute the Maximum Descriptive Length for a changepoint detection model.

Usage

MDL(object, ...)

## Default S3 method:
MDL(object, ...)

## S3 method for class 'logLik'
MDL(object, ...)

Arguments

object

any object from which a log-likelihood value, or a contribution to a log-likelihood value, can be extracted.

...

some methods for this generic function require additional arguments.

Details

P_{MDL}(\tau) = \frac{a(\theta_\tau)}{2} \cdot \sum_{j=0}^m \log{\left(\tau_j - \tau_{j-1} \right)} + 2 \ln{m} + \sum_{j=2}^m \ln{\tau_j} + \left( 2 + b(\theta_\tau) \right) \ln{n}

where a(\theta) is the number of parameters in \theta that are fit in each region, and b(\theta) is the number of parameters fit to the model as a whole.

These quantities should be base::attributes() of the object returned by logLik().

Value

A double vector of length 1

See Also

Other penalty-functions: BMDL(), HQC(), MBIC(), SIC()

Examples

MDL(fit_meanshift_norm_ar1(CET, tau = c(42, 330)))
MDL(fit_trendshift(CET, tau = c(42, 81, 330)))

tidychangepoint documentation built on April 4, 2025, 4:31 a.m.