Learn R Programming

dlm (version 1.1-6)

dlmLL: Log likelihood evaluation for a state space model

Description

Function that computes the log likelihood of a state space model.

Usage

dlmLL(y, mod, debug=FALSE)

Value

The function returns the negative of the loglikelihood.

Arguments

y

a vector, matrix, or time series of data.

mod

an object of class "dlm", or a list with components m0, C0, FF, V, GG, W defining the model and the parameters of the prior distribution.

debug

if debug=TRUE, the function uses R code, otherwise it uses faster C code.

Warning

The observation variance V in mod must be nonsingular.

Author

Giovanni Petris GPetris@uark.edu

Details

The calculations are based on singular value decomposition. Missing values are allowed in y.

References

Durbin and Koopman, Time series analysis by state space methods, Oxford University Press, 2001.

See Also

dlmMLE, dlmFilter for the definition of the equations of the model.

Examples

Run this code
##---- See the examples for dlmMLE ----

Run the code above in your browser using DataLab