Title: Scripts are short programs that repeat sequences of SPSS commands.
1- Scripts are short programs that repeat sequences
of SPSS commands. - SPSS includes a computer language called Sax
Basic for the creation of scripts and SPSS
includes a number of sample scripts to get you
started. - The scripts which will be available are generally
designed to reduce the need to repeat sequences
of menu commands. The commands that they replace
will be shown in the PowerPoint presentations for
doing homework problems.
2- While the scripts have been tested to make sure
they work, they are not designed to handle all of
the possible combinations of data and analyses. - If you get an error message, close the script and
try it again. If it continues to fail, please
send me an email with details about what you were
doing when it stopped working and I will fix it.
3To download the scripts, click on the link SPSS
Script and Syntax Files on the Course Materials
web page.
4On the Scripts and Syntax Files web page, right
click on the link FrequencyDistribution.SBS and
select Save Link As from the popup menu.
NOTE .SBS is the file extension for SPSS
scripts.
5Navigate to the My Documents folder and click on
the Save button to save the script to your
computer.
Repeat these steps to download the script for
Contingency Tables.
6After opening the data file in SPSS, select the
Run Script command from the Utilities menu.
7In the Run Script dialog box, navigate to the My
Documents directory and highlight the script
FrequencyDistribution.SBS.
Click on the Run button to activate the script.
8When the script dialog box opens, it gives you a
message that the script has set the output
options so that it can read the output files. The
options are set to Names and Labels for variables
in the Navigator Outline and Pivot Table titles,
and for Values and Labels for values of the
variable in output tables.
9The options for the script are set to the
features we will commonly want to do.
Second, click on the OK button to create the
output.
First, click on a variable name to create the
frequency distribution and bar chart.
10When the script finishes running, the computer
will beep and this message will appear in the
status bar.
When the script is running, the output window
will be brought to the front on the screen. If
the output window covers the script dialog, you
can click on the minimized icon for the data set
and the script dialog will be visible again. The
script dialog does not close when the script is
finished. It is designed to stay open for
continued analysis.
11The screen does not refresh completely, leaving
this narrow band of a previous screen at the top.
I have not found a way to fix it automatically,
but resizing the window should correct it.
The script produces the frequency table, just as
it would appear if you used the SPSS menus.
12The script also creates a bar chart that is
similar to the bar chart produced by the
frequencies command. I like to add frequency
counts to the bars so that I dont have to look
back at the table.
13Finally, the script produces a table of Odds for
each possible combination of categories. For
example, respondents were three and a half times
more likely to be divorced rather than
separated. This is not standard SPSS output, but
relies on calculations on the output in the
frequency table.
14You can have the bar chart use percentages
instead of frequency counts.
Clearing this check box creates the bar chart
without the numbers on the bars.
To close the dialog, click on the Cancel button
or the Red X close box.
These buttons change the order of the variables
in the list box.
These check boxes reduce of the volume of tables
in the output window.
15The options in the Contingency Tables script are
similar.
You select two variable one for the row variable
and one for the column variable.
The defaults in the script are set to produce
column percentages in the table and the bar
chart, which is what we usually want.
16The output is the same contingency table that you
would produce with the crosstabs command.
17The categories of the row variable are
color-coded in the legend.
The bar chart is clustered on the column variable.
18The script produces a table of odds for each
category of the column variable and the odds
ratio.
- The odds ratio is calculated for both of the
possible combinations - the ratio of the odds for category 1 to the odds
for category 2, and - the ratio of the odds for category 2 to the odds
for category 1.