OMS Commands to Create a Data File of Coefficients
Although the command syntax file oms_bootstrapping.sps may seem long and/or
complicated, the OMS
commands
that create the data file of sample regression coefficients are really
very short and simple:
PRESERVE.
SET TVARS NAMES.
DATASET DECLARE bootstrap_example.
OMS /DESTINATION VIEWER=NO /TAG='suppressall'.
OMS
/SELECT TABLES
/IF COMMANDS=['Regression'] SUBTYPES=['Coefficients']
/DESTINATION FORMAT=SAV OUTFILE='bootstrap_example'
/COLUMNS DIMNAMES=['Variables' 'Statistics']
/TAG='reg_coeff'.
- The
PRESERVE
command saves your currentSET
command specifications, andSET TVARS NAMES
specifies that variable names—not labels—should be displayed in tables. Since variable names in data files created byOMS
are based on table column labels, using variable names instead of labels in tables tends to result in shorter, less cumbersome variable names. -
DATASET DECLARE
defines a dataset name that will then be used in theREGRESSION
command. - The first
OMS
command prevents subsequent output from being displayed in the Viewer until anOMSEND
is encountered. This is not technically necessary, but if you are drawing hundreds or thousands of samples, you probably don't want to see the output of the corresponding hundreds or thousands ofREGRESSION
commands. - The second
OMS
command will select coefficients tables from subsequentREGRESSION
commands. - All of the selected tables will be saved in a dataset named bootstrap_example. This dataset will be available for the rest of the current session but will be deleted automatically at the end of the session unless explicitly saved. The contents of this dataset will be displayed in a separate Data Editor window.
- The
COLUMNS
subcommand specifies that both the 'Variables' and 'Statistics' dimension elements of each table should appear in the columns. Since a regression coefficients table is a simple two-dimensional table with 'Variables' in the rows and 'Statistics' in the columns, if both dimensions appear in the columns, then there will be only one row (case) in the generated data file for each table. This is equivalent to pivoting the table in the Viewer so that both 'Variables' and 'Statistics' are displayed in the column dimension.