About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Question & Answer
Question
I'm running a transfer function model in SPSS Statistics. I need to calculate the changes in predictions or forecasts for a unit change in a predictor variable, either for a pulse change that occurs at a single time point and doesn't last or for a step change that persists. Can this be done?
Answer
This can be done using the scoring functionality of the Forecasting module. The procedure accessed via Analyze>Forecasting>Create Models is the TSMODEL procedure. Underneath that on the menus is an option to Apply Models. This option accesses the TSAPPLY procedure, which allows you to apply a saved model to new data, and this functionality makes it relatively easy to compute the impulse and step response functions or changes in forecasts/predictions associated with either a pulse or step change in a predictor in a transfer function model. To do this, execute the following steps:
1) Run the desired transfer function model, saving the model to an XML file. The option to save the model to an XML file is on the Save tab of the TSMODEL (Create Models) dialog box. In command syntax, you use the OUTFILE keyword on the MODEL subcommand.
2) Create a new data file containing a sufficient number of cases or time periods to accommodate the model of interest, each case containing a value of 0 for the predictor(s) and missing values for the dependent variable series, along with a DATE_ variable that begins one time point beyond the end of the observed series on which the model was derived. This can be done either in the Data Editor by typing in data and using Data>Define Dates. It can also be done using command syntax with an input program. Following is an example for monthly data, where a series is extended for two years following December of 2012, with a predictor named X and a dependent named Y:
DATASET DECLARE forecast.
NEW FILE.
INPUT PROGRAM.
LOOP #i=1 to 24.
COMPUTE X=0.
IF X>10 Y=1.
END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
EXECUTE.
DATASET ACTIVATE forecast.
DATE Y 2013 M 1.
3) Run TSAPPLY (Apply Models), saving forecasts (Predicted Values on the Save tab of the dialog). Other than specifying the file and the saving of predictions, no other changes need be made, but you can turn off output if desired.
4) Change the predictor variable of interest by the unit change of interest (typically 1) for all cases in the dataset.
5) Run TSAPPLY again, again saving predictions.
6) Compute the difference between the two saved sets of predictions, subtracting the first set from the second set. In the menus, Transform>Compute Variable.
Now examine the computed differences. These are the step response function. If the system is stable and you've created a sufficient number of time points to allow for the model (i.e., the ARIMA and seasonal ARIMA properties and any lags included in the transfer function(s), you should see a point at which the differences are stable. This value is the long-term change in the response for a continued (step) increase in the predictor. The first value among the differences is the impulse response resulting from a change in the predictor for only a single time point.
If you want to see the impulse response function, change the predictor of interest to 0 for all but the first case and reapply the model, then compute differences between the new predictions and the predictions with all values set to 0. You should see the first value from the step response function in the first case of the new differences, repeated for as many time points as are appropriate given the model, followed by 0 values. The sum of the non-zero values should equal the stable value to which the step response function converged.
Related Information
[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Forecasting","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
Modified date:
16 April 2020
UID
swg21628630
Manage My Notification Subscriptions