Learn R Programming

KFAS (version 0.9.9)

predict.KFS: Estimate the Missing Observations of a State Space Model

Description

Function predict.KFS computes the expected values of missing observations given the observed data.

Usage

## S3 method for class 'KFS':
predict(object, fill = FALSE, ...)

Arguments

object
object of class KFS ie. the output from function KFS.
fill
If FALSE, only predictions of missing observations are returned, and other time points are markes as NA. This is convinient for plotting purposes. If TRUE, original time series is filled with predicted values for missing observations, and $F_t = 0
...
Ignored.

Value

  • A list with the following components:
  • yTime series object with missing observations replaced by $E(y_t|y)$.
  • FCovariances $Cov(y_t|y)$. Note that this is the usual multivariate version of $F_t$ given by $Z_tP_tZ'_t + H_t$, not the univariate version given by KFS.