StatBean Name: TimeSeriesForecast

Purpose: Forecasts values of a time series.

DataSource: any.

Read/Write Properties
NameTypeDescriptionPossible ValuesDefault Value
arimaARintOrder of nonseasonal autoregressive term in an ARIMA model.0-40
arimaDintOrder of nonseasonal differencing in an ARIMA model.0-20
arimaIncludeConstantbooleanWhether to include a constant term when estimating ARIMA models.true,falsetrue
arimaMAintOrder of nonseasonal moving average term in an ARIMA model.0-40
arimaSARintOrder of seasonal autoregressive term in an ARIMA model.0-40
arimaSDintOrder of seasonal differencing in an ARIMA model.0-20
arimaSMAintOrder of seasonal moving average term in an ARIMA model.0-40
backforecastingbooleanWhether to use backforecasting when estimating ARIMA models.true,falsetrue
confidenceLeveldoubleLevel of confidence for the prediction and confidence limits, as a percentage.0.0001-99.999995.0
modelTypeStringType of model to use for forecasting."Random Walk","Mean","Linear Trend",
"Quadratic Trend","Exponential Trend",
"SCurve","MA","EWMA",
"Linear Smoothing","Quadratic Smoothing",
"Holts Smoothing","Winters Smoothing"
"ARIMA"
"Random Walk"
movingAverageSpanintNumber of terms in the MA smoother.2+5
numberOfForecastsintThe number of time periods to forecast.1+12
optimizebooleanWhether to optimize the exponential smoothing parameters.true,falsetrue
samplingIntervaldoubleThe length of time between consecutive data values.Any double > 0.01.0
seasonalLengthintThe number of time periods comprising a season.1+1
smoothingParameter1doubleFirst parameter for exponential smoothing.0-1, exclusive.0.1
smoothingParameter2doubleSecond parameter for exponential smoothing.0-1, exclusive.0.1
smoothingParameter3doubleThird parameter for exponential smoothing.0-1, exclusive.0.1
startTimeStringThe value of time associated with row 1.Any string resulting in the proper type of value."1.0"
timeScaleStringThe type of time units."Year","Quarter","Month","Day",
"Hour","Minute","Second","Other"
"Other"
timeSeriesVariableNameStringThe name of the column with data values to be plotted.Any string.""
withholdForValidationintThe number of time periods to withhold from estimation and use for validation statistics.0+0

Other Public Methods
NameDescriptionArgumentsReturn Value
int getArimaDegreesOfFreedom()Returns the residual degrees of freedom for an ARIMA model.None.Degrees of freedom.
int getArimaIterations()Returns the number of iterations used to fit an ARIMA model.None.Iterations.
double getArimaMeanSquaredError()Returns the residual mean squared error when fitting an ARIMA model.None.MSE.
double getArimaParameterEstimate(int i)Returns the estimate of the i-th parameter in an ARIMA model (in the order AR,MA,SAR,SMA,mean).Index.Estimate.
double getArimaStandardError(int i)Returns the standard error of the estimate of the i-th parameter in an ARIMA model.Index.Standard error.
double getForecastData(int row)Returns the forecasted values.Row index (0 origin).Forecasted value.
double getLowerLimit(int row)Returns the lower confidence limits for the forecasts.Row index (0 origin).Lower limit.
double getMAE()Returns the mean absolute error.None.Calculated statistic.
double getMAPE()Returns the mean absolute percentage error.None.Calculated statistic.
double getME()Returns the mean error.None.Calculated statistic.
double getMPE()Returns the mean percentage error.None.Calculated statistic.
double getMSE()Returns the mean squared error.None.Calculated statistic.
double getRMSE()Returns the root mean squared error.None.Calculated statistic.
int getNumberOfMissingValuesReplaced()Returns the number of missing values replaced with estimates.None.Number replaced.
double getOriginalData(int row)Returns the original data values.Row index (0 origin).Original value.
double getResidual(int row)Returns the one step ahead forecast errors.Row index (0 origin).Residual.
int getStatisticsSampleSize()Returns the number of values used to calcualtye the statistics.None.Number of data values.
double getUpperLimit(int row)Returns the upper confidence limits for the forecasts.Row index (0 origin).Upper limit.
double getValidationMAE()Returns the mean absolute error during the validation period.None.Calculated statistic.
double getValidationMAPE()Returns the mean absolute percentage error during the validation period.None.Calculated statistic.
double getValidationME()Returns the mean error during the validation period.None.Calculated statistic.
double getValidationMPE()Returns the mean percentage error during the validation period.None.Calculated statistic.
double getValidationMSE()Returns the mean squared error during the validation period.None.Calculated statistic.
double getValidationRMSE()Returns the root mean squared error during the validation period.None.Calculated statistic.
int getValidationSampleSize()Returns the number of values used to calcualtye the validation statistics.None.Number of data values.

Output Variables
NameDescription
ResidualOne step ahead forecast errors.
ForecastForecasted data values.


Code Sample
- see TimeSeriesForecastPlot.