Simulation

Predictive models, such as linear regression, require a set of known inputs to predict an outcome or target value. In many real world applications, however, values of inputs are uncertain. Simulation allows you to account for uncertainty in the inputs to predictive models and evaluate the likelihood of various outcomes of the model in the presence of that uncertainty. For example, you have a profit model that includes the cost of materials as an input, but there is uncertainty in that cost due to market volatility. You can use simulation to model that uncertainty and determine the effect it has on profit.

Simulation in IBM® SPSS® Statistics uses the Monte Carlo method. Uncertain inputs are modeled with probability distributions (such as the triangular distribution), and simulated values for those inputs are generated by drawing from those distributions. Inputs whose values are known are held fixed at the known values. The predictive model is evaluated using a simulated value for each uncertain input and fixed values for the known inputs to calculate the target (or targets) of the model. The process is repeated many times (typically tens of thousands or hundreds of thousands of times), resulting in a distribution of target values that can be used to answer questions of a probabilistic nature. In the context of IBM SPSS Statistics, each repetition of the process generates a separate case (record) of data that consists of the set of simulated values for the uncertain inputs, the values of the fixed inputs, and the predicted target (or targets) of the model.

You can also simulate data in the absence of a predictive model by specifying probability distributions for variables that are to be simulated. Each generated case of data consists of the set of simulated values for the specified variables.

To run a simulation, you need to specify details such as the predictive model, the probability distributions for the uncertain inputs, correlations between those inputs and values for any fixed inputs. Once you've specified all of the details for a simulation, you can run it and optionally save the specifications to a simulation plan file. You can share the simulation plan with other users, who can then run the simulation without needing to understand the details of how it was created.

Two interfaces are available for working with simulations. The Simulation Builder is an advanced interface for users who are designing and running simulations. It provides the full set of capabilities for designing a simulation, saving the specifications to a simulation plan file, specifying output and running the simulation. You can build a simulation based on an IBM SPSS model file, or on a set of custom equations that you define in the Simulation Builder. You can also load an existing simulation plan into the Simulation Builder, modify any of the settings and run the simulation, optionally saving the updated plan. For users who have a simulation plan and primarily want to run the simulation, a simpler interface is available. It allows you to modify settings that enable you to run the simulation under different conditions, but does not provide the full capabilities of the Simulation Builder for designing simulations.

Show me

Simulation pastes the following command syntax:

  • SIMPLAN command syntax for creating a simulation plan file.
  • SIMRUN command syntax for running a simulation.
  • SIMPREP BEGIN-SIMPREP END command syntax for setting up a simulation based on a set of custom equations.