View source: R/FcSeasonalArima.R
FcSeasonalArima | R Documentation |
Automatic Forecasting using the seasonal arima method based on the X-13-ARIMA-SEATS standard.
FcSeasonalArima(DataVec, SplitAt, ForecastHorizon, Frequency, Time, PlotIt = TRUE, ...)
DataVec |
[1:n] [1:n] numerical vector or a time series object. If a time series object is given, the argument "Frequency" does not need to be given. |
SplitAt |
Index of row where the DataVec is divided into test and train data. If not given n is used |
ForecastHorizon |
Scalar defining the timesteps to forecast ahead. Beware, it is NOT the internal forecast horizont. |
Frequency |
Either |
Time |
[1:n] character vector of Time in the length of data. Can be ignored if DataVec is a time series object. |
PlotIt |
FALSE (default), do nothing. TRUE: plots the forecast versus test data of time series data. |
... |
Further specification using the |
X-13-ARIMA-SEATS is the standard of the seasonal adjustment software by the US Census Bureau. This function is an easy-to-use wrapper of the function seas
calling the interface.
If n-SplitAt=ForecastHorizon
then forecast is completely on test data.
If ForecastHorizon>n-SplitAt
then a real forecast is made of ForecastHorizon-(n-SplitAt)
steps.
If SplitAt=n
then the complete data set is used in estimating the forecast.
List with
Forecast |
[1:Horizont] object of |
Accuracy |
Accuracy of TestSet against Forecast, if |
TaT |
TrainingSet and TestSet, if |
Model |
Output of |
ForecastMaxlead |
Output of |
The default internal forecast horizont is one year (unless a SEATS seasonal adjustment is requested - then the default is three years of forecasts) and 120 is the maximum. Setting Horizont
lower results in 3 year forecast saved in ForecastMaxlead
.
Michael Thrun
https://www.census.gov/ts/x13as/docX13AS.pdf
https://github.com/christophsax/seasonal/wiki/Examples-of-X-13ARIMA-SEATS-in-R#77-forecast
seas
, series
# Example using a time series object for DataVec
data("AirPassengers")
ForecastHorizon=12
FcSeasonalArima(AirPassengers,SplitAt=length(AirPassengers)-ForecastHorizon,
ForecastHorizon=ForecastHorizon)
# Example using a numerical vector for DataVec
data("ElectricityBRD$Mrd_KWh")
ForecastHorizon=12
FcSeasonalArima(ElectricityBRD$Mrd_KWh,SplitAt = length(ElectricityBRD$Mrd_KWh) - ForecastHorizon,
Frequency='months', ForecastHorizon = ForecastHorizon,
Time=ElectricityBRD$Time)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.