Using SPSS

51
Using SPSS

description

Using SPSS. Handy buttons. Switch between values & value labels. Info about variables (& ‘Go To’). Handy buttons. In dialog boxes you always have help nearbye…. Click with the right mouse button on a variable you want to know more about…. Handy buttons. … and you will get variable info…. - PowerPoint PPT Presentation

Transcript of Using SPSS

Page 1: Using SPSS

Using SPSS

Page 2: Using SPSS

Handy buttons

Switch between values & value labels

Info about variables (& ‘Go To’)

Page 3: Using SPSS

Handy buttons

Click with the right mouse button on a variable you want to know more about…

In dialog boxes you always have help nearbye…

Page 4: Using SPSS

Handy buttons

… and you will get variable info…

Page 5: Using SPSS

SPSS output viewerJust let’s make a table with some corre-lations

Page 6: Using SPSS

SPSS output viewerNow, click with the right mouse button on table en choose Open…

Page 7: Using SPSS

SPSS output viewer… and you will get a new window wherein you can edit the table

Page 8: Using SPSS

SPSS output viewer

Now, let’s look at the Pivoting Trays

Page 9: Using SPSS

SPSS output viewer

The pivots of the table…

This pivot represents the statistics

This pivot represents the variables

This pivot represents the variables

Page 10: Using SPSS

SPSS output viewer

Now put the pivot of the statistics in the layer (‘capa’) and the form of the table will change!

Page 11: Using SPSS

SPSS Syntax

In each dialogbox you will see a button Paste (‘Pegar’) to create syntax.

Page 12: Using SPSS

SPSS SyntaxAfter having done Paste (‘Pegar’) you will see a ‘command’ in the syntax window.

Page 13: Using SPSS

SPSS SyntaxYou can as well open a specific syntax file, i.e. Ridge Regression (in the SPSS program folder)

Page 14: Using SPSS

SPSS Syntax

Why would you use syntax???

To do analyses repeatedly

To use all the functions of SPSS (in dialogboxes +/- 95% is incorporated)

To be independent of dialogboxes, that keep changing…(and syntax never changes)

Page 15: Using SPSS

SPSS OptionsMake your SPSS life easy with Edit | Options

For instance by using the session journal file as a syntax file…

Page 16: Using SPSS

Regression & Logistic Regression Revisited

Page 17: Using SPSS

Graphing relationships

Transforming variables

Missing Values

Outliers & Influential Points

Categorical predictors

Regression revisited; topics:

Page 18: Using SPSS

Graphing Relationships

Matrixplot to make a plot of a lot of variables

Page 19: Using SPSS

Specify variables

Graphing Relationships

Page 20: Using SPSS

Result in output window

Graphing Relationships

Page 21: Using SPSS

You can edit the Graph like you edited a table by opening the graph (click with right mouse button on the graph and choose Open)

Graphing Relationships

Page 22: Using SPSS

Graphing Relationships

Now choose Chart | Options

Page 23: Using SPSS

Graphing Relationships

Then ask for a fit line

Page 24: Using SPSS

Graphing Relationships

Some remarks:

-GDP is related in a non linear way with other variables

- variable Aids Cases we have a very influential point (not an outlier, but influential!)

- correlation between female life expectation and male life expectation is almost 1

Page 25: Using SPSS

Graphing Relationships

Gross domestic product / capita

22000.0

20000.0

18000.0

16000.0

14000.0

12000.0

10000.0

8000.0

6000.0

4000.0

2000.0

0.0

30

20

10

0

Std. Dev = 6479.84

Mean = 5860.0

N = 109.00

Let’s try to transform gdp_cap in order to get linear relationships with other variables. First let’s look at the distribution of gdp_cap with a histogram:

We need to bring values on the right closer to values on the left. We might try a LN transformation…

Page 26: Using SPSS

Transforming variables

Page 27: Using SPSS

Transforming variables

The histogram of transformed variable is:

LNGDP

9.54

8.75

7.96

7.18

6.39

5.61

4.82

16

14

12

10

8

6

4

2

0

Std. Dev = 1.43

Mean = 7.88

N = 109.00

Page 28: Using SPSS

Transforming variables

LNGDP

Gross domestic produ

People living in cit

Daily calorie intake

Average female life

Average male life ex

Aids cases

Relationships are nicely linear !

Page 29: Using SPSS

Transforming variables

Note: you probably want to make a variable lifeexp out of life expectancy males and life expectancy females:

Tip: use function Mean in stead of using the ‘+’ and dividing by 2

Page 30: Using SPSS

Categorical Predictors

Is income dependent on years of age and religion ?

Page 31: Using SPSS

Categorical PredictorsCompute dummy variable for each category, except last

Page 32: Using SPSS

Categorical Predictors

And so on…

Page 33: Using SPSS

Categorical Predictors

Block 1

Page 34: Using SPSS

Categorical PredictorsBlock 2

Page 35: Using SPSS

Categorical Predictors

Ask for R2 change

Page 36: Using SPSS

Categorical Predictors

Model Summary

.101a .010 .010 5.424 .010 14.688 1 1421 .000

.172b .030 .026 5.379 .019 7.064 4 1417 .000

Model1

2

R

RSqua

re

Adjusted RSquar

e

Std. Errorof the

EstimateR SquareChange F Change df1 df2

Sig. FChange

Change Statistics

Predictors: (Constant), Age of Respondenta.

Predictors: (Constant), Age of Respondent, Jewish, Cath, None, Protb.

Look at R Square change for

importance of categorical

variable

Page 37: Using SPSS

Categorical Predictors

Zodiac is actually a categorical variable

Page 38: Using SPSS

Categorical PredictorsIndicator coding scheme

Page 39: Using SPSS

Categorical Predictors

Categorical Variables Codings

120 1 0 0 0 0 0 0 0 0 0 0

92 0 1 0 0 0 0 0 0 0 0 0

128 0 0 1 0 0 0 0 0 0 0 0

130 0 0 0 1 0 0 0 0 0 0 0

135 0 0 0 0 1 0 0 0 0 0 0

100 0 0 0 0 0 1 0 0 0 0 0

99 0 0 0 0 0 0 1 0 0 0 0

107 0 0 0 0 0 0 0 1 0 0 0

115 0 0 0 0 0 0 0 0 1 0 0

104 0 0 0 0 0 0 0 0 0 1 0

107 0 0 0 0 0 0 0 0 0 0 1

136 0 0 0 0 0 0 0 0 0 0 0

Aries

Taurus

Gemini

Cancer

Leo

Virgo

Libra

Scorpio

Sagittarius

Capricorn

Aquarius

Pisces

RespondentsAstrologicalSign

Frequency (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11)

Parameter coding

Page 40: Using SPSS

Annotated output of regression analysis (it uses the file

data/elemapi.sav )http://www.ats.ucla.edu/stat/spss/webbooks/reg/chapter1/annotated1.htm

For more on regression, see:

http://www.ats.ucla.edu/stat/spss/webbooks/reg/chapter1/spssreg1.htm

Page 41: Using SPSS

Categorical Predictors

Variables in the Equation

-.003 .004 .584 1 .445 .997

10.515 11 .485

.153 .299 .262 1 .609 1.166

.375 .312 1.441 1 .230 1.455

-.167 .309 .294 1 .587 .846

-.348 .317 1.200 1 .273 .706

.211 .288 .535 1 .464 1.235

.260 .310 .705 1 .401 1.297

-.014 .323 .002 1 .966 .986

.219 .306 .515 1 .473 1.245

.176 .302 .339 1 .560 1.192

.206 .308 .448 1 .503 1.229

-.298 .333 .800 1 .371 .743

-1.170 .274 18.221 1 .000 .310

AGE

ZODIAC

ZODIAC(1)

ZODIAC(2)

ZODIAC(3)

ZODIAC(4)

ZODIAC(5)

ZODIAC(6)

ZODIAC(7)

ZODIAC(8)

ZODIAC(9)

ZODIAC(10)

ZODIAC(11)

Constant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: AGE, ZODIAC.a.

Page 42: Using SPSS

Outliers

Page 43: Using SPSS

Outliers

Page 44: Using SPSS

Outliers

Saving residuals

Page 45: Using SPSS

Influential Points

Page 46: Using SPSS

Influential Points

Page 47: Using SPSS

Influential Points

Saving distances and influence measures as variables

Page 48: Using SPSS

Multicollinearity

Diagnostics

Page 49: Using SPSS

Multicollinearity

Page 50: Using SPSS

Multicollinearity

Page 51: Using SPSS

Multicollinearity