Dynamic regression produces a forecast based on the forecasted item’s history (like univariate methods) and that of the explanatory variables (e.g., product promotion, advertising, demographic variables, macroeconomic indicators, etc.).
Clicking the Dynamic Regression icon on the Forecasting tab or selecting Forecasting > Dynamic Regression > Manage on the Navigator context menu invokes the Dynamic Regression dialog box shown below.
Name: Forecast Pro names each of your dynamic regression model specifications and saves them in the project’s database. These named specification sets provide a convenient way to apply the same dynamic regression model specifications to multiple items on the Navigator. The Name drop-down allows you to select previously defined specification sets, create new ones, save the current set using a different name and delete the current set.
Description: The description field allows you to enter a description for the current model selection.
Explanatory variables: Explanatory variables allow you to capture how the dependent variable changes in response to external variables. The Explanatory variables field lists all explanatory variables (both global and item-specific) read in through the Data Manager. Please see Explanatory Variables for details on the differences between global and item-specific explanatory variables.
Automatically Extend: To generate dynamic regression forecasts, Forecast Pro needs values for each explanatory variable for all periods in the forecast horizon. Ideally, the user provides forecasted explanatory variable values for all forecast periods in the explanatory variable data file(s). If not all forecasted values are included in the explanatory variable data file(s), the user may select Automatically extend, and Forecast Pro will use expert selection to generate forecasts for any explanatory variable that does not have values provided for all periods in the forecast horizon. Forecast Pro will use expert selection explanatory variable forecasts only for those variables and periods where none was provided.
System variables: There are two type of terms that can be included in a dynamic regression models—explanatory variables and dynamic terms. Explanatory variables are defined above. Dynamic terms capture how the dependent variable changes in time and can help forecast trends and seasonal patterns in a similar fashion to extrapolation methods such as Box-Jenkins and exponential smoothing.
The System variables field lists dynamic terms as well as well as system terms for defining additional explanatory variables in Forecast Pro.
Each of these system terms starts with an underbar to identify it as a Forecast Pro defined variable. These terms include the following:
- _PERIOD(n) creates a dummy variable for period n. The dummy variable will have a value of 1 for the nth period in the seasonal cycle and a value of 0 for all periods. For example, if you are using monthly data, Period(3) will have a value of 1 for every March and a value of 0 for all other time periods.
- _SPIKE(year, period) is used to create a dummy variable for a single period. For example, for a monthly data set, _SPIKE(2021,7) has a value of 1 for July 2021 and a value of 0 for all other periods. This function can be useful when modeling outliers.
- _STEP(year, period) is used to create a variable that consists of all zeroes prior to a specified time period and all ones thereafter. For example, for a monthly data set, _STEP(2021,7) will have a value of 0 prior to July 2021 and a value of one for July and thereafter. This function can be useful when modeling level shifts.
The Systems variables list box may also include the following dynamic terms:
- _CONST is used to include a constant term in the model. A constant term has a value of 1 for all time periods.
- _TREND is used to include a linear trend term in the model.
- _DEPENDENT[-n] is used to include a lagged dependent variable in the model. For example, if you are modeling the item Sales, DEPENDENT[-1] is Sales for the prior period.
- _AUTO[-n] is used to create a Cochrane-Orcutt model which includes a variable equal to the fitted model error from n periods earlier. For example, when you add _AUTO[-1] to the model, the program uses the fitting error from time t-1 to help predict the fitting error for time t.
Forecast Pro offers an Automatic dynamics mode. In this mode, you select the explanatory variables to include, and the program automatically determines the dynamic terms to include. When you use Automatic dynamics, the dynamic terms are not visible in the Dynamic Regression dialog box.
When you double click on an item in either the System Variables or Explanatory Variables list box, it is added to the Model box. When you add _STEP or _SPIKE, you will be asked to specify a date to use before it is added. Once you have added a variable to the Model box, it can be edited using the context menu as described in the Model section below.
Model: The Model box lists all terms that you have added to the model. To the left of each item is a checkbox to indicate if the item should be included in the regression. If this box is checked, the term will be included in the model. If the box is not checked, the term will be tested in the dynamic regression test batteries but will not be included in the model. If Automatic dynamics is selected, the dynamic terms will not appear in the Terms and Model boxes, but an optimized set of dynamics terms will be included in the model.
Each term in the Model box can be adjusted using the Model box’s context menu. Right click on the item in the Model box to activate the Model box’s context menu.
- Clear will remove all terms from the dialog box.
- Remove will remove just the selected item from the Model box.
- Lag allows you to adjust the specified lag. You can use the lag selection to create lagged explanatory variables or to adjust the lags for the _AUTO and _DEPENDENT terms.
- Transform allows you to use a logarithm, square root or inverse transform on the selected variable. Transform is not available for dummy variables or if the transform cannot be applied to the selected variable (e.g. logarithm for items with zero values).
- Edit allows you to change the specified period for the dummy variables (_PERIOD, _STEP and _SPIKE).
Optimize Dynamics (button): This button will replace any existing dynamic terms in the model with a set of dynamic terms selected by Forecast Pro. Note that the optimal model dynamics are selected for the item currently selected on the Navigator and the specified non-dynamic terms in the Model box. Once the optimal dynamics are added—they are simply part of the specified model—they will not be automatically updated if you subsequently change the model.
Automatic Dynamics (check box): If this option is selected, the program automatically determines the dynamic terms to include. The user still needs to specify the explanatory variables to include. Automatics dynamics is selected by default.
There are important (but subtle) differences between a model specification that uses the Automatic Dynamics option and a model specification that used the Optimize Dynamics button to determine the dynamics.
- If you apply the same model specification to multiple items on the Navigator, the model specification that uses Automatic Dynamics will select the dynamic terms independently for each item. The model specification built using the Optimized Dynamics button will simply apply the specified terms to each item.
- If you update your project with new data and reforecast, the model specification that uses automatic dynamics will re-select the dynamic terms using the new data (potentially changing the selected terms). The model specification built using the Optimized Dynamics button will simply apply the previously specified terms to each item.
Note that the dynamic regression model specification can also be edited with the context menu in the Forecast Report view. Right click on a term in the model details section of the report to activate the context menu and remove or edit the specified term from the model. The Variable Test Specification battery and Dynamics Test Battery sections of the report list explanatory variable and dynamic to consider adding to the model. To add a term to the model, right click on the term you wish to add and select Add term from the Forecast Report context menu.
Click OK or Apply on the Dynamic Regression dialog box to apply the model shown in the name drop-down to the item selected on the Navigator. Alternatively, you may open the drop-down on the Dynamic Regression icon on the Forecasting tab and select a model name.
- \DR=name is the modifier to apply a dynamic regression model with the specifications defined in name.
See Also