Kalman_filter_random_walk: Kalman filter applied to multivariate random walk.

Description Usage Arguments Value

View source: R/kalman_filter_random_walk.R

Description

Function that applies the Kalman filter to four observations assuming the state is a univariate random walk. The observation and state equations are \bm{y}_t = Fx_t + \bm{v}_t and x_t = x_{t-1} + w_t, respectively.

Usage

1
2
Kalman_filter_random_walk(ts, F = c(1, 1, 1, 1), R = 0.1 * diag(4),
  Q = 0.1, m0 = 0, C0 = 1)

Arguments

ts

A matrix containing the data from a multivariate time series.

R

The covariance of the measurement noise.

Q

The covariance of the state noise.

m0

Initial state.

C0

Initial covariance of the state process.

Value

Returns a list of the state values and covariances.

state_values

The state values.

state_cov

The state covariances.


hannea/monitor documentation built on May 14, 2017, 10:26 p.m.