Description Usage Arguments Details Value Author(s) See Also Examples
Returns time series of residuals from a fitted model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## S3 method for class 'ar'
residuals(object, type=c("innovation","response"),...)
## S3 method for class 'Arima'
residuals(object, type=c("innovation","response","regression"), h=1, ...)
## S3 method for class 'bats'
residuals(object, type=c("innovation","response"), h=1, ...)
## S3 method for class 'ets'
residuals(object, type=c("innovation","response"), h=1, ...)
## S3 method for class 'forecast'
residuals(object, type=c("innovation","response"), ...)
## S3 method for class 'fracdiff'
residuals(object, type=c("innovation","response"), ...)
## S3 method for class 'nnetar'
residuals(object, type=c("innovation","response"), h=1, ...)
## S3 method for class 'stlm'
residuals(object, type=c("innovation","response"), ...)
arima.errors(object)
|
object |
An object containing a time series model of class |
type |
Type of residual. |
h |
If |
... |
Other arguments not used. |
Innovation residuals correspond to the white noise process that drives the evolution of the time series model. Response residuals are the difference between the observations and the fitted values (equivalent to h
-step forecasts). For functions with no h
argument, h=1
. For homoscedastic models, the innovation residuals and the response residuals for h=1
are identical. Regression residuals are available for regression models with ARIMA errors, and are equal to the original data minus the effect of the regression variables. If there are no regression variables, the errors will be identical to the original series (possibly adjusted to have zero mean).
arima.errors
is a deprecated function which is identical to residuals.Arima(object, type="regression")
.
A ts
object
Rob J Hyndman
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.