23
POLI 399 – Research Methods Week Two Recoding and Creating Variables, Creating Indices and Reliability Scores with SPSS

Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Embed Size (px)

Citation preview

Page 1: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

POLI 399 – Research Methods

Week TwoRecoding and Creating Variables, Creating Indices and Reliability Scores with SPSS

Page 2: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Today’s Agenda

Questions on assignment Recoding variables Creating variables (“IF”) Creating an index Reliability Scores

Page 3: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Recoding Variables in SPSS

Why recode variables?– There are too few cases in one or more

categories of a variable to allow for analysis.– We need fewer categories in the variable.– We need to build an index to measure a

concept more completely, and we need each variable to have the same categories.

– We need to move from an interval variable to a nominal or ordinal level variable.

Page 4: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Examples of Recoding

Age– Turn the interval variable “age” or “year of birth” into

categories.

Support for Prime Minister– Turn four categories (support, somewhat support, somewhat

oppose, oppose)– Into two categories (support and oppose)

Province of Residence and Region– Turn province of residence (10 provinces, 3 territories)– Into five regions (Atlantic, Quebec, Ontario, West and North)

Page 5: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

How to Recode?

Transform menu → Recode → Into different variables Pick the variable you want to recode → enter name and label

for new variable → click “Change” → click “Old and New Values”

Enter the value or range of values for the value of the new category (For example, for region, NS, NB, NL and PEI are valued 10-13, then enter it into the range pane)

Enter the new value for the new combined category. Do this for all the values in the old variable. Click continue and then OK in the next menu. Go to the “Variable View” – the new variable will be at the

bottom of the list. Label the values for the new variable accordingly.

Page 6: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

In Class Examples

Province– From 12 categories to 5 regional categories– Atlantic = NF (10) + PEI (11) + NS (12) + NB (13)– Quebec = Quebec (24)– Ontario = Ontario (35)– Prairies = MB (46) + SK (47) + AB(48)– BC/North = BC(59) + YK (60) + NWT(61)

Page 7: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Regional Recode - Output

Regions

341 10.9 10.9 10.9

657 20.9 20.9 31.8

1004 32.0 32.0 63.8

668 21.3 21.3 85.1

468 14.9 14.9 100.0

3138 100.0 100.0

Atlantic

Quebec

Ontario

Prairies

BC/North

Total

Valid

Frequency Percent Valid Percent

Cumulative

Percent

province of interview

76 2.4 2.4 2.4

90 2.9 2.9 5.3

89 2.8 2.8 8.1

86 2.7 2.7 10.9

657 20.9 20.9 31.8

1004 32.0 32.0 63.8

150 4.8 4.8 68.6

169 5.4 5.4 74.0

349 11.1 11.1 85.1

468 14.9 14.9 100.0

3138 100.0 100.0

nfld

pei

ns

nb

quebec

ontario

manitoba

sask

alberta

bc

Total

Valid

Frequency Percent Valid PercentCumulative

Percent

Before recode After recode

Page 8: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

In Class Examples

How do you feel about Paul Martin? (pes_f2)– Measured on a thermometer scale of 0 (really

dislike) to 100 (really like)– I want to turn this into five categories– Dislike a lot = 0 to 20– Dislike somewhat = 21 to 40– Neutral = 41 to 60– Like somewhat = 61 to 80– Like a lot = 81 to 100

Page 9: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Like Paul Martin Recode - Output

How do you feel about Paul Martin? (Recoded)

473 15.1 15.9 15.9

447 14.2 15.0 30.8

1012 32.2 33.9 64.8

852 27.2 28.6 93.3

199 6.3 6.7 100.0

2983 95.1 100.0

155 4.9

3138 100.0

dislike a lot

dislike somewhat

neutral

like somewhat

like a lot

Total

Valid

SystemMissing

Total

Frequency Percent Valid Percent

Cumulative

Percent

Before recode

After recode

how do you feel about paul martin?

191 6.1 6.4 6.4

8 .3 .3 6.7

17 .5 .6 7.2

4 .1 .1 7.4

4 .1 .1 7.5

34 1.1 1.1 8.6

5 .2 .2 8.8

6 .2 .2 9.0

7 .2 .2 9.3

86 2.7 2.9 12.1

1 .0 .0 12.2

12 .4 .4 12.6

1 .0 .0 12.6

97 3.1 3.3 15.9

1 .0 .0 15.9

1 .0 .0 15.9

1 .0 .0 16.0

64 2.0 2.1 18.1

128 4.1 4.3 22.4

1 .0 .0 22.4

21 .7 .7 23.1

1 .0 .0 23.2

1 .0 .0 23.2

228 7.3 7.6 30.8

1 .0 .0 30.9

37 1.2 1.2 32.1

1 .0 .0 32.1

1 .0 .0 32.2

565 18.0 18.9 51.1

2 .1 .1 51.2

3 .1 .1 51.3

2 .1 .1 51.4

1 .0 .0 51.4

36 1.1 1.2 52.6

363 11.6 12.2 64.8

2 .1 .1 64.8

2 .1 .1 64.9

83 2.6 2.8 67.7

2 .1 .1 67.8

1 .0 .0 67.8

291 9.3 9.8 77.5

2 .1 .1 77.6

218 6.9 7.3 84.9

2 .1 .1 85.0

6 .2 .2 85.2

243 7.7 8.1 93.3

1 .0 .0 93.4

52 1.7 1.7 95.1

1 .0 .0 95.1

77 2.5 2.6 97.7

13 .4 .4 98.2

1 .0 .0 98.2

1 .0 .0 98.2

2 .1 .1 98.3

1 .0 .0 98.3

50 1.6 1.7 100.0

2983 95.1 100.0

17 .5

23 .7

56 1.8

26 .8

33 1.1

155 4.9

3138 100.0

really dislike him

1

2

3

4

5

6

7

8

10

12

15

19

20

21

22

24

25

30

32

35

36

39

40

44

45

47

49

50

51

52

53

54

55

60

61

62

65

66

69

70

71

75

77

78

80

83

85

89

90

95

96

97

98

99

really like him

Total

Valid

don't know any of the leaders

don't know who he is

don't know/don't know how to

rate him

refused

System

Total

Missing

Total

Frequency Percent Valid Percent

Cumulative

Percent

Page 10: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Recoding Recap

When we recode a variable, we change the variable’s original code to something we want it to be.

We must have a theoretical justification for operationalizing variables (recoding).

We will be recoding variables for the rest of the semester, so it should become easy (or at least easier) with time and practice.

Page 11: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Recoding Using “if” Statement

New variables can be created using “IF” If the result of a conditional expression is true,

the case is included in the selected subset. If the result of a conditional expression is false

or missing, the case is not included in the selected subset.

Page 12: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

How to create a variable using “IF”

Follow the same steps as you would for recoding a variable into a new variable. Use “if” statement when you want specific conditions to be met:

In SPSS dataset, click on Transform, Recode Into Different Variables

In the recode dialog box, click IF. Select Include if case satisfies condition. Enter the conditional expression (=, <, > etc) Click on continue, ok.

Page 13: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Creating an Index

What is an index?– It is a new variable created by adding together a number of

other variables with similar attributes. Why create an index?

– To turn a number of similar variables into one variable. – Simplifies analysis.– To create a single indicator to fully capture a complex

concept . Things to think about before creating an index

– Do the variables to be used go together?– Is there a theoretical basis for putting them together?– Do they measure the same thing?– Are the variables measured in the same direction?

Page 14: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Creating an Index cont…

Examples of indices– Attitudes towards government.– Political participation.– Attitudes towards different policies.

Page 15: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

In Class Example

You are writing your research report on the activities of political parties during an election campaign.

In the CES 2004 survey, there are three questions that ask if you have been contacted by a political party during the campaign

– pes_co_a (contacted by phone)– pes_co_b (contacted in person)– pes_co_c (contacted by mail)

You want to create an index of political communication to measure the frequency by which voters were contacted by political parties.

Page 16: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

In Class Example

Index Creation Check List1. Is there theoretically justification for creating your

index?2. Are all the variables you want to include the index

measured in the same way and in the same direction?

3. Have you removed the “don’t know”, “r volunteers: have not been contacted at all” and “refused” respondents from the variable? (missing values)

4. Have you run a reliability analysis to test whether the variables go together?

Page 17: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

How to Create an Index

Choose the variables to combine Make sure the variables are measured in the same

direction and have similar values assigned to the different categories.

If they do not, recode the variables to make them all consistent.

Make note of the different values assigned to the variables once recoded.

If needed, remove those who answer don’t know or those who refused to answer the questions (use missing values).

Page 18: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Creation of the Index

Recode:

pes_co_a (contact by phone)pes_co_b (contact by person)pes_co_c (contact by mail)

1 = contacted by party 0 = not contacted by party Recode ‘don’t know’ or ‘refused’ responses ‘missing’

Page 19: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Creation of the Index

Compute a new variable.

SPSS: transform menu → compute → enter the name of the new variable in the “target variable” box

→ find newly created variables to add to index in list

→ move them over to the box on the right (“numeric expression”)

→ add three new variables together

→ press OK. (Run frequency table to confirm the index ranges from 0 to 3.)

Page 20: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Reliability Scores

The reliability analysis evaluates what items are to go into the index.

This function uses the internal consistency approach to reliability. (Cronbach’s Alpha)

Calculates the number of items going into the index

Calculates the average inter-item correlation among the variables.

Page 21: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

Cronbach’s Alpha

Ranges from 0 to 1(1 indicates perfect internal consistency and 0 indicates no internal consistency)

Alpha increases with the number of variables in the index and as the relationships between the component variables become stronger

Although there are no hard and fast rules, in this class we will consider .40 an acceptable level.

Page 22: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

How to run reliability scores

In SPSS, click on Analyze, Scale, Reliability Select two or more variables as potential

components of an additive scale (the index). (In our example, pes_co_a, pes_co_b, pes_co_c)

Ensure in the model pane that ALPHA is selected.

Click on ok.

Page 23: Poli_399_Tutorial_Week_Three_-_Sept_29th_(2)

For next time…

We will develop and diagram causal models Read Chapter 12, Section B in Jackson and

Verberg