residuals.KFS: Extract Residuals of KFS output
Description
Extract Residuals of KFS outputUsage
## S3 method for class 'KFS':
residuals(object, type = c("recursive", "deviance", "pearson",
"response", "state"), ...)
Arguments
type
Character string defining the type of
residuals.
Details
For object of class KFS, several types of residuals can be
computed:
- 'recursive': One-step ahead prediction
residuals$$v_{t,i}),$$with residuals being undefined
in diffuse phase. Only supported for fully Gaussian models.
- 'response': Data minus fitted values,$y-E(y)$.
- '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 model.
- 'state': Residuals based on the smoothed disturbance
terms$\eta$are defined as$$\hat \eta_t, \quad
t=1,\ldots,n,$$.
- 'deviance': Deviance residuals.