Post on 21-May-2018
Revised January 8, 2010 Page 1 of 14
ASU College of Nursing and Health Innovation Office for Research and Scholarship
Introduction to SPSS for Windows
Edward A. Greenberg, PhD
Director, Office for Research and Scholarship Data Lab Objectives By the end of this workshop, you should be familiar with the following aspects of using the SPSS for Windows statistical package: TOPIC PAGE • SPSS availability at ASU CONHI 2 • SPSS versions, file types and compatibility 2 • Locating SPSS help and other resources 3 • SPSS windows and menu system 3 • Running SPSS via the My Apps / Citrix Environment 4‐8 • Setting SPSS options 9 • Using the SPSS Data Editor 10 • Types of variables in SPSS 11 • Missing values 12 • Opening and saving files 12 • Running SPSS statistical procedures 12 • Saving and modifying output 13 • Data transformations 14 • Working with subsets of your data 14 Useful Links • Files for this tutorial: http://www.public.asu.edu/~eagle/spssworkshop/ • ASU Online Applications https://myapps.asu.edu • SPSS, Inc. home page: http://www.spss.com/
Note
Screen shots and other sample material are based upon SPSS Version 16 for Windows.
Revised January 8, 2010 Page 2 of 14
SPSS Availability at ASU CONHI
• CONHI computers SPSS is installed on computers in the NHI 299 and 342 computer labs, on the PhD student computers in NHI 271/281 and on many faculty computers.
• ASU UTO Computing Sites DPC Information Commons (UCENT Lower level) and other computing sites on each of the four ASU campuses have access to SPSS via ASU Online Apps/My Apps (see below).
• My Apps You can run SPSS via ASU’s Online Applications (Citrix) environment from any computer that is connected to the Internet: See https://myapps.asu.edu .
• ASU Computer Store (Tempe) Buy your own SPSS Grad Pack at the ASU Computer Store (http://bookstore.asu.edu) or from another educational software reseller. The SPSS Student Edition is not recommended, because of its limit of 50 variables.
SPSS versions
VERSION CONHI COMPUTERS MY APPS (CITRIX)
SPSS 16 X X
SPSS Statistics 17 Some faculty PCs X
PASW Statistics 18 Some faculty PCs X
SPSS File Types and Compatibility among Versions
FILE TYPE EXTENSION CONTENTS
SPSS Data File *.SAV Data and data attributes
SPSS Output File *.SPO (SPSS 15 and older), *.SPV) Output from SPSS procedures
SPSS Syntax File *.SPS SPSS commands (“syntax”)
• SPSS Data Files are pretty much forward‐ and backward‐compatible (since Version 11). • SPSS Output Files are generally not backward‐compatible (you cannot open *.SPO files created in a
later version of SPSS) but usually are forward‐compatible. • SPSS 16 and newer versions use file type *.SPV for Output Files and cannot open *.SPO files. SPSS 16
and newer users must use the SPSS Legacy Viewer, which can be downloaded from http://support.spss.com/ProductsExt/SPSS/Documentation/Statistics/LegacyViewer/readme.html, to open *.SPO files.
• SPSS Syntax Files are fully forward‐ and backward‐ compatible among versions, although the specific commands may differ somewhat between versions.
Revised January 8, 2010 Page 3 of 14
SPSS Help and Other Resources • The SPSS Help menu includes an excellent tutorial and other reference material.
• SPSS, Inc. web site: http://www.spss.com
• Many excellent books are available on SPSS, including some published by SPSS, Inc.
• The CONHI/ORS Data Lab can help you with SPSS: NHI 391, CONHISTAT@ASU.EDU, (602) 496‐DATA
Launching SPSS From a PC with SPSS installed, select: Start / All Programs / SPSS Inc / SPSS 16.0 / SPSS 16.0 (for SPSS Version 16) Start / All Programs / SPSS Inc / Statistics 17.0 / SPSS Statistics 17.0 (for SPSS Statistics 17) Windows Used within SPSS
WINDOW TYPE PURPOSE
SPSS Data Editor Enables viewing and editing of contents of an SPSS data file. Two tabs, Data View (displays data) and Variable View (displays variable attributes). Opens at SPSS start‐up.
SPSS Viewer Displays output from SPSS procedures. The contents of this window can be edited.
SPSS Syntax Editor Used to create and run SPSS command (“syntax”) files.
Revised January 8, 2010 Page 4 of 14
To run SPSS via My Apps / Citrix: 1. Open a web browser to http://myapps.asu.edu .
2. Search for “SPSS” in the “Mathematics and Statistics” software category.
3. Scroll down to SPSS 16 (or whatever version you want) and click “Run App Now.”
Revised January 8, 2010 Page 5 of 14
4. The first time you do this, you may see:
If so, click on “Install Client.” Click the “Run” button on the resulting screen:
You’ll see the following screen while the My Apps Online Client (a.k.a. the Citrix Presentation Server) is installed:
Revised January 8, 2010 Page 6 of 14
5. When this screen reappears, click “Launch App:”
When using a Citrix‐based application, you can open and save files on: • your M: drive (a.k.a. My Files, accessible via MyASU), • your computer’s hard drive (usually C:), or • a USB (“flash”) drive, if it’s inserted before launching the application:
Revised January 8, 2010 Page 7 of 14
Eventually, you’ll see this splash screen:
And this one:
Revised January 8, 2010 Page 8 of 14
Finally, SPSS will start up:
6. When opening or saving files, select “My Computer” to show your available disk drives:
Revised January 8, 2010 Page 9 of 14
Setting SPSS options
A number of features in SPSS can be customized according to your preferences.
From the Edit menu, select Options. The following screen will appear. Note that there are several tabs under which specific options are grouped. The screen shown displays the General tab.
Options settings that I prefer are as follows:
TAB FEATURE SETTING
General Variable Lists Display names
“ “ File (order of variables in dialog windows)
“ Output No scientific notation for small numbers in tables
“ “ “Raise viewer window” unchecked; “Scroll to new output” checked and “Sound: None” selected
Viewer Initial Output State Display commands in the log
Pivot Tables Default Editing Mode Open all tables in a separate window
Revised January 8, 2010 Page 10 of 14
SPSS Data Editor
Two views, accessed via corresponding tabs:
Data View: Displays the data. One row per case and one column for each variable.
Variable View: Displays variable attributes
Revised January 8, 2010 Page 11 of 14
Types of Variables in SPSS
Numeric A variable whose values are numbers. Values are displayed in standard numeric format. The Data Editor accepts numeric values in standard format or in scientific notation.
String A variable whose values are not numeric and therefore are not used in calculations. The values can contain any characters up to the defined length. Uppercase and lowercase letters are considered distinct. This type is also known as an alphanumeric variable.
Other Variations on numeric data: Comma, Dot, Scientific Notation, Date, Dollar, and Custom Currency
Variable Attributes in SPSS
ATTRIBUTE DESCRIPTION DETAILS
Name Variable name Variable names can be up to 64 characters long, and the first character must be a letter or one of the characters @, #, or $.
Type Data type See Types of Variables in SPSS, above
Width Number of digits or characters For numeric variables, the width of the number that is displayed. String variables can be up to 32,767 characters long.
Decimals Number of decimal places Number of decimal places displayed for numeric variables.
Label Descriptive variable label Labels otherwise‐cryptic variable names; up to 255 characters in length
Values Descriptive value labels Labels category values; up to 120 character in length
Missing User‐defined missing values Up to 3 distinct values (or a range of values plus a distinct value) can be declared to be treated as missing
Columns Column width The display width of a variable in the Data Editor
Align Alignment Alignment of variables in the Data Editor; the default is right for numeric variables and left for string variables
Measure Measurement level • Nominal Unordered categories • Ordinal Ordered categories • Scale Interval‐level values
Revised January 8, 2010 Page 12 of 14
Missing Values
• Missing values are ignored in calculations.
• An empty cell for a numeric variable is assigned the SPSS “system missing value,” represented by a dot (period) in the Data Editor.
• Up to three “user missing values” can be declared for a variable or a range of values plus one additional discrete value.
Opening and Saving Files
SPSS can read and write data in a variety of file types.
FILE TYPE EXTENSION DETAILS
SPSS *.SAV Data files saved in SPSS format
SPSS/PC+ *.SYS SPSS/PC+ data files
SYSTAT *.SYD, *.SYS SYSTAT data files
SPSS Portable *.POR Data files saved in portable format
Excel *.XLS, *.XSLX, *.XLSM Excel files
Lotus 1‐2‐3 *.W* Data files saved in 1‐2‐3 format for release 3.0, 2.0, or 1A of Lotus
SYLK *.SLK Data files saved in SYLK (symbolic link) format, a format used by some spreadsheet applications
dBase *.DBF dBASE‐format files for either dBASE IV, dBASE III or III PLUS, or dBASE II
SAS *.SAS7BDAT, *.SD7, *.SD2, *.SSD01, *.XPT
SAS versions 6–9 and SAS transport files
Stata *.DTA Stata versions 4–8
Text *.TXT, *.DAT Text files
Database files Various SPSS can read data from any database format for which you have a database driver.
Running SPSS Procedures
Most procedures are accessed via the Analyze menu.
Procedures are grouped according to type, e.g. Reports, Descriptive Statistics, Compare Means, General Linear Model, and so on.
Revised January 8, 2010 Page 13 of 14
Saving and Modifying Output
Results are displayed in the Viewer
You can use the Viewer to:
• Browse results
• Show or hide selected tables and charts
• Change the display order of results by moving selected items
• Export items from the Viewer to other applications
The Viewer is divided into two panes:
• The left pane contains an outline view of the contents.
• The right pane contains statistical tables, charts, and text output.
You can click an item in the outline to go directly to the corresponding table or chart. You can click and drag the right border of the outline pane to change the width of the outline pane.
Revised January 8, 2010 Page 14 of 14
Pivot Tables
Most procedure output is displayed in pivot tables. When opened in the Pivot Table Editor, pivot tables can be modified in the following ways:
• Transposing rows and columns • Moving rows and columns • Creating multidimensional layers • Grouping and ungrouping rows and columns • Showing and hiding rows, columns, and other information • Rotating row and column labels
Exporting SPSS Output to Other Applications
Via the Export selection in the File menu, SPSS saves Viewer output in HTML, text, Word/RTF, Excel, PowerPoint and PDF formats. Charts can also be exported in a number of different graphics formats.
You can export all objects in the Viewer, all visible objects, or only selected objects.
Data Transformations
The Transform menu includes routines which perform transformations on selected variables. These include the following, among others:
COMPUTE Compute values for a variable based on numeric transformations of other variables
COUNT Creates a numeric variable that, for each case, counts the occurrences of the same value (or list of values) across a list of variables
RECODE Allows you to reassign the values of existing variables or collapse ranges of existing values into new values for a new or existing variable
A Date and Time Wizard simplifies a number of common tasks associated with date and time variables, including creating a date/time variable from other variables holding parts of dates or times and calculating with dates and times, such as computing the number of time periods between two dates.
Working with Subsets of Your Data
SELECT CASES Allows you to run procedures on cases selected via a logical expression
SPLIT FILE Splits the active dataset into subgroups that can be analyzed separately