KalmanFilter

KalmanFilter[tproc,data]

filters data using the time series model given by tproc.

Details

  • KalmanFilter allows data to be a list or TemporalData.
  • All the parameters in the time series model tproc must be numeric.
  • KalmanFilter output is decided by the type of the input. The first element of the output is initialized to be zero, so the length of the output agrees with the length of the input.

Examples

open allclose all

Basic Examples  (2)

Filter using an autoregressive model:

Filter noise from a sample path using an ARMA model:

Find filtered data:

Compare the data to the prediction:

Scope  (5)

Use KalmanFilter with TimeSeriesModel:

Compare filtering with given initial values:

Create a sample from a weakly stationary ARMA:

Filter using ARMA with given initial values:

Compare:

Find a filter for a multivariate model and data:

Compare filters using autoregressive and moving-average processes:

Build an autoregressive filter:

Build a moving-average filter:

Compare data to the filters:

Find residuals for a fitted time series model:

Spread of residuals:

Distribution of residuals:

Applications  (2)

Consider the following time series data and determine whether it is adequately modeled by a MAProcess:

The correlation function drops off after lag 3. This is evidence of an MAProcess[3]:

Fit an MAProcess[3] model to the data:

Find the model residuals and determine whether they are normally distributed white noise:

The null hypothesis of normality cannot be rejected:

Analyze residuals in TimeSeriesModel:

Calculate residuals from Kalman filtering:

Compare to residuals from TimeSeriesModelFit:

Properties & Relations  (1)

Kalman filter creates a one-step forecast:

Find a filter for the data:

Calculate one-step-ahead predictions from data parts:

Compare the paths:

Possible Issues  (1)

KalmanFilter requires the process to have all parameters numeric:

The data can be symbolic:

Introduced in 2012
 (9.0)