Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

residuals.KFS

Extract Residuals of KFS output


Description

Extract Residuals of KFS output

Usage

## S3 method for class 'KFS'
residuals(object, type = c("recursive", "pearson", "response", "state"), ...)

Arguments

object

KFS object

type

Character string defining the type of residuals.

...

Ignored.

Details

For object of class KFS, several types of residuals can be computed:

  • "recursive": One-step-ahead prediction residuals v[t,i]=y[t,i]-Z[t,i]a[t,i]. For non-Gaussian case recursive residuals are computed as y[t]-Z[t]a[t], i.e. non-sequentially. Computing recursive residuals for large non-Gaussian models can be time consuming as filtering is needed.

  • "pearson":

    (y[t,i]-θ[t,i])V(μ[t,i])^(-0.5), i=1,…,p, t=1,…,n,

    where V(μ[t,i]) is the variance function of the series i

  • "response": Data minus fitted values, y-E(y).

  • "state": Residuals based on the smoothed disturbance terms η are defined as

    \hat η[t], t=1,…,n.

    Only defined for fully Gaussian models.


KFAS

Kalman Filter and Smoother for Exponential Family State Space Models

v1.4.5
GPL (>= 2)
Authors
Jouni Helske [aut, cre] (<https://orcid.org/0000-0001-7130-793X>)
Initial release
2021-05-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.