Lab10

Lab 10

Pol242 Lab Manual: Lab 10

Applying Weights

 

Purpose

  • To Practice applying weights to survey data
  • To Use the Weight command to enter published tables into SPSS

 

Main Points

  • The samples from which survey data are collected often do not match the population they are intended to represent.
  • Researchers therefore often weight their data for analysis.
  • Data sets often contain one of more data weights for use in analysis.
  • Consulting the codebook will provide information on the appropriate .weights to use
  • The SPSS command is: Weight by
    • In the CES the appropriate variable is WGTSAMP
    • In the ANES the appropriate variable is weight_full

 

Example 1

 

Data Set

CES2011

 

Syntax

*Weighting the Data*.
Weight by WGTSAMP.

*Using Syntax from Lab 1*.

*Preparing a Y indicator-Cdn Attitudes re Inequality*
missing values pes11_41 (8,9).
recode PES11_41 (1=1) (2=.75) (3=.5) (4= .25) (5=0) into undogap.
value labels undogap 0 'muchless' .25 'someless' .5 'asnow'
.75 'somemore' 1 'muchmore'.

*frequency analysis for Y*.
fre var undogap.

*Preparing the X indicator- party identification*.
recode cps11_71 (2=1) (1=2) (4=3) (3=4) (5=5) (6 =6) into PID.
value labels PID 1 'Cons' 2 'Lib' 3 'BQ' 4 'NDP' 5 'Green' 6 'None'.

*frequency analysis for Y1*.
fre var PID.

Syntax Legend

 

The weight command is used prior to the syntax used in Lab 1.

 

 

Output

 

 

undogap
Frequency Percent Valid Percent Cumulative Percent
Valid muchless 49 1.4 2.0 2.0
someless 60 1.7 2.4 4.3
asnow 511 14.8 20.4 24.8
somemore 969 28.0 38.7 63.5
muchmore 914 26.4 36.5 100.0
Total 2503 72.3 100.0
Missing System 959 27.7
Total 3462 100.0

 

 

 

PID
Frequency Percent Valid Percent Cumulative Percent
Valid Cons 897 25.9 28.3 28.3
Lib 806 23.3 25.4 53.7
BQ 290 8.4 9.1 62.9
NDP 371 10.7 11.7 74.6
Green 84 2.4 2.6 77.2
None 722 20.9 22.8 100.0
Total 3170 91.6 100.0
Missing System 292 8.4
Total 3462 100.0

 

 

Interpretation of Output

 

These results differ somewhat from those reported in Lab 1.

These figures more closely represent the population values than those reported in Lab 1.

 

 

Example 2

 

Entering Published crosstabulations into SPSS

  • Another use of the Weight command is to enter crosstabulated data.
  • This is handy when you wish to calculate measures of association or statistical significance for a published crosstabulation.
  • On the data list command the variable names are listed DV first and IV second. A third variable called count represents the number of cases a cell.
  • The cell entries are entered using he coordinates for the table. The first number defines the row, the second defines the column. The third number is the number of cases in the cell defined by the row and column numbers.
  • Variable labels and value labels are entered as usual.
  • The weight command tells SPSS how many cases to put in the cells.
  • The crosstabulation follows the usual pattern.

Entering Crosstabulated Data

(Using data from a paper under review at CJPS)

*Aboriginal Attitudes Paper for CJPS*.

 

data list free / influence group count.
begin data.
1 1 19
1 2 330
2 1 25
2 2 525
3 1 20
3 2 420
4 1 32
4 2 225
end data.
variable labels influence 'undue influence' group 'group'.
value labels influence 1 'Str Agree' 2 'Some Agree' 3 'Some Disagree' 4 'Str Disagree'.
value labels group 1 'Aborig' 2 'not'.

weight by count.
crosstabs tables = influence by group
   /cells = column count
   /statistics = all.