SS.solve.SMW: Optimal Estimation

Description Usage Arguments Details Value Note Examples

Description

Solve a state space system using the Kalman Filter.

Usage

1
SS.solve.SMW(Z, F, H, Q, inv.R, length.out, P0, beta0=0)

Arguments

Z

A T x n data matrix.

F

The state matrix. A scalar, or vector of length d, or a d x d matrix. When scalar, F is constant diagonal. When a vector, F is diagonal.

H

The measurement matrix. Must be n x d.

Q

The state variance. A scalar, or vector of length d, or a d x d matrix. When scalar, Q is constant diagonal. When a vector, Q is diagonal.

inv.R

The inverse of the measurement variance. A scalar, or vector of length n, or a n x n matrix. When scalar, inv.R is constant diagonal. When a vector, inv.R is diagonal.

length.out

Scalar integer.

P0

Initial a priori prediction error.

beta0

Initial state value. A scalar, or a vector of length d.

Details

H is the master argument from which system dimensionality is determined. Otherwise identical to SS.solve, except that the Woodbury identity is used for inversion. This method offers a computationally reduced means of solving the system realization of interest; however, this method must be supplied with the inverse of the measurement variance matrix, R – not R.

Value

A named list.

B.apri

A T x d matrix, the ith row of which is the best state estimate prior to observing data at time i.

B.apos

A T x d matrix, the ith row of which is the best state estimate given the observation at time i.

Note

For a definition of the system of interest, please see SSsimple.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(999)
H <- matrix(1)
R <- 7
inv.R <- 1 / R
x <- SS.sim( 1, H, 1, R, 100, 0 )
y <- SS.solve.SMW( x$Z, 1, H, 1, inv.R, 100, 10^5, 0 )

z.hat <- t( H %*% t( y$B.apri ) )

plot( x$Z, type="l", col="blue" )
points( z.hat[ ,1], type="l", col="red" )

SSsimple documentation built on Dec. 7, 2019, 9:06 a.m.