99
A Simple Guide to Using SPSS © for Windows By: Julia Hartman

A Simple Guide to Using SPSS © for Windows By: Julia Hartman

  • View
    228

  • Download
    3

Embed Size (px)

Citation preview

Page 1: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

A Simple Guide toUsing SPSS© for Windows

By: Julia Hartman    

Page 2: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

2

Using SPSS© for Windows

• Introduction• Data procedures• Statistical procedures• Syntax files• Editing output

Page 3: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

3

Introduction

Page 4: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

4

Steps for Analyzing Data

• Enter the data• Select the procedure and options• Select the variables• Run the procedure• Examine the output

Page 5: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

5

Common Operations - Menu Options

• In the menu, click Statistics

• Choose Summarize

• Click Frequencies

Page 6: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

6

Common Operations - Variables Dialog BoxThis type of dialog box is used for many procedures.

Variables are selected from the list on the left.

Click the arrowto move them to theappropriate box on the right.

Page 7: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

7

Using SPSS© for Windows -Data Procedures

• Ways to Enter Data• Entering Data Directly

– Defining variables– Entering data

• Viewing Data • Recoding Variables• Computing New Variables• Selecting Cases

Page 8: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

8

Ways to Enter the Data

• SPSS datafile

• Import data– Database file– Spreadsheet file– ASCII text file

• Enter data directly with Data Editor

Page 9: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

9

Entering Data Directly-Define the Variables

Page 10: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

10

Entering Data Directly-Define the Variable

• Name• Type and size• Labels• Missing values

Page 11: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

11

Define the Variable - Name

• Name the variable– No more than 8

characters– Each name unique– Must begin with a

letter– Certain characters

not allowed– Not case sensitive

Page 12: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

12

Define the Variable - Type

• Define the variable type.

• Define the variable width.

• Define the number of decimal places.

Page 13: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

13

Define the Variable - Labels

• Labels will be displayed in the output.

• Variable Label– can be more descriptive

than variable name

• Value Labels– useful for files that use numeric

codes

Page 14: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

14

Define the Variable - Missing Values

• Missing values are used to define user-specified missing information.– No response

– Refused to answer

– Data entry mistakes

Page 15: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

15

Define the Variable - Column Format

Column Format is used to define column width

and alignment in theData Editor window

Page 16: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

16

Entering Data Directly

• Each row is a case(e.g., survey form).

• Enter the value for each variable.

• Press <Tab> key or right arrow key to move to next variable.

Page 17: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

17

Entering Data Directly

• Leave blank or use user-defined missing value if no answer.

• Press <Enter> key to move to next case.

Page 18: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

18

Change the View - Value LabelsData entered as numeric codes can be displayed as value labels.

• In the menu, click View

• Click Value Labels

Page 19: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

19

Recode Procedure

Recode is used to• to change the values of

an existing variable• to create a new

variable based on the values an existing variable

Page 20: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

20

Recode into New Variable

• In the menu, click Transform.

• Select Recode.• Click

Into Different Variable(s)

Page 21: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

21

Recode into New Variable

• Select and move variable(s) over.

• Name and label new variable.

• Click Old and New Values

Page 22: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

22

Recode into New Variable

For each value of the existing variable

• Repeat for each value or range of values

• Click Continue

• Enter the old value• Enter the new value• Click Add

Page 23: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

23

Recode into New Variable

• Click Change

• Click OK

Page 24: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

24

Define Labels for New Variable

• In the Data menu, click Define Variable.

• Click Labels.

• Enter value labels for the new variable.

• Click Continue.

Page 25: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

25

Compute Procedure

Compute is used to create a new variable.

• In the menu, click Transform.

• Click Compute.

Page 26: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

26

Compute Procedure

• Name the newvariable.

• Click Type&Label to define the characteristics of the new variable.

Page 27: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

27

Compute Procedure

• Label the newvariable.

• Enter the variable type.

Page 28: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

28

Compute Procedure

• Enter the numeric expression thatwill determine the values of the new variable.

• Click OK.

Page 29: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

29

Select Cases

For a subset of the datafile, use Select Cases.

• In the menu, click Data.• Click

Select Cases...

Page 30: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

30

Select Cases - Alcohol drinkers only

To select only those cases which meet certain criteria, choose the If option.

Page 31: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

31

Select Cases - Alcohol drinkers only

• Enter the expression thatwill determine which variables will be selected.

• Click Continue.

Page 32: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

32

Select Cases - Alcohol drinkers only

When you’ve finished specifying selection criteria, click OK.

Page 33: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

33

Using SPSS© for Windows -Statistical Procedures• Summarizing Data

– Frequencies– Crosstabs (Chi Square)

• Comparing Means– T-Tests– One-Way Analysis of Variance

• Nonparametric Tests– Wilcoxon Signed Ranks– Mann-Whitney U– Kruskal-Wallis

Page 34: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

34

Frequencies

• In the menu, click Statistics

• Choose Summarize

• Click Frequencies

Page 35: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

35

Frequencies

• Select and move the variables.

• Click Statistics.

Page 36: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

36

Frequencies

• Choose the appropriate statistics.

• Click Continue.

Page 37: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

37

Frequencies - Charts

For histograms or other charts, click Charts.

Page 38: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

38

Frequencies

Choose the type of chart and click Continue

Page 39: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

39

Frequencies

To select the format of the table(s), click Format.

Page 40: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

40

Frequencies

Choose the format and click

Continue

Page 41: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

41

Frequencies

Click OK to run the Frequencies

procedure.

Page 42: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

42

Frequencies - Format optionOrganize Output by Variables

Page 43: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

43

Frequencies - Format OptionCompare Variables

Page 44: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

44

Frequencies - Distribution TableApgar 1 minute score

8 1.2 1.9 1.9

4 .6 .9 2.8

2 .3 .5 3.3

3 .5 .7 4.0

11 1.7 2.6 6.6

9 1.4 2.1 8.7

13 2.0 3.1 11.8

38 5.7 9.0 20.8

170 25.6 40.1 60.8

145 21.8 34.2 95.0

21 3.2 5.0 100.0

424 63.9 100.0

240 36.1

664 100.0

0

1

2

3

4

5

6

7

8

9

10

Total

Valid

SystemMissing

Total

Frequency PercentValid

PercentCumulative

Percent

Page 45: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

45

Frequencies - Histogram

Apgar 1 minute score

10.08.06.04.02.00.0

Apgar 1 minute scoreF

req

ue

ncy

300

200

100

0

Std. Dev = 1.83

Mean = 7.8

N = 424.00

Page 46: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

46

Crosstabs

• In the menu, click on Statistics

• Choose Summarize

• Click Crosstabs

Page 47: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

47

Crosstabs• Move the outcome

variable(s) to the Row(s) box.

• Move the predictor variable(s) to the Column(s) box.

• Click Statistics.

Page 48: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

48

Crosstabs

• Select the appropriate statistics.

• Click Continue.

Page 49: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

49

Crosstabs

To select the counts, percentages, and residuals to be displayed in each cell, click Cells.

Page 50: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

50

Crosstabs

• Select the information to be displayed in each cell.

• Click Continue.

Page 51: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

51

Crosstabs

To run the Crosstabs procedure, click OK.

Page 52: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

52

Crosstabs - Output

Case Processing Summary

45

95.7%

2

4.3%

47

100.0%

N

Percent

N

Percent

N

Percent

CasesValid

Missing

Total

Birthweight category *Smokes cigarettes

Page 53: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

53

Crosstabs - OutputBirthweight category * Smokes cigarettes Crosstabulation

0 8 8

3.2 4.8 8.0

.0% 100.0% 100.0%

.0% 29.6% 17.8%

.0% 17.8% 17.8%

18 19 37

14.8 22.2 37.0

48.6% 51.4% 100.0%

100.0% 70.4% 82.2%

40.0% 42.2% 82.2%

18 27 45

18.0 27.0 45.0

40.0% 60.0% 100.0%

100.0% 100.0% 100.0%

40.0% 60.0% 100.0%

Count

Expected Count

% within Birthweightcategory

% within Smokescigarettes

% of Total

Count

Expected Count

% within Birthweightcategory

% within Smokescigarettes

% of Total

Count

Expected Count

% within Birthweightcategory

% within Smokescigarettes

% of Total

Low birthweight

Normal birthweight

Birthweightcategory

Total

no yes

Smokes cigarettes

Total

Page 54: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

54

Independent Samples T-Test

• In the menu, click Statistics.

• Choose Compare Means.

• Click Independent Samples T-Test.

Page 55: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

55

Independent Samples T-Test

• Select and move– Test Variable(s)

– Grouping Variable

• Click Define Groups.

Page 56: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

56

Independent Samples T-Test

• Enter the values for the groups.

• Click Continue.

Page 57: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

57

Independent Samples T-Test

Click OK to run the procedure.

Page 58: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

58

Independent Samples T-Test - Output

Group Statistics

14 8.14 .95 .25

20 6.70 2.98 .67

Smokes cigarettes?no

yes

Apgar 1 minute scoreN Mean

Std.Deviation

Std. ErrorMean

Independent Samples Test

11.107 .002 1.746 32 .090 1.44 .83 -.24 3.13

2.026 24.180 .054 1.44 .71 -2.61E-02 2.91

Equal variancesassumed

Equal variances notassumed

Apgar 1 minute scoreF Sig.

Levene's Test forEquality of Variances

t dfSig.

(2-tailed)Mean

DifferenceStd. ErrorDifference Lower Upper

95% ConfidenceInterval of the

Difference

t-test for Equality of Means

Page 59: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

59

One-Way Analysis of Variance

• In the menu, click on Statistics.

• Choose Compare Means.

• Click One-Way Analysis of Variance.

Page 60: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

60

One-Way Analysis of Variance

• Move the dependent variable(s) to the Dependent List box.

• Move the grouping variable(s) to the Factor box.

• For comparison tests, click Post Hoc.

Page 61: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

61

One-Way Analysis of Variance

• Select the appropriate Post Hoc comparisons.

• Click Continue.

Page 62: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

62

One-Way Analysis of Variance

Click Options for• Descriptive statistics• Homogeneity of

variance• Mean plots• Missing values options

Page 63: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

63

One-Way Analysis of Variance

Make appropriate selections, then click

Continue.

Page 64: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

64

One-Way Analysis of Variance

To run the One-way ANOVA

procedure, click OK.

Page 65: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

65

Test of Homogeneity of Variances

BTWT

1.384 3 647 .246

LeveneStatistic df1 df2 Sig.

One-Way Analysis of Variance - Output

Descriptives

BTWT

90 2888.72 599.25 63.17 2763.21 3014.23 670 3856

254 3031.24 602.39 37.80 2956.80 3105.68 706 4820

84 3050.98 632.61 69.02 2913.69 3188.26 506 4224

223 3264.89 525.97 35.22 3195.48 3334.30 1049 4734

651 3094.12 594.67 23.31 3048.36 3139.89 506 4820

Underweight

Normal

Overweight

Obese

Total

N MeanStd.

Deviation Std. ErrorLowerBound

UpperBound

95% Confidence Intervalfor Mean

Minimum Maximum

Page 66: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

66

ANOVA

BTWT

11460978 3 3820325.9 11.318 .000

2.18E+08 647 337556.868

2.30E+08 650

Between Groups

Within Groups

Total

Sum ofSquares df

MeanSquare F Sig.

One-Way Analysis of Variance - Output

Page 67: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

67

One-Way Analysis of Variance - Output

Multiple Comparisons

Dependent Variable: BTWT

Tukey HSD

-142.52 71.271 .188 -325.62 40.58

-162.25 88.143 .254 -388.70 64.19

-376.17* 72.556 .000 -562.57 -189.77

142.52 71.271 .188 -40.58 325.62

-19.74 73.127 .993 -207.60 168.13

-233.65* 53.317 .000 -370.62 -96.68

162.25 88.143 .254 -64.19 388.70

19.74 73.127 .993 -168.13 207.60

-213.92* 74.379 .021 -405.00 -22.83

376.17* 72.556 .000 189.77 562.57

233.65* 53.317 .000 96.68 370.62

213.92* 74.379 .021 22.83 405.00

(J) BMI CategoryNormal

Overweight

Obese

Underweight

Overweight

Obese

Underweight

Normal

Obese

Underweight

Normal

Overweight

(I) BMI CategoryUnderweight

Normal

Overweight

Obese

MeanDifference

(I-J) Std. Error Sig.LowerBound

UpperBound

95% Confidence Interval

The mean difference is significant at the .05 level.*.

Page 68: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

68

Wilcoxon Signed Ranks Test

• In the menu, click Statistics

• Choose Nonparametric Tests

• Click 2 Related Samples

Page 69: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

69

Wilcoxon Signed Ranks Test

• Move selected variable pairs to the Test Pair(s) List box.

• Choose the statistical test(s).

• Click Options...

Page 70: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

70

Wilcoxon Signed Ranks Test

Check Descriptives box for descriptive

statistics.

Page 71: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

71

Wilcoxon Signed Ranks Test

Click OK to run the procedure.

Page 72: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

72

Wilcoxon Signed Ranks TestRanks

0a .00 .00

27b 14.00 378.00

7c

34

Negative Ranks

Positive Ranks

Ties

Total

Apgar 5 minute score -Apgar 1 minute score

N Mean RankSum ofRanks

Apgar 5 minute score < Apgar 1 minute scorea.

Apgar 5 minute score > Apgar 1 minute scoreb.

Apgar 1 minute score = Apgar 5 minute scorec. Test Statisticsb

-4.631a

.000

Z

Asymp. Sig. (2-tailed)

Apgar 5minutescore -Apgar 1minutescore

Based on negative ranks.a.

Wilcoxon Signed Ranks Testb.

Page 73: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

73

Mann-Whitney U Test

• In the menu, click Statistics

• Choose Nonparametric Tests

• Click 2 Independent Samples

Page 74: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

74

Mann-Whitney U Test

• Select and move– Test Variable(s)

– GroupingVariable

• Click Define Groups.

Page 75: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

75

Mann-Whitney U Test

• Enter the values for the groups.

• Click Continue.

Page 76: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

76

Mann-Whitney U Test

• Click Options.

• After changing options, click Continue.

• Click OK to run the procedure.

Page 77: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

77

Mann-Whitney U Test - OutputDescriptive Statistics

34 7.29 2.44 0 9

47 .60 .50 0 1

Apgar 1 minute score

Smokes cigarettes?

N MeanStd.

Deviation Minimum Maximum

Ranks

14 19.89 278.50

20 15.82 316.50

34

Smokes cigarettes?no

yes

Total

Apgar 1 minute scoreN Mean Rank

Sum ofRanks

Test Statisticsb

106.500

316.500

-1.238

.216

.245a

Mann-Whitney U

Wilcoxon W

Z

Asymp. Sig. (2-tailed)

Exact Sig. [2*(1-tailedSig.)]

Apgar 1minutescore

Not corrected for ties.a.

Grouping Variable: Smokes cigarettes?b.

Page 78: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

78

Kruskal-Wallis Test

• In the menu, click Statistics

• Choose Nonparametric Tests

• Click K Independent Samples

Page 79: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

79

Kruskal-Wallis Test

• Move the dependent variable(s) to the Test Variable List box.

• Move the grouping variable(s) to the Grouping Variable box.

• Click Define Range.

Page 80: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

80

Kruskal-Wallis Test

• Enter the minimum and maximum values for the Grouping Variable.

• Click Continue.

Page 81: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

81

Kruskal-Wallis Test

• Check the box for the Kruskal-Wallis H.

• Click OK to run the procedure.

Page 82: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

82

Kruskal-Wallis Test - OutputRanks

201 242.52

340 347.55

108 407.53

649

Age group<20

20-29

30+

Total

BMIN Mean Rank

Test Statisticsa,b

64.743

2

.000

Chi-Square

df

Asymp. Sig.

BMI

Kruskal Wallis Testa.

Grouping Variable: Age groupb.

Page 83: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

83

Using SPSS© for Windows -Editing the Output

• Pivot Tables• Scatterplots• Charts

Page 84: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

84

Scatterplot

• In the menu, click on Graphs.

• Choose Scatter….

Page 85: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

85

Scatterplot

• Choose the appropriate type of plot.

• Click Define.

Page 86: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

86

Scatterplot

• Select and move the variables for the X and Y axes to the appropriate box.

• Click OK to run the procedure.

Page 87: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

87

BMI

70605040302010

BT

WT

5000

4000

3000

2000

1000

0

Scatterplot - Output

Regression line must be added.

Page 88: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

88

Edit the Scatterplot

In the Output Window• Click the chart object to select it.

• In the menu, click Edit. • Choose SPSS Chart Object.

• Click Open.

Page 89: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

89

Scatterplot

The Chart Window

will open.

Page 90: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

90

Edit the Scatterplot

In the Chart Window• In the menu, click Chart.

• Click Options.

Page 91: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

91

Edit the Scatterplot

• Check the Total box.• Click OK.

Page 92: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

92

Scatterplot - Output

Regression line is added.

BMI

70605040302010

BT

WT

5000

4000

3000

2000

1000

0

Page 93: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

93

Syntax Files

A Syntax File is a text file that contains SPSS commands.

Page 94: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

94

Uses for Syntax Files

• Some commands and options are available only by using command syntax.

• Syntax files let you save a program so you can repeat it or edit it to use different variables.

• Syntax files let you run a program using SPSS Production Facility.

Page 95: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

95

Copying to a Syntax File

The Paste button copies the

commands for a procedure into a

syntax file.

Page 96: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

96

Editing Syntax Files

A syntax file can be edited in the Syntax Editor window.

Page 97: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

97

Opening a New Syntax File

A new Syntax File can be opened from the File menu.

Page 98: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

98

Running Syntax Files

A syntax file can be edited in the Syntax Editor window.

Page 99: A Simple Guide to Using SPSS © for Windows By: Julia Hartman

99

SPSS KeyWords newsletter:http://www.spss.com/keywords/

Chi Squarehttp://vflylab.calstatela.edu/edesktop/VirtApps/VflyLab/ChiSqBg.html