Automatic Time Series Modeling Package

DIAGNOSE Methods

DIAGNOSE.Initialize Method

  • rc=obj.Initialize (TSDFObject);

Initializes a DIAGNOSE instance and specifies the time series data for the DIAGNOSE instance.

Input Arguments

You must specify the following input argument:

TSDFObject

specifies the TSDF object that holds the time series data to be diagnosed by the DIAGNOSE instance. This method retains only a reference to the TSDF object’s time series data frame and does not make a deep copy of its time series data.

DIAGNOSE.nmodels Method

  • nmodels=obj.nmodels ();

Returns the number of models that are generated from the DIAGNOSE.Run method. A missing value indicates that a DIAGNOSE.Run method has not been successfully completed since the last call to the DIAGNOSE.Initialize method.

Arguments

There are no arguments associated with this method.

DIAGNOSE.Replay Method

  • rc=obj.Replay (INDIAGObject);

Restores a previously stored diagnostic control specification from the specified INDIAGObject. This method establishes the diagnostic control settings in a model identification run of the DIAGNOSE instance. For more information about storing diagnostic control specifications, see the section OUTDIAG Object.

Input Arguments

You must specify the following input argument:

INDIAGObject

specifies the INDIAG instance that defines the source of the diagnostic control specification to restore.

DIAGNOSE.Run Method

  • rc=obj.Run ();

Runs model diagnosis for the time series data frame that is specified for the DIAGNOSE instance.

Table 5 shows the model families that might be considered during the diagnostic process.

Table 5: Model Families for the DIAGNOSE.Run Method

Family Description
ARIMAX ARIMA model that includes predictors that use ARIMA-REG identification order
ESM Seasonal and nonseasonal exponential smoothing models
IDM Intermittent demand (IDM) model
REGARIMA ARIMA model that includes predictors that use REG-ARIMA identification order
UCM UCM model with predictors


If you specify a DIAGSPEC object by using the SetSpec method, then the DIAGSPEC object controls the model families that are considered. Otherwise, by default, the ARIMAX and ESM families are considered.

Arguments

There are no arguments associated with this method.

DIAGNOSE.SetOption Method

  • rc=obj.SetOption ('Name', Value <,'Name', Value,…>);

Specifies named options for the DIAGNOSE instance.

Input Arguments

You must specify at least one of the following 'Names' and its associated Value:

'BACK'

takes a nonnegative integer Value that specifies the back region for model performance. If BACK=n and the number of observations is T, then the first upper T minus n observations are used to diagnose a series. The default value is 0.

'CRITERION'

takes a string Value that specifies the selection statistic mnemonic. You can specify one of the following Values:

AADJRSQ

specifies Amemiya’s adjusted R-square.

ADJRSQ

specifies the adjusted R-square.

AIC

specifies Akaike’s information criterion.

AICC

specifies the finite-sample corrected AIC.

APC

specifies Amemiya’s prediction criterion.

GMAPE

specifies the geometric mean absolute percentage error.

GMAPES

specifies the geometric mean absolute error as a percentage of standard deviation.

GMAPPE

specifies the geometric mean absolute predictive percentage error.

GMASPE

specifies the geometric mean absolute symmetric percentage error.

GMRAE

specifies the geometric mean relative absolute error.

IMASE

specifies the in-sample mean absolute scaled error.

MAE

specifies the mean absolute error.

MAPE

specifies the mean absolute percentage error.

MAPES

specifies the mean absolute error as a percentage of standard deviation.

MAPPE

specifies the symmetric mean absolute predictive percentage error.

MASE

specifies the mean absolute scaled error.

MAXERR

specifies the maximum error.

MAXPE

specifies the maximum percentage error.

MAXPPE

specifies the maximum predictive percentage error.

MAXRE

specifies the maximum relative error.

MAXSPE

specifies the maximum symmetric percentage error.

MDAPE

specifies the median absolute percentage error.

MDAPES

specifies the median absolute error as a percentage of standard deviation.

MDAPPE

specifies the median absolute predictive percentage error.

MDRAE

specifies the median relative absolute error.

MDASPE

specifies median absolute symmetric percentage error.

ME

specifies the mean error.

MINERR

specifies the minimum error.

MINPE

specifies the minimum percentage error.

MINPPE

specifies the minimum predictive percentage error.

MINRE

specifies the minimum relative error.

MINSPE

specifies the minimum symmetric percentage error.

MPE

specifies the mean percentage error.

MPPE

specifies the mean predictive percentage error.

MRAE

specifies the mean relative absolute error.

MRE

specifies the mean error.

MSE

specifies the mean square error.

MSPE

specifies the mean symmetric percentage error.

RMSE

specifies the root mean square error.

RMSSE

specifies the root mean square scaled error.

RSQUARE

specifies the R-square.

RWRSQ

specifies the random walk R-square.

SMAPE

specifies the symmetric mean absolute percentage error.

SBC

specifies the Schwarz Bayesian information criterion.

SSE

specifies the sum of square error.

UMSE

specifies the unbiased mean square error.

URMSE

specifies the unbiased root mean square error.

The default value is RMSE.

'HOLDOUT'

takes a nonnegative integer Value that specifies the holdout region for model selection. The default value is 0.

'HOLDOUTPCT'

takes a numeric Value between 0 and 100 that specifies the size of the holdout sample as a percentage of the length of the dependent time series. If HOLDOUT=5 and HOLDOUTPCT=10, the size of the holdout sample is min left-parenthesis 5 comma 0.1 upper T right-parenthesis, where T is the length of the dependent time series after the beginning and ending missing values are removed. The default value is a missing value.

'HORIZON'

takes a numeric Value that specifies the forecast horizon reference time that is used to diagnose intermittent demand models (IDMs). When you specify a missing value, the forecast horizon reference time is automatically set as the first time period after the last observation, either missing or nonmissing, of the dependent series. Consequently, in this case, the time span of the historical region that is used to diagnose the best IDM is the same as the time span of the accumulated BY group. Currently, this option does not apply to the diagnosis of non-IDMs, such as ARIMA models, exponential smoothing models (ESMs), and unobserved component models (UCMs). Consequently, for non-IDMs, the Value is ignored, and the forecast horizon reference time is automatically set as the first time period after the last nonmissing observation of the dependent series. That is, the trailing missing values in the dependent series are discarded from the historical region that is used to diagnose the non-IDMs. Also, see the 'IDMTEST.LENGTH' option in the DIAGSPEC.SetIDM method for information about how the value of this option affects the results of the intermittency test that the DIAGNOSE.Run method performs on the dependent series. The default value is the value of the 'HORIZON' option that you specify via the TSDF.SetOption method.

'MINOBS.SEASON'

takes a numeric Value greater than or equal to 1 that specifies the minimum number of nonmissing observations needed for a seasonal model to be fitted to any series. The value is specified in seasonal cycles. For example, if MINOBS.SEASON=2, and the series is monthly, then 24 nonmissing observations are required because there are 12 observations in a seasonal cycle for a monthly series. The default value is 2.

'MINOBS.TREND'

takes a numeric Value greater than 0 that specifies the minimum number of nonmissing observations needed for a trend model to be fitted to any series. The default value is 1.

DIAGNOSE.SetSpec Method

  • rc=obj.SetSpec (DIAGSPECObject);

Specifies diagnostic control options for the DIAGNOSE instance. Modified control settings in the DIAGSPECObject are copied into the control settings for the DIAGNOSE instance for use by the next DIAGNOSE.Run method call.

Input Arguments

You must specify the following input argument:

DIAGSPECObject

specifies the DIAGSPEC instance that defines the diagnostic options to be used by the DIAGNOSE instance.

Last updated: June 04, 2026