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
PRESERVEcommand saves your currentSETcommand specifications, andSET TVARS NAMESspecifies that variable names—not labels—should be displayed in tables. Since variable names in data files created byOMSare based on table column labels, using variable names instead of labels in tables tends to result in shorter, less cumbersome variable names. -
DATASET DECLAREdefines a dataset name that will then be used in theREGRESSIONcommand. - The first
OMScommand prevents subsequent output from being displayed in the Viewer until anOMSENDis 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 ofREGRESSIONcommands. - The second
OMScommand will select coefficients tables from subsequentREGRESSIONcommands. - 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
COLUMNSsubcommand 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.