rstandard.KFS: Extract Standardized Residuals from KFS output
Description
Extract Standardized Residuals from KFS outputUsage
## S3 method for class 'KFS':
rstandard(model, type = c("recursive", "deviance", "pearson",
"state"), ...)
Arguments
type
Type of residuals. See details.
Details
For object of class KFS, several types of standardized
residuals can be computed: - 'recursive': One-step ahead prediction residuals
defined as$$v_{t,i})/\sqrt{F_{i,t}},$$with residuals
being undefined in diffuse phase. Only supported for fully
Gaussian models.
- 'pearson': Standardized Pearson residuals$$(y_{t,i}-\theta_{t,i})/\sqrt{V(\mu)_{t,i}\phi_i\sqrt{1-h_{t,i}}},
\quad
i=1,\ldots,p,t=1,\ldots,n,$$where$V(\mu_{t,i})$is the variance function of
the model,$\phi_i$is the dispersion
parameter and$h_{t,i}$is the hat value. For
gaussian models, these coincide with the smoothed$\epsilon$disturbance residuals.
- 'state': Residuals based on the smoothed disturbance
terms$\eta$are defined as$$L^{-1}_t \hat \eta_t,
\quad t=1,\ldots,n,$$where$L_t$is the lower triangular matrix from
Cholesky decomposition of$V_{\eta,t}$.
- 'deviance': Deviance residuals.