Learn R Programming

dlmodeler (version 1.4-2)

AIC.dlmodeler.fit: Log-likelihood and AIC of a model

Description

Returns the log-likelihood or the AIC for a fitted DLM object.

Usage

"logLik"(object, ...)
"logLik"(object, ...)
"AIC"(object, ..., k = 2)

Arguments

object
fitted DLM as given by a call to one of the dlmodeler.fit() functions, or filtered DLM as given by a call to dlmodeler.filter.
...
not used.
k
penalty parameter.

Value

Returns a numeric value with the corresponding log-likelihiid, AIC, BIC, or ..., depending on the value of k.

Details

The AIC is computed according to the formula $-2*log(likelihood) + k*npar$, where $npar$ represents the number of parameters in the fitted model, and $k = 2$ for the usual AIC, or $k = log(n)$ ($n$ the number of observations) for the BIC or SBC (Schwarz's Bayesian criterion).

References

Durbin, and Koopman, Time Series Analysis by State Space Methods, Oxford University Press (2001), page 152.

See Also

dlmodeler.fit.MLE

Examples

Run this code
## Example TODO

Run the code above in your browser using DataLab