Personal tools
Section Navigation > Home > Answers > Reference Manuals > Guide to Using SPSS for Windows > Sample SPSS Session
Navigation
Antivirus Software

McAfee Image

Download security software

Free for all university
students, faculty, and staff
personally owned computers

ASU Webmail

Email for 2008-2009 Freshmen
and new student accounts


ASU Webmail
Powered by Google


FAQ

Log in
Sign in to support to access additional resources for faculty, staff, and students.

Change Text Size

A      A      A

 
Document Actions

6. Sample SPSS Session

 
Up one level
An example of SPSS usage.

The following sequence of instructions will step you through a sample SPSS session, including accessing a data set, running analyses, graphing, printing output and exporting results to Microsoft Word.

1. Read the sample data set

Initiate an SPSS session, and in the first dialog box, “SPSS for Windows”, under “Open an existing data source” click on “More files…”. Alternately, in the Data Editor window you can click File > Open > Data… to get to the Open File dialog box. In the Open File dialog box, click on "world95.sav", (C:\Program Files\SPSS\world95.sav), and then click Open. If this file name is not listed, you may need to browse to its location on drive C:\

The file “world95.sav” is a sample data set, supplied by SPSS, containing demographic and economic information for 109 countries. To learn more about the individual variables in the file, click on the Variable tab in the lower left hand corner of the window. Information on each variable includes: type, width, decimals, variable label, value labels, missing value codes, column size, alignment and measurement level.

2. Descriptive statistics

We will run a frequency distribution on a categorical variable and then compute some descriptive statistics on two ratio scale variables. In the Data Editor window click Analyze > Descriptive Statistics > Frequencies. In the Frequencies dialog box, the left hand box lists the variable labels of all the variables in the data set. Hold the mouse pointer on a line to read the entire label and the variable name. Select “Region or economic group [region]” (it’s about half way down the list). Variables can be selected either by double clicking them, or by clicking on the variable name and then clicking the right arrow ">" to copy it into the selected variables list. Note that there is a Help button for specific help about using this Frequencies dialog box. Click OK to run the Frequencies procedure. The Output Viewer window will appear, containing the requested frequency distribution. Next, we’ll get some descriptive statistics on two ratio scale variables. In either the Output Viewer window or in the Data Editor, again click Analyze > Descriptive Statistics > Frequencies. First, click Reset to clear the Frequencies dialog box, and then click on the two variables, "Average male life expectancy [lifeexpm]" and "Males who read (%) [lit_male]", and move them into the selected variables list. At the bottom of the dialog box are three buttons, Statistics, Charts, and Format. Click the Statistics button and in the Statistics dialog box select Mean, Median, Standard deviation, Minimum, Maximum and S.E mean (standard error of the mean). Click Continue to return to the Frequencies dialog box, and click Charts. In the Charts dialog box, click Histogram and "With normal curve", then click Continue. Since the two variables we selected are ratio scale items, we do not want to generate frequency tables. Therefore, click on the “Display frequency tables” box to remove the check mark. Finally, click OK in the Frequencies dialog box to initiate the analysis. This second analysis is added to the Output Viewer window.

3. Examining, Editing and Printing output

When the processing is complete, the SPSS Viewer window opens automatically. It is a split window, with the left side containing an outline of the analytical results displayed on the right side. You can browse the results, show or hide selected tables or charts, edit items, print all or part of the output, or copy output into other applications. If you click on an item in the outline, the pointer on the right hand side immediately jumps to that part of the output. In the outline on the left, double click a book icon to show or hide that item, or click the plus or minus sign to expand or collapse an entire section of output. In the right pane, double click a table to bring up the Pivot Table Editor. The table will be surrounded by hash marks to signify that the editor is active. With the table editor you can rearrange the contents of the table using Pivot Trays, transpose rows and columns, edit cell contents, or cell borders, add or edit a title, a footnote or a caption, or modify almost any detail of the table. Click outside the table to close the Pivot Table Editor. Double clicking a histogram brings up a new window, the Chart Editor window, containing the selected chart. Almost any feature of the chart can be edited, including the axes, title, color, and interval width for the bars. Right mouse click on an element of the chart to see the Properties dialog box and editing options available for that chart element. Click File > Close to close the Chart Editor window. To print the results, click File > Print. You can print all visible output, a single table or chart, or by first hiding the unwanted parts of the output, you can choose to print only selected tables and charts.

4. Producing a graph

The following steps will plot male life expectancy vs. male literacy rates. In the main menu, click Graphs > Scatter/Dot, then select Simple Scatter and click Define. From the Simple Scatterplot dialog box select "Average male life expectancy [lifeexpm]" for the Y-axis and "Males who read (%) [lit_male]" for the X-axis. Click the Titles button to enter a Title, and then click OK to generate the graph. The plot will be displayed in the Viewer window.

5.Editing the graph

Edit the graph to include a regression line. Double click anywhere in the plot to bring up the Chart Editor, and in the Chart Editor window, click on Elements and select “Fit line at Total” to bring up the Properties dialog box. Select the tab “Fit Line”, and under Fit Method, click on “Linear”. Click Apply and then close the Properties window. Other aspects of the chart, such as the axes, data point labeling, and marker color, type, and size can be edited. Click on the item to be edited and then click Edit > Properties, or right mouse click on the item and select “Properties Window” from the drop down list. To change the text of the title on one of the axes, click once to select it, and then click again to create a short red line in the middle of the text. Edit or enter new text as desired. Finally, close the chart editor window by clicking File > Close, and then print or save the chart if desired.

6. Save the output

To save the output so that it can be retrieved in a future SPSS session, click File and Save or Save As. Specify the folder in the "Save in:" box and then enter a file name. The file extension will be ".spo". The entire contents of the SPSS Output Viewer window will be saved, not just those tables and charts currently visible.

7. To export a table:

A table can be copied and pasted into another active Windows application such as Microsoft Word. First, select the table to be copied (click on its icon in the outline), and from the main menu choose Edit > Copy objects. Do not double click on the table; the Pivot Table Editor is not required. Initiate the target application, such as MS Word, and from its menu choose Edit > Paste Special and Formatted Text (RTF). Once the table has been brought into your MS Word document you will be able to resize it, but you will not be able to do additional editing.

8. To export a graph

A graph can be exported by using the copy and paste method or by saving it as a graphics file to be brought into a word processing program at a later time. To copy and paste the graph use the same procedure as that outlined above to export a table: select the chart to be copied (click on its icon in the outline) and then click Edit > Copy object. Open your MS Word application, and click on Edit > Paste Special and Formatted Text (RTF). If the graph requires editing, this should be done in SPSS, because you will have very little editing capability in the word processor beyond resizing the chart.

Alternately, SPSS gives you the ability to export a graph as a file. Click on the desired chart in the Output Viewer window, and then click File > Export. In the Export Output dialog box specify “Charts only”, and then under “Export What” click on “Selected Charts”. Select the desired File Type under Export Format: Enhanced Metafile (*.EMF), JPEG (*.JPG), Macintosh PICT (*.PCT), Portable Network Graphics file (*.PNG), Postscript (*.EPS), Tagged Image File (*.TIF), Windows Bitmap (*.BMP), or Windows Metafile (*.WMF). If you plan to bring the graph into Microsoft Word, save it as a *.WMF file. Be sure to specify a file name and location: under Export File - File Prefix, browse to the desired location and enter a file name, eg. C:\mygraphs\proj1.wmf, and click OK. After the file has been saved, it can be brought into a Microsoft Word document at any time: click on Insert > Picture >From File, and then type in the path and name of the saved SPSS *.WMF file.

9. Power Point and HTML Output

You can also export output as a Power Point or HTML file. In the Output Viewer window click on File > Export, and in the “Export Output” dialog box enter a filename and specify the export format as “Power Point” (*.ppt) or “HTML file (*.htm)”. Under “Export What”, click on “All Visitble Objects” or “Selected Object”. If you export “All Objects” your file will contain extra unwanted tables that are usually hidden. You can export the entire output document or the output document without charts. If you export the entire document to an HTML file, the charts will be exported in the currently selected chart export format (with a separate file being created for each chart) and embedded by reference in the HTLM document. Click on Help in the “Export Output” dialog box for more detailed information about this facility.

 

© 2007 Appalachian State University Boone, NC 28608 / 828-262-2000