Introduction to SPSS Allen Risley Academic Technology Services, CSUSM [email protected] 750-4169

34
Introduction to SPSS Allen Risley Academic Technology Services, CSUSM [email protected] 750-4169 http://courses.csusm.edu/ resources/spss/

Transcript of Introduction to SPSS Allen Risley Academic Technology Services, CSUSM [email protected] 750-4169

Page 1: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Introduction to SPSS

Allen RisleyAcademic Technology Services, [email protected]

http://courses.csusm.edu/resources/spss/

Page 2: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

SPSS Workshop Agenda

• Layout of the Program• Adding Data to SPSS• Preparing Data for Analysis• Creating New Variables• Descriptive Data Analysis• Working with SPSS Output

http://courses.csusm.edu/resources/spss/

Page 3: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Layout of the SPSS Program

• SPSS Program Windows

• Menus and Toolbars

• SPSS Options

http://courses.csusm.edu/resources/spss/

Page 4: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

SPSS Program Windows• SPSS Program Windows– Data Editor

• Data View• Variable View

– Output Viewer– Syntax Editor

• File Types– Data: filename.sav– Output: filename.spo– Commands: filename.sps

• Menus and Toolbars

http://courses.csusm.edu/resources/spss/

Page 5: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

SPSS Options• Users can set options to make

program easier to use• Edit menu– Choose Options– On General Tab:

• Display Names & File• h Record Syntax… & Temp. Dir.

– H:\

– On Viewer Tab:• h Display Commands in the Log

http://courses.csusm.edu/resources/spss/

Page 6: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

More SPSS Options– Output Labels Tab

• For Pivot Table Labeling:– Variables in labels shown as

Names and Labels– Variable values in labels shown

as Values and Labels

– Pivot tables Tab• For Tablelook:

– Choose Academic (narrow).tlo

http://courses.csusm.edu/resources/spss/

Page 7: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Adding Data to SPSS

• Use Syntax to Read an Existing Data File

• In-line Data in a Syntax File

• The SPSS Text Import Wizard

• Data Entry in the SPSS Data Editor

• Import from Excel

http://courses.csusm.edu/resources/spss/

Page 8: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Loading Data Using Text Wizard• The SPSS Text Import

Wizard:– File Menu:

• Read Text Data– In Open Data box, enter:

C:\SPSS\grades.txt– Step 1: choose No, Next– Step 2: choose Fixed

Width, No, Next– Step 3: use defaults: Next– Step 4: use defaults: Next

http://courses.csusm.edu/resources/spss/

Page 9: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Loading Data Using Text Wizard• The SPSS Text Import

Wizard:– Step 5: Use these names

and formats:• V1: ID, Numeric• V2: Gender, String• V3: Test1, Numeric• V4: Test2, Numeric• V5: Test3, Numeric• Click on Next

http://courses.csusm.edu/resources/spss/

Page 10: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Loading Data Using Text Wizard• The SPSS Text Import

Wizard:– Step 6: choose No, Yes

• The Yes will open a syntax window with the text of a GET DATA command

– Click on Finish– In the Syntax window

choose the Run Menu• Choose All

– This creates an SPSS data file with the contents of grades.txt

http://courses.csusm.edu/resources/spss/

Page 11: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Loading Data Using Syntax• You can re-use a syntax

file by opening it and running it– File menu

• Open– Syntax…

• You can open a blank syntax window to type in your own commands– File menu

• New– Syntax…

http://courses.csusm.edu/resources/spss/

Page 12: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Other Ways to Load Data• Data Entry in the SPSS

Data Editor

• Import from Excel– File Menu:

• Open– Data

– In Open Data box, enter: C:\SPSS\grades.xls

– Click OK for defaults

http://courses.csusm.edu/resources/spss/

Page 13: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Preparing Data for Analysis

• Variable Formats

• Variable Labels

• Value Labels

• Missing Values

• Copying Data Propertieshttp://courses.csusm.edu/resources/spss/

Page 14: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Formatting Your Variables• Variable Formats– Click on the Variable View

tab of the Data Editor to edit or display formats• Name • Type • Width• Decimals • Label • Values • Missing • Columns • Align • Measure

• Variable Labels – – Type in descriptive text

that explains what the variable measures

http://courses.csusm.edu/resources/spss/

Page 15: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Formatting Your Variables (cont.)• Value Labels – Text that

explains what numeric values stand for– Click in the cell of the Value

column for your variable, enter a Value and Label, click Add

• Missing Values – Defines values that should not be included in calculations– Click in the cell of the Missing

column for the variable, choose either Discrete… or Range… and enter the values

http://courses.csusm.edu/resources/spss/

Page 16: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Creating New Variables

• Collapsing Variables Using Recode

• Computing Variables

• Counting Values in Other Variables

• Ranking Cases

• Date and Time Variables

http://courses.csusm.edu/resources/spss/

Page 17: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Recoding Variables• Recoding renumbers or

collapses the values of a variable– Transform menu

• Recode into different variables

– Highlight variable(s) and move over with arrow

– Fill in a Name and Label for the new variable

– Click Old and New Values

http://courses.csusm.edu/resources/spss/

Page 18: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Recoding Variables

– Specify the Old Value• e.g., 90 through 100, 80

through 89, etc.– Specify a New Value

• e.g., 4 (for an A), 3(for a B), etc.

– Click on the Add button– Repeat until all old and new

values are specified– Old values can be defined as

single values, ranges or missing values

– Add value and variable labels, etc.

http://courses.csusm.edu/resources/spss/

Page 19: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Computing New Variables• Create new variables

using equations or functions– Transform menu

• Compute Variable– Enter a Target Variable

Name – e.g. TestAvg– Build a Numeric

Expression• E.g. – (Test1 + Test2 +

Test3)/3– Click OK

http://courses.csusm.edu/resources/spss/

Page 20: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Other Ways to Create Variables

• Counting Values in Other Variables

• Ranking Cases

• Date and Time Variables

http://courses.csusm.edu/resources/spss/

Page 21: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Descriptive Data Analysis

• FREQUENCIES

• DESCRIPTIVES

• CROSSTABS

• MEANS

http://courses.csusm.edu/resources/spss/

Page 22: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

The FREQUENCIES Procedure• FREQUENCIES creates tables

with counts of cases for each value of the variable

• Analyze Menu:– Descriptive Statistics…

• Frequencies

• Highlight variables to create tables, click the arrow to add to variable list, then click OK

• Statistics, Chart and Format options are available

http://courses.csusm.edu/resources/spss/

Page 23: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

FREQUENCIES Output1. Command syntax2. Summary statistics3. Variable values and

corresponding labels4. Frequency counts for

each value5. Percentages

1. Raw percent2. Valid percents3. Cumulative percents

http://courses.csusm.edu/resources/spss/

Page 24: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

The DESCRIPTIVES Procedure• DESCRIPTIVES creates

tables with summaries of values for variables

• Analyze Menu:– Descriptive Statistics…

• Descriptives

• Highlight variables to create tables, click the arrow to add to variable list, then click OK

• Options are available to choose different statistics

http://courses.csusm.edu/resources/spss/

Page 25: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

DESCRIPTIVES Output

1. Command syntax2. Variable name and

label3. Number of cases4. Statistics:– Minimum– Maximum– Mean– Standard Deviation

http://courses.csusm.edu/resources/spss/

Page 26: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

The CROSSTABS Procedure• CROSSTABS displays the

intersection of values of two or more variables

• Analyze Menu:– Descriptive Statistics…

• Crosstabs

• Highlight variables to create tables, click the arrow to add to Row, Column or Layer variable lists, then click OK

• Statistics, Cells and Format options are available

http://courses.csusm.edu/resources/spss/

Page 27: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Crosstabs Output1. Table title

2. Column variables

3. Row variables

4. Cell counts (# of cases)

5. Column percents (% of

cases in column)

6. Statisticshttp://courses.csusm.edu/resources/spss/

Page 28: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

The MEANS Procedure• MEANS calculates overall

means and group means (defined by independent variables)

• Analyze Menu:– Descriptive Statistics…

• Means

• Highlight variables to create tables, click the arrow to add to Dependent or Independent variable lists, then click OK

• Optional Statistics are available

http://courses.csusm.edu/resources/spss/

Page 29: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

MEANS Output

1. Command syntax2. Numbers of cases

included and excluded3. Dependent variable4. Independent (group)

variable5. Means6. Number of cases7. Standard Deviationshttp://courses.csusm.edu/resources/spss/

Page 30: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Working with SPSS Output

• Editing/Manipulating Tables

• Exporting Output to a File

• Copying and Pasting Output

http://courses.csusm.edu/resources/spss/

Page 31: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Editing SPSS Tables• SPSS Table objects can

be opened for editing before you use them elsewhere– Right-click on the table– SPSS Pivot Table Object– Either Edit or Open

• Text can be formatted, rows or columns removed, footnotes added, etc.

http://courses.csusm.edu/resources/spss/

Page 32: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Exporting SPSS Output to a File• SPSS output can be

exported to other programs

• Either entire output file, or selected tables

• Export to Word, HTML, Excel, Text, PDF, or PowerPoint

http://courses.csusm.edu/resources/spss/

Page 33: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

Copying and Pasting SPSS Output• To copy and paste SPSS

tables from SPSS to Word:– Right-click on the table– Choose Copy– Switch to Word– Click location in the

document– Choose Paste Special– Choose Picture

http://courses.csusm.edu/resources/spss/

Page 34: Introduction to SPSS Allen Risley Academic Technology Services, CSUSM arisley@csusm.edu 750-4169

On-line SPSS Resources at CSUSM

• Academic Technology Services is developing on-line resources for help with SPSS. Visit our SPSS page at:

– http://courses.csusm.edu/resources/spss/

• E-mail Allen Risley at: [email protected]

http://courses.csusm.edu/resources/spss/