View source: R/residuals.KFS.R
residuals.KFS | R Documentation |
Extract Residuals of KFS output
## S3 method for class 'KFS'
residuals(object, type = c("recursive", "pearson", "response", "state"), ...)
object |
KFS object |
type |
Character string defining the type of residuals. |
... |
Ignored. |
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}-f(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}-\theta_{t,i})/\sqrt{V(\mu_{t,i})},
\quad i=1,\ldots,p,t=1,\ldots,n,
where V(\mu_{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
\eta
are defined as
\hat \eta_t, \quad t=1,\ldots,n.
Only defined for fully Gaussian models.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.