Learn R Programming

tfarima (version 0.4.1)

kf: Kalman filter for SS models

Description

kf computes the innovations and the conditional states with the Kalman filter algorithm.

Usage

kf(mdl, z = NULL, x0 = NULL, P0 = NULL, filtered = FALSE, ...)

Value

A list with the innovations, the conditional states and their covariance matrices.

Arguments

mdl

an object of class ssm.

z

time series to be filtered when it differs from the model series.

x0

initial state vector.

P0

covariance matrix of x1.

filtered

logical. If TRUE, the filtered states x_{t|t} and their covariance matrices P_{t|t} are returned. Otherwise, the forecasted states x_{t|t-1} and thier covariance matrices P_{t|t-1} are returned.

...

additional arguments.