forecast.ARml | R Documentation |
Forecasting using ARml model
## S3 method for class 'ARml' forecast(object, h = frequency(object$y), xreg = NULL, level = c(80, 95), ...)
object |
An object of class "ARml", the result of a call to ARml. |
h |
forecast horizon |
xreg |
Optionally, a numerical vector or matrix of future external regressors |
level |
Confidence level for prediction intervals. |
... |
Ignored |
A list class of forecast containing the following elemets
x : The input time series
method : The name of the forecasting method as a character string
mean : Point forecasts as a time series
lower : Lower limits for prediction intervals
upper : Upper limits for prediction intervals
level : The confidence values associated with the prediction intervals
model : A list containing information about the fitted model
newxreg : A matrix containing regressors
Resul Akay
library(caretForecast) train_data <- window(AirPassengers, end = c(1959, 12)) test <- window(AirPassengers, start = c(1960, 1)) ARml(train_data, caret_method = "lm", max_lag = 12) -> fit forecast(fit, h = length(test), level = c(80,95)) -> fc autoplot(fc)+ autolayer(test) accuracy(fc, test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.