KF: The classical Kalman filter

Description Usage Arguments Value References Examples

View source: R/KF.R

Description

The classical Kalman filter.

Usage

1
KF(Y, mu_0, Sigma_0 = NULL, A, C, Sigma_Add, Sigma_Inn, epsilon = 1e-06)

Arguments

Y

A list of matrices containing the observations to be filtered.

mu_0

A matrix indicating the mean of the prior for the hidden states.

Sigma_0

A matrix indicating the variance of the prior for the hidden states. It defaults to the limit of the variance of the Kalman filter.

A

A matrix giving the updates for the hidden states.

C

A matrix mapping the hidden states to the observed states.

Sigma_Add

A positive definite matrix giving the additive noise covariance.

Sigma_Inn

A positive definite matrix giving the innovative noise covariance.

epsilon

A positive numeric giving the precision to which the limit of the covariance is to be computed. It defaults to 0.000001.

Value

An rkf S3 class.

References

\insertRef

Kalman1960RobKF

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(RobKF)

set.seed(2019)

A = matrix(c(1), nrow = 1, ncol = 1)
C = matrix(c(1), nrow = 1, ncol = 1)

Sigma_Inn = diag(1,1)*0.01
Sigma_Add = diag(1,1)

mu_0 = matrix(0,nrow=1,ncol=1)

Y_list = Generate_Data(1000,A,C,Sigma_Add,Sigma_Inn,mu_0)

Output = KF(Y_list,mu_0,Sigma_0=NULL,A,C,Sigma_Add,Sigma_Inn)

plot(Output)

RobKF documentation built on July 15, 2021, 5:06 p.m.

Related to KF in RobKF...