h-step in-sample forecasts for time series models.
Returns h-step forecasts for the data used in fitting the model.
## S3 method for class 'ARFIMA' fitted(object, h = 1, ...) ## S3 method for class 'Arima' fitted(object, h = 1, ...) ## S3 method for class 'ar' fitted(object, ...) ## S3 method for class 'bats' fitted(object, h = 1, ...) ## S3 method for class 'ets' fitted(object, h = 1, ...) ## S3 method for class 'modelAR' fitted(object, h = 1, ...) ## S3 method for class 'nnetar' fitted(object, h = 1, ...) ## S3 method for class 'tbats' fitted(object, h = 1, ...)
object |
An object of class " |
h |
The number of steps to forecast ahead. |
... |
Other arguments. |
A time series of the h-step forecasts.
Rob J Hyndman & Mitchell O'Hara-Wild
fit <- ets(WWWusage) plot(WWWusage) lines(fitted(fit), col='red') lines(fitted(fit, h=2), col='green') lines(fitted(fit, h=3), col='blue') legend("topleft", legend=paste("h =",1:3), col=2:4, lty=1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.