Multistage Model Settings

You can change the following settings in the Options pane of the pipeline. For more information, see Options Pane.

Note: This modeling node requires a license for SAS Viya.

General Settings

Highest level modeled in Stage 1

Specifies an integer indicating the BY variable in the modeling hierarchy (for example, CATEGORY) to use as the high level for forecasts in Stage 1. The integer 0 indicates the top level node in the modeling hierarchy. If no value is specified for this parameter, no high-level forecasts in Stage 1 are generated.

Lowest level modeled in Stage 1

Specifies an integer indicating the BY variable in the modeling hierarchy (for example, PRODUCT) to use as the lowest level for forecasts in Stage 1. The integer 0 indicates the top level node in the modeling hierarchy. By default, this parameter value is the BY variable that is the second from the lowest in the hierarchy.

Feature Extraction Settings

Stage 1 and Stage 2

Select the model and settings for the two stages of forecasting.

Feature extraction model

Select either a Regression or Neural network model to extract the features for generating the forecasts.

For Stage 1, you can select Time series to generate forecasts without using feature extraction. Time series is not available for Stage 2.

Dependent variable transformation

Specify Log for a logarithmic transformation for the dependent variable or None for no transformation.

Seasonal dummy variables

Select this setting to generate seasonal dummy variables during feature extraction. The number of seasonal dummy variables corresponds to the Seasonal cycle length specified for the time variable.

This setting is enabled by default.

Time interval for creating seasonal dummy variables

Enter a valid time interval value for creating seasonal dummy variables. If this value is left blank, the time interval specified for the time variable is used. For example, if the time variable for the project uses Week for the time interval, 52 seasonal dummy variables are generated. If you specify Month , then only 12 seasonal dummy variables are generated.

Enter one of the following specification values. Each specification shows the corresponding setting for the Time variable on the Data tab.

Time Interval Specifications and Corresponding Time Variable Intervals

Time interval specification

Time variable setting

year

Year

yearv

ISO 8601

r445yr

Retail 4-4-5 year

r454yr

Retail 4-5-4 year

r544yr

Retail 5-4-4 year

semiyear

Semiyear

r445qtr

Retail 4-4-5 quarter

r454qtr

Retail 4-5-4 quarter

r544qtr

Retail 5-4-4 quarter

quarter

Quarter

month

Month

r445mon

Retail 4-4-5 month

r454mon

Retail 4-5-4 month

r544mon

Retail 5-4-4 month

semimonth

Semimonth

tenday

Ten-day

week

Week

weekv

ISO 8601 week

weekday

Weekday

day

Day

hour

Hour

minute

Minute

second

Second

Number of lags for the independent variables

Specify a positive integer for the number of independent variable lags to generate and include as independent variables. For example, setting the value to 3 computes three variables with lagged values for each independent variable defined in the project.

TipSetting this field equal to the dependent variable lags enables the neural network to better detect the interactions between the variables.

For stage 1, the default value is 4. For stage 2, the default value is 0.

Regression Model Settings
Hierarchy level indicating BY variable to be used in Stage 1

Specify the level in the hierarchy for BY variables to use in the regression model during feature extraction in the first stage. Specify an integer between 0 and the number of BY variables assigned for this project. If not specified, or if this is set to 0, there will be no BY statement in the regression model.

For best results, this should be set to the higher levels in the hierarchy, for example, 0 or 1.

This setting is available only if Feature Extraction Model is set to Regression for Stage 1.

Hierarchy level indicating BY variable to be used in Stage 2

Specify the level in the hierarchy for BY variables to use in the regression model during feature extraction in the second stage. Specify an integer between 0 and the number of BY variables assigned for this project. If not specified, or if this is set to 0, there will be no BY statement in the regression model.

For best results, this should be set to the lower levels in the hierarchy, for example, 2 or 3.

This setting is available only if Feature Extraction Model is set to Regression for Stage 2.

Neural Network Settings

These settings are enabled only if Feature extraction model is set to Neural network. If you have Neural network enabled for both stages, these settings are used for both stages.

Dependent variable trend

Specify the method to create a dependent variable trend as an independent variable. You can choose a Linear trend or Damped trend . The default is none None , in which no trend variable is created.

ESM Forecast of dependent variable

Specify Yes to use an ESM forecasta numerical prediction of a future value for a specified time period for each unique combination of BY variable values of the dependent variable as an independent variable.

Number of lags for the dependent variable

Specify a positive integer for the number of dependent variable lags to generate and include as independent variables. Dependent variable lags are required for the neural network to learn the order of the time seriesan aggregation of transactional data into specified time intervals and sorted according to unique combinations of the default attributes (BY variables).

For lags of missing values in the horizonthe number of intervals into the future, beyond a base date, for which analyses and predictions are made., the previous forecasted values are used to generate new lag values and extend the forecast recursively. For example, setting the value to 3 computes three independent variables with lagged values of the dependent variable.

The default value is 4.

Input standardization

Specify the method that is used to standardize the interval input variables. Select from these options:

  • Midrange
  • None
  • Z-score
Number of hidden layers

Specify 0, 1, or 2 hidden layers to include in the neural network model. If the number of hidden layers is 0, a GLIM model is trained.

You are required to specify the number of neurons and the activation function for each hidden layer.

Layer 1 neurons

Specify an integer between 0 and 100 for the number of neurons in the first hidden layer. This is required if Number of hidden layers is greater than 0.

Layer 1 activation function

Specify the activation function for the first hidden layer. This is required if Number of hidden layers is greater than 0.

Select from these options:

  • Exponential
  • Identity
  • Logistic
  • Rectifier
  • Sine
  • Tanh (hyperbolic tangent)
Layer 2 neurons

Specify an integer between 0 and 100 for the number of neurons in first second layer. This is required if Number of hidden layers is 2.

Layer 2 activation function

Specify the activation function for the second hidden layer. This is required if Number of hidden layers is 2.

Select from these options:

  • Exponential
  • Identity
  • Logistic
  • Rectifier
  • Sine
  • Tanh (hyperbolic tangent)
Include direct connections between the input and output layers

Specify whether direct connections from nodes in the input layer to nodes in the output layer should be included in the neural network. By default, this is not selected. This setting is disabled if Number of hidden layers is 0.

Dependent variable standardization

Specify the method that is used to standardize the dependent variable. Select from these options:

  • Midrange
  • Std
  • None
Error function

Specify the error function for the dependent variable output layer. Select one of the following options:

  • Gamma — Selecting this value disables the Output layer activation function . The Exponential activation function is used with the Gamma error function.
  • Normal — When there are no hidden layers, the normal error function is used.
  • Poisson — Selecting this value disables the Output layer activation function . The Exponential activation function is used with the Poisson error function.
Output layer activation function

Specify the activation function to use on the output layer of the network. If Error function is not set to Normal , this setting is disabled and the Exponential function is used.

Specify the target layer activation function for interval targets. Select from these options:

  • Identity
  • Sine
  • Tanh
Random seed

Specify a positive integer to use for generating random numbers to initialize the network.

Maximum training iterations

Specify the maximum number of training iterations within each try.

Time Series Forecast Model Settings

This setting is enabled only if Feature extraction model in Stage 1 is set to Time series.

Include ESM models

Turn this setting on to include an exponential smoothing model (ESM) for diagnosis.

Include ARIMAX models

Turn this setting on to include an ARIMAX model for diagnosis.

Include IDM models

Turn this setting on to include an intermittent demand model (IDM) for diagnosis.

  • Intermittency test — This section is available when Include IDM models is enabled.
    • Sensitivity level for intermittency test — Specify an integer greater than one. This setting is used to determine whether a time series is intermittent. If the demand interval is equal to or greater than this number, then the series is assumed to be intermittent.
Include UCM models

Turn this setting on to include a UCM model for diagnosis.

Include combined models

Select Yes if you want to combine the selected models for diagnosis.

Minimum number of observations required for a non-mean model

Specify a minimum value that a time series must meet to be fit using the models in the selection list. Time series that do not meet this minimum value are forecast as the mean of the observations in the series. This value must be greater than or equal to one. The default value is 2.

Minimum number of observations required for a trend model

Specify that a trend model is not fitted to any series with fewer nonmissing observations than the value specified. The value must be an integer that is greater than or equal to 1. The default value is 2. Trend models are not included for any series with fewer nonmissing observations than this value.

Incorporation of a trend is checked only for smoothing, UCM, and ARIMA models. For the smoothing case, only simple smoothing is not a trend model. For UCM, the absence of a slope component qualifies it as not a trend model. For ARIMA, there must be no differencing of the dependent variable for it to be considered as not a trend model.

Minimum number of seasons required for a seasonal model

Seasonal models are not included for any series with fewer nonmissing observations than this value, multiplied by the seasonal length. Specify an integer greater than or equal to one.

Model selection criterion

Choose the statistics of fit to use for selecting the best model in this modeling node. For descriptions for each option, see Descriptions of Model Selection Criteria.

Model Selection Settings

Number of data points used in the holdout sample

Enter a positive integer to be used as the size of the holdout samplethe number of periods of the most recent data that should be excluded from the parameter estimation. The holdout sample can be used to evaluate the forecasting performance of a candidate model.. The actual holdout sample is the minimum between this value and the Percentage of data points used in the holdout sample . The default value is zero, which means no holdout sample is used.

Percentage of data points used in the holdout sample

Enter a value between 0 and 100 to specify the percentage of the sample that is used for the holdout sample. The actual holdout sample is the minimum between this value and the Number of data points used in the holdout sample . This option is displayed only if Number of data points used in the holdout sample is greater than zero.

Output Tables

The following tables are automatically generated when running this modeling node. The tables can be saved to another caslib by using the Save Data Node.

The following tables are optional. Select any tables that you want generated when this node is run. After the node is run, the tables can be saved using the Save Data Node.

Last updated: March 16, 2026