kf: Kalman filter for SS models

View source: R/stsm.R

kfR Documentation

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, ...)

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.

Value

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


tfarima documentation built on Nov. 5, 2025, 7:43 p.m.