Examples (SIMPLAN command)
Automatically fitting distributions and correlations
SIMPLAN CREATE
/MODEL FILE='/models/sales_model.xml'
/SIMINPUT INPUT=advert agents cci(MAPTO=confidence_index)
/PLAN FILE='/simulations/sales.splan'.
- The
MODELsubcommand specifies the model file. Since theCUSTOMkeyword is omitted, the model file is assumed to be an IBM® SPSS® model file (an XML file that contains model PMML created from IBM SPSS Statistics or IBM SPSS Modeler). - The
SIMINPUTsubcommand specifies that the model fields advert, agents and cci are simulated inputs. Since theTYPEkeyword onSIMINPUTis omitted, the default ofTYPE=AUTOFITis used. This results in automatically finding the distribution that most closely fits the data in the active dataset associated with each of the simulated inputs. - The
MAPTOkeyword for the specification of cci indicates that cci maps to the field named confidence_index in the active dataset. Data for confidence_index will then be used to find the closest fitting distribution for cci. - Since the
CORRELATIONSsubcommand is omitted, correlations between the simulated inputs will be determined from the data for those inputs in the active dataset. The mapping of the model field cci to the dataset field confidence_index applies to calculations of correlations, as well as to distribution fitting. - The
PLANsubcommand specifies that the simulation plan will be saved to the file /simulations/sales.splan.
Manually specifying distributions
SIMPLAN CREATE
/MODEL FILE='/models/profitmodel.xml' CUSTOM=YES
/SIMINPUT INPUT=volume
TYPE=MANUAL DISTRIBUTION=TRIANGULAR(MIN=5000 MAX=7500 MODE=6250)
/SIMINPUT INPUT=unit_cost_materials
TYPE=MANUAL DISTRIBUTION=TRIANGULAR(MIN=10 MAX=15 MODE=13)
/FIXEDINPUT INPUT=price VALUE=89
/FIXEDINPUT INPUT=fixed VALUE=7500
/FIXEDINPUT INPUT=unit_cost_labor VALUE=14
/PLAN FILE='/simulations/profitmodel.splan'.
- The setting
CUSTOM=YESon theMODELsubcommand specifies that this is a custom model created from aSIMPREP BEGIN-SIMPREP ENDblock. - The setting
TYPE=MANUALon the twoSIMINPUTsubcommands specifies that the probability distributions for volume and unit_cost_materials will be explicitly specified. TheDISTRIBUTIONkeyword specifies that both inputs have Triangular distributions. - The three
FIXEDINPUTsubcommands specify that the model inputs price, fixed and unit_cost_labor are fixed inputs. TheVALUEkeyword specifies the fixed value.
Specifying sensitivity analysis for a fixed input
SIMPLAN CREATE
/MODEL FILE='/models/profitmodel.xml' CUSTOM=YES
/SIMINPUT INPUT=volume
TYPE=MANUAL DISTRIBUTION=TRIANGULAR(MIN=5000 MAX=7500 MODE=6250)
/SIMINPUT INPUT=unit_cost_materials
TYPE=MANUAL DISTRIBUTION=TRIANGULAR(MIN=10 MAX=15 MODE=13)
/FIXEDINPUT INPUT=price VALUE=89
/FIXEDINPUT INPUT=fixed VALUE=7500
/FIXEDINPUT INPUT=unit_cost_labor ITERATIONS=VALUES(14 17 19)
/PLAN FILE='/simulations/profitmodel.splan'.
- The
ITERATIONSkeyword on theFIXEDINPUTsubcommand for unit_cost_labor specifies that sensitivity analysis will be carried out and will be based on varying values of this fixed input. TheVALUESkeyword specifies the three values14,17and19. An independent set of simulated data will be generated for each of these three values of unit_cost_labor.
Generating data without a predictive model
SIMPLAN CREATE
/SIMINPUT INPUT=age glucose income
/PLAN FILE='/simulations/diabetes_data.splan'.
- The
SIMINPUTsubcommand specifies that data are to be generated for the variables age, glucose and income. Since theTYPEkeyword onSIMINPUTis omitted, the default ofTYPE=AUTOFITis used. This results in automatically finding the distribution that most closely fits the data in the active dataset associated with each of the variables. - Since the
CORRELATIONSsubcommand is omitted, correlations between the specified variables will be determined from the data for those variables in the active dataset. - The
PLANsubcommand specifies that the simulation plan will be saved to the file /simulations/diabetes_data.splan.