8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Some birds, a cool cat and a wolf
Dick Wiggins, City University, London
Gopal Netuveli, Imperial College, University of London
Tricks of the trade
RSS Official Statistics/Statistical Computing Section 18th May 2005
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Acknowledgments
• Economic and Social Research Council
• Human Capability and Resilience Network
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Missing data is a pervasive fact of
life.
finsi
tn
socn
etw
rk
bem
p
cem
p
dem
p
eem
p
fem
p
gem
p
hem
p
iem
p
jem
p
kem
p
casp
1
casp
2
casp
3
casp
4
casp
5
casp
6
casp
7
casp
8
casp
9
casp
10
casp
11
casp
12
casp
13
casp
14
casp
15
casp
16
casp
17
casp
18
casp
19
No
of
mis
sing
va
lues
(a)
no o
f ca
ses(
b)
number of missing cells(a*b)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 58 0+ + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 2 2+ + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + 1 1 1+ + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 2 2+ + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + 1 1 1+ + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + 1 1 1+ + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + 1 1 1+ + + + + + + + + . . + + + + + + + + + + + + + + + + + + + + 2 1 2+ + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + 1 2 2+ + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + 1 1 1+ + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . 19 1 19. . + + + + + + + + + . . . . . . . . . . . . . . . . . . . . 22 2 44. . + + + + + + + + . . . . . . . . . . . . . . . . . . . . . 23 3 69. . + + + + + + + . . . . . . . . . . . . . . . . . . . . . . 24 3 72. . + + + + + + . . . . . . . . . . . . . . . . . . . . . . . 25 1 25. . + + + + + . . . . . . . . . . . . . . . . . . . . . . . . 26 2 52. . + . + + + . . . . . . . . . . . . . . . . . . . . . . . . 27 1 27. . + + + + . . . . . . . . . . . . . . . . . . . . . . . . . 27 1 27. . + + + . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3 84. . + + . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 6 174. . + . + . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1 29. . + . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 1 30. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5 155
Total 820Not Missing Missing Percentage (/(35*100)) 23.4
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Sample dataset
100 records randomly selected from British Household Panel Survey with the condition that all cases had complete information on age, sex and socio-economic position. The data contains variables selected from wave 1 and wave11.
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Terminology
Unit nonresponse: complete absence of any information from a sampled individual or case.
Item nonresponse: an individual who cooperates but for some reason has missing values for certain items.
Attrition: In longitudinal data, attrition is the cumulative rate of unit nonresponse across waves.
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Levels of measurement• Nominal
• Values are just names e.g. 1 = male 2 = female
• Ordinal• Inherent ranking, but intervals are not equal e.g.
RG’s social class
• Interval• Numerical, intervals are meaningful, but no zero
e.g. temperature scales Celsius and Farenheit
• Ratio• Numerical, meaningful intervals, zero defined e.g.
height, income
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
How is your measure distributed?
The distribution of the measure is important and needs to be specified.
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Percentage of missingness (Lambda) = number of missing values/number of values *100
• Pattern of missingness -monotone
bem
p
cem
p
dem
p
eem
p
fem
p
gem
p
hem
p
iem
p
jem
p
finsi
tn
socn
etw
rk
kem
p
casp
1
casp
2
casp
3
casp
4
casp
5
casp
6
casp
7
casp
8
casp
9
casp
10
casp
11
casp
12
casp
13
casp
14
casp
15
casp
16
casp
17
casp
18
casp
19N
o of
m
issi
ng
valu
es(a
)no
of
case
s(b) number of
missing cells(a*b)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 58 0+ + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . 19 1 19+ + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . 22 2 44+ + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . 23 3 69+ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . 24 3 72+ + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . 25 1 25+ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2 52+ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1 27+ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3 84+ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 6 174+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 1 30. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5 155
Total 751Not Missing Missing Percentage (/(35*100)) 21.5
Lambda for both monotone and non-monotone missingness = 820/3500 = 23.4
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Process of missingness
1. Missing completely at random (MCAR) assumes that missing values are a simple random sample of all data values.
2. Missing at random (MAR) assumes that missing values are a simple random sample of all data values with in subclasses defined by observed data.
3. Missing not at random (MNAR)
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
MCAR, MAR, MNAR
Let Y represent the data which actually consists of Yobs (observed data) and Ymis (missing data)
Let the missingness be described by a binary variable RR = 1 if data is missing, 0 otherwiseThen a simple way of describing the pattern of missingness
will be by evaluating the probability P(R=1) using the data Y. P(R=1|Y)
In MCAR we can not evaluate that probability using YIn MAR we assume we can evaluate the probability using
Yobs, Ymis is not neededIn MNAR, we need both Yobs & Ymis to evaluate the
probability
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Dick’s menagerie
• The Ostrich
• The Hawk
• The Cuckoo
• The Owl
• The Pussycat
• The Wolf
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
The Ostrich aka Listwise Deletion
Ignores missingness i.e. assumes MCAR and drops all cases with missing values.
The Hawk aka ad hoc methods
Ad hoc methods used are pairwise deletion, mean substituition, last value carry forward
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
The Cuckoo aka hot decking
Like the cuckoo, hot decking ‘steals’ from other complete records to replace missing records
The choice of the complete record is based on a set of observed variables so that the complete and the missing records are as much similar as possible
Substituting from an adjacent record is a very simple application of this principle on the assumption that adjacent records will be very similar
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
The Owl aka Multiple imputation
• Works with standard complete-data analysis methods
• One set of imputations may be used for many analyses
• Can be highly efficient
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
MULTIPLE IMPUTATION
Generate m>1 plausible versions of Ymis
Analyze each of the m datasets by standard complete data methods
Combine results
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Efficiency= 1/(1+(proportion missing/No. of imputations))
70
75
80
85
90
95
100
3 5 10 20
Number of imputations
Eff
icie
nc
y
0.1
0.3
0.5
0.7
0.9
Lambda
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Rubin’s rule for combining estimate
Point estimate: Average of point estimates from each imputed sample
Variance estimate: Average of within imputation variance + between imputation variance inflated by a factor equal to (1+(1/number of imputations))
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
The Pussy Cat – Modelling(Heckman 2 step procedure)
• What is modelled? – The probability of having a missing value
based on fully observed characteristics (e.g. age, sex, socio-economic status)
AND – The model of interest (e.g. predictors of
casp19)
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Equations
P(R=1) = f (age, sex, ses) Step 1
CASP-19= f (age, sex, financial situation, social network, P(R=1)) Step 2
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Strengths and weaknesses
• Strength: Useful for sensitivity analysis. If the error terms in step 1 and step 2 are significantly correlated then MNAR should be considered.
• Weakness: Full information needed on variables in step 1
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Setting up the illustration in STATA
• Listwise: default
• Hotdeck single imputation
• Multiple imputation m=5
• Heckman ML
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Comparison of results from different methods used to manage missingness
Significant coefficients are emboldenedHot deck stratification by agegr & sexHeckman sample equation = -0.08 agegr+0.06 sex+ -0.12 sesRho (correlation of errors terms in selection and sustantive equations)
significantly different from 0. (p <0.0001). MNAR to be considered.
8 5 5 5 2 4 4 8 78 1 0 7 1 7 1 5 7 7
0 1 7 0 6 5 6 8 5 1 31 2 2 1 1 4 3 7 51 1 1 6 7 1 1 5 8 03 3 4 3 4 8 3 73 1 0 8 0 1 6 4 1 1 44 6 2 2 0 6 1 3 7 4 26 0 3 2 1 8 0 7 8 6
4 6 4 3 4 3 4 7 30 5 0 5 5 2 6 4 1 0 04 4 6 5 2 2 8 5 6 5
Advice
• Don’t be an Ostrich
• Ignore the Hawk
• Be the Cuckoo if Lambda is small
• Otherwise, use the Owl
• Always stroke the Pussy Cat
• Await the Wolf