SlideShare a Scribd company logo
HANDLING MISSING DATA
1
MISSING DATA
• Missing data are observations that we intend to make but couldn’t.
• Answering only certain questions to a questionnaire
• Not measuring the temperature due to extreme cold
• Not answering income due to being too rich…
• When we have missing data, our goal remains the same with what it was if
have the complete data. So, the analysis are now more complex.
• How to denote missing data:
• SAS .
• S+ and R NA or na
• -9999 or something like this (Be careful! Make sure that the number is not
in the dataset and no use them in the analysis)
2
Missingness Mechanism
• Before starting any analysis with incomplete data, we have to clarify the
nature of missingness mechanism which causes some values being missing.
Previously, there was common belief that the mechanism was random but
it was really as it was thought?
• Generally, there are two notions accepted for missingness mechanism by all
researchers: ignorable and non-ignorable missingness mechanism.
• If the mechanism is ignorable we don’t have to care about it and we can
ignore it confidently before missing data analysis but if it is not we have to
model the mechanism also as part of the parameter estimation.
• Identifying the missingness mechanism with a statistical approach is still
being a tough problem and so try to develop some diagnostic procedure on
missingness mechanism is an important research topic.
3
Missingness Mechanism
• Rubin (1976) specified three types of assumptions on missingness mechanism:
• Missing Completely at Random (MCAR)
• Missing at Random (MAR)
• Missing Not at Random (MNAR).
• MCAR and MAR are in class of ignorable missingness mechanism but MNAR is in
class of non-ignorable mechanism.
• MCAR assumption is generally difficult to meet in reality and it assumes that
there is no statistically significant difference between incomplete and complete
cases. In other words, the observed data points can only be considered as a
simple random sample of the variables you would have to analyze. It assumes
that missingness is completely unrelated to the data (Enders, 2010). In this case,
there is no impact of missingness affecting on the inferences. Little (1988)
proposed a chi-square test for diagnosing MCAR mechanism so called Little’s
MCAR test.
4
Missingness Mechanism
• Failure to confirm the assumption of MCAR using statistical tests means that the
missing data mechanism is either MAR or MNAR.
• Unfortunately, it is impossible to determine whether a mechanism is MAR or
MNAR. This is an important practical problem of missing data analysis and
classified untestable assumption because we do not know the values of the
missing scores, we cannot compare the values of those with and without missing
data to see if they differ systematically on that variable (Allison, 2001).
• The most of the missing data handling approaches especially EM algorithm and
MI relies on MAR assumption (Schafer, 1997). If we can decide that the
mechanism that causes missingness is ignorable in such a way, then assuming the
mechanism is MAR seems suitable for further analysis. Conducting the EM
algorithm and MCMC based MI under MCAR assumption will be also appropriate,
since the mechanism of missingness is ignorable (Schafer, 1997).
5
Missingness Mechanism
6
Missingness Mechanism
7
Missingness Mechanism
8
Missing Completely at Random (MCAR)
9
Missing Completely at Random (MCAR)
10
Missing at Random
11
Missing at Random
12
Missing Not at Random
13
Missing Data Patterns
(a) (b) (c)
𝑌1 𝑌2 𝑌3 𝑌4 𝑌1 𝑌2 𝑌3 𝑌4 𝑌1 𝑌2 𝑌3 𝑌4
m
m m
m m m m
m m m m m m m
Figure 1.1:Three prototypical missing data pattern: (a) monotone missingness,
(b) univariate missingness, (c) arbitrary missingness
14
Ways to Understand the Missingness
Mechanism within the Data
15
Ways to Understand the Missingness
Mechanism within the Data
• It is not possible to extract missing data patterns from observed data
but you can explore data to get a sense.
e.g. Assume there are missing data in X1 variable. Divide X2 and X3 into
2 parts from where X1 is missing and investigate two parts separately. If
the results (summary measures or inferences) are different in two part,
the missingness in X1 is possibly not at random.
X1 X2 X3
missing
16
Ways to Understand the Missingness
Mechanism within the Data
• Although you can and should explore data, you need to make a
reasonable assumption for missing data.
• MCAR is a stronger assumption than MAR, and MNAR is hard to
model. There is usually very little we can do when the case is missing
not at random. Usually, MAR is assumed.
• Ask experts why data are missing?
17
Dealing with Missing Data
• Use what you know about
• Why data are missing
• Distribution of missing data
• Decide on the best analysis strategy to yield the least biased
estimates
18
Deletion Methods
• Delete all cases with incomplete data and conduct analysis using only
complete cases.
• Advantage: Simplicity
• Disadvantage: loss of data if we discard all incomplete cases. So, in
efficient
• NOTE: If you use complete case analysis, then change summary
statistics for other variables, too.
19
Example: n=19,p=4, only 15% missing values
Individual Case 1 Case 2 Case 3
y1 y2 y3 y4 y1 y2 y3 y4 y1 y2 y3 y4
1 NA NA NA NA NA NA
2 NA NA NA NA
3 NA NA
4 NA NA
5 NA NA
6 NA NA
7
8
9
10
Eliminate individual 1 and 2.
Keep 8*4=32 data. 20% loss
Eliminate variable 1.
Keep 10*3=30 data. 25% loss
Eliminate individual 1 -6.
Keep 4*4=16 data. 60% loss20
Listwise Deletion (Complete case analysis)
• Only analyze cases with available data on each variable
• Advantage: simplicity and comparability across analyses
• Disadvantage: reduces statistical power (due to sample size), not use
all information, estimates may be biased if data not MCAR
• Listwise deletion often produces unbiased regression slope estimates
as long as missingness is not a function of outcome variable.
21
Pairwise Deletion (Available case analysis)
• Analysis with all cases in which the variables of interest are present
• Advantage: keeps as many cases as possible for each analysis, uses all
information possible with each analysis
• Disadvantage: cannot compare analyses because sample is different
each time, sample size vary for each parameter estimation, can obtain
nonsense results
• Compute the summary statistics using ni observations not n.
• Compute correlation type statistics using complete pairs for both
variables.
22
Example
23
Imputation Methods
• 1. Random sample from existing values:
You can randomly generate an integer from 1 to n-nmissing, then replace
the missing value with the corresponding observation that you chose
randomly
Case: 1 2 3 4 5 6 7 8 9 10
Y1: 3.4 3.9 2.6 1.9 2.2 3.3 1.7 2.4 2.8 3.6
Y2: 5.7 4.8 4.9 6.2 6.8 5.6 5.4 4.9 5.7 NA
Randomly generate number between 1 and 9: Say 3
Replace Y2,10 by Y2,3=4.9
Disadvantage: It may change the distribution of data
4.9
24
Imputation Methods
• 2. Randomly sample from a reasonable distribution
e.g. If gender is missing and you have the information that there re
about the sample number of females and males in the population.
Gender ~Ber(p=0.5) or estimate p from the observed sample
Using random number generator from Bernoulli distribution for p=0.5,
generate numbers for missing gender data
Disadvantage: distributional assumption may not be reliable (or correct),
even the assumption is correct, its representativeness is doubtful.
25
Imputation Methods
• 3. Mean/Mode Substitution
Replace missing value with the sample mean or mode. Then, run
analyses as if all complete cases
Advantage: We can use complete case analyses
Disadvantage: Reduces variability, weakens the correlation estimates
because it ignores the relationship between variables, it creates
artificial band
Unless the proportion of missing data is low, do not use this method.
26
Last Observation Carried Forward
• This method is specific to longitudinal data problems.
• For each individual, NAs are replaced by the last observed value of
that variable. Then, analyze data as if data were fully observed.
Disadvantage: The covariance structure and distribution change
seriously
Cases 1 2 3 4 5 6
1 3.8 3.1 2.0 NA NA NA
2 4.1 3.5 2.8 2.4 2.8 3.0
3 2.7 2.4 2.9 3.5 NA NA
Observation time
2.0 2.0 2.0
3.5 3.5
27
Imputation Methods
• 4. Dummy variable adjustment
Create an indicator variable for missing value (1 for missing, 0 for
observed)
Impute missing value to a constant (such as mean)
Include missing indicator in the regression
Advantage: Uses all information about missing observation
Disadvantage: Results in biased estimates, not theoretically driven
28
Imputation Methods
• 5. Regression imputation
Replace missing values with predicted score from regression equation.
Use complete cases to regress the variable with incomplete data on the
other complete variables.
Advantage: Uses information from the observed data, gives better
results than previous ones
Disadvantage: over-estimates model fit and correlation estimates,
weakens variance
29
Imputation Methods
30
Imputation Methods
• 6. Maximum Likelihood Estimation
Identifies the set of parameter values that produces the highest log-
likelihood.
ML estimate: value that is most likely to have resulted in the observed
data.
Advantage: uses full information (both complete and incomplete) to
calculate the log-likelihood, unbiased parameter estimates with
MCAR/MAR data
Disadvantage: Standard errors biased downward but this can be
adjusted by using observed information matrix.
31
Imputation Methods
32
Imputation Methods
33
Imputation Methods
34
Multiple Imputation (MI)
• Multiple imputation (MI) appears to be one of the most attractive methods for
general- purpose handling of missing data in multivariate analysis. The basic idea,
first proposed by Rubin (1977) and elaborated in his (1987) book, is quite simple:
1. Impute missing values using an appropriate model that incorporates random
variation.
2. Do this M times producing M “complete” data sets.
3. Perform the desired analysis on each data set using standard complete-data
methods.
4. Average the values of the parameter estimates across the M samples to
produce a single point estimate.
5. Calculate the standard errors by (a) averaging the squared standard errors of
the M estimates (b) calculating the variance of the M parameter estimates
across samples, and (c) combining the two quantities using a simple formula
35
Multiple Imputation
• Multiple imputation has several desirable features:
• Introducing appropriate random error into the imputation process
makes it possible to get approximately unbiased estimates of all
parameters. No deterministic imputation method can do this in
general settings.
• Repeated imputation allows one to get good estimates of the
standard errors. Single imputation methods don’t allow for the
additional error introduced by imputation (without specialized
software of very limited generality).
36
Multiple Imputation
• With regards to the assumptions needed for MI,
• First, the data must be missing at random (MAR), meaning that the probability of
missing data on a particular variable Y can depend on other observed variables,
but not on Y itself (controlling for the other observed variables).
Example: Data are MAR if the probability of missing income depends on marital
status, but within each marital status, the probability of missing income does not
depend on income; e.g. single people may be more likely to be missing data on
income, but low income single people are no more likely to be missing income than
are high income single people.
• Second, the model used to generate the imputed values must be “correct” in
some sense.
• Third, the model used for the analysis must match up, in some sense, with the
model used in the imputation
37
Multiple Imputation
38
Imputation in R
• MICE (Multivariate Imputation via Chained Equations): Creating multiple imputations as compared to a single imputation (such as
mean) takes care of uncertainty in missing values. It assumes MAR
• Amelia(https://cran.r-project.org/web/packages/Amelia/vignettes/amelia.pdf): This package (Amelia II) is named after Amelia
Earhart, the first female aviator to fly solo across the Atlantic Ocean. History says, she got mysteriously disappeared (missing)
while flying over the pacific ocean in 1937, hence this package was named to solve missing value problems. This package also
performs multiple imputation to deal with missing values. It is enabled with bootstrap based EMB algorithm which makes it faster
and robust to impute many variables including cross sectional, time series data etc. Also, it is enabled with parallel imputation
feature using multicore CPUs. Asumptions: All variables in a data set have Multivariate Normal Distribution (MVN) and MAR
• missForest: an implementation of random forest algorithm. It’s a non parametric imputation method applicable to various
variable types. It builds a random forest model for each variable. Then it uses the model to predict missing values in the variable
with the help of observed values. It yield OOB (out of bag) imputation error estimate. Moreover, it provides high level of control
on imputation process.
• Hmisc: a multiple purpose package useful for data analysis, high – level graphics, imputing missing values, advanced table
making, model fitting & diagnostics (linear regression, logistic regression & cox regression) etc. impute() function simply imputes
missing value using user defined statistical method (mean, max, mean). It’s default is median. On the other
hand, aregImpute() allows mean imputation using additive regression, bootstrapping, and predictive mean matching. In
bootstrapping, different bootstrap resamples are used for each of multiple imputations. Then, a flexible additive model (non
parametric regression method) is fitted on samples taken with replacements from original data and missing values (acts as
dependent variable) are predicted using non-missing values (independent variable).
• mi: (Multiple imputation with diagnostics) package provides several features for dealing with missing values. It also
builds multiple imputation models to approximate missing values. And, uses predictive mean matching method. For each
observation in a variable with missing value, we find observation (from available values) with the closest predictive mean to that
variable. The observed value from this “match” is then used as imputed value. 39

More Related Content

PDF
Statistical Methods to Handle Missing Data
PPTX
missingdatahandling-160923201313.pptx
PDF
Missing data handling
PDF
Biostatistics Workshop: Missing Data
PPTX
Imputation techniques for missing data in clinical trials
PDF
SPSS GuideAssessing Normality, Handling Missing Data, and Calculating Scores...
PPTX
Statistical Approaches to Missing Data
PPTX
Missing Observations and how to deal with them.pptx
Statistical Methods to Handle Missing Data
missingdatahandling-160923201313.pptx
Missing data handling
Biostatistics Workshop: Missing Data
Imputation techniques for missing data in clinical trials
SPSS GuideAssessing Normality, Handling Missing Data, and Calculating Scores...
Statistical Approaches to Missing Data
Missing Observations and how to deal with them.pptx

Similar to 3 Missing data12256429.ppt (20)

PPTX
Missing Data and Causes
PDF
missingpdf
PDF
COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...
PDF
SPSS GuideAssessing Normality, Handling Missing Data, and Calculating Total S...
PPTX
Analysis-of-data-with-missing-values.pptx
DOC
Poor man's missing value imputation
PPTX
A survey on missing information strategies and imputation methods in healthcare
DOC
Twala2007.doc
PDF
A Two-Step Self-Evaluation Algorithm On Imputation Approaches For Missing Cat...
PDF
A_Study_of_K-Nearest_Neighbour_as_an_Imputation_Me.pdf
PPTX
Imputation of missing data in clinical trials
PPTX
Dealing with incomplete data for mapping and spatial analysis
PDF
CHE Seminar 20 November 2013
PDF
Applied Missing Data Analysis Methodology In The Social Sciences 1st Edition ...
PPTX
Missing Data Analysis_Data Analysis Techniques
DOCX
Machine Learning Approaches and its Challenges
PPTX
Guidelines for Data Quality and Preprocessing
DOCX
Multiple imputation of missing data
PDF
Missing data
PDF
Exploratory Factor Analysis With Small Samples and Missing Data
Missing Data and Causes
missingpdf
COMPARISION OF PERCENTAGE ERROR BY USING IMPUTATION METHOD ON MID TERM EXAMIN...
SPSS GuideAssessing Normality, Handling Missing Data, and Calculating Total S...
Analysis-of-data-with-missing-values.pptx
Poor man's missing value imputation
A survey on missing information strategies and imputation methods in healthcare
Twala2007.doc
A Two-Step Self-Evaluation Algorithm On Imputation Approaches For Missing Cat...
A_Study_of_K-Nearest_Neighbour_as_an_Imputation_Me.pdf
Imputation of missing data in clinical trials
Dealing with incomplete data for mapping and spatial analysis
CHE Seminar 20 November 2013
Applied Missing Data Analysis Methodology In The Social Sciences 1st Edition ...
Missing Data Analysis_Data Analysis Techniques
Machine Learning Approaches and its Challenges
Guidelines for Data Quality and Preprocessing
Multiple imputation of missing data
Missing data
Exploratory Factor Analysis With Small Samples and Missing Data
Ad

More from Aravind Reddy (15)

PPTX
ChatGPT and AI and ha bkjjwnaskcfwnascfsacas
PPTX
Patient’s Condition Classification Using Drug Reviews.pptx
PDF
Natural Language Processing for development
PPTX
Final ppt.pptx
PPTX
Tech Jobs Green Jobs- Deck . 24-11.pptx
PPT
Recommenders.ppt
PPT
The Normal Distribution.ppt
PPT
Princuiples of pimary data.ppt
PPT
Culbert.ppt
PPT
Types of Primary and Secondary Sources.ppt
PPT
FILE MANAGEMENT1.ppt
PPTX
adminsitarative data data-57511556 (1).pptx
PPTX
Introduction to Data Science 5-13.pptx
DOCX
loan.docx
PPT
Lec1cgu13updated.ppt
ChatGPT and AI and ha bkjjwnaskcfwnascfsacas
Patient’s Condition Classification Using Drug Reviews.pptx
Natural Language Processing for development
Final ppt.pptx
Tech Jobs Green Jobs- Deck . 24-11.pptx
Recommenders.ppt
The Normal Distribution.ppt
Princuiples of pimary data.ppt
Culbert.ppt
Types of Primary and Secondary Sources.ppt
FILE MANAGEMENT1.ppt
adminsitarative data data-57511556 (1).pptx
Introduction to Data Science 5-13.pptx
loan.docx
Lec1cgu13updated.ppt
Ad

Recently uploaded (20)

PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Classroom Observation Tools for Teachers
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Insiders guide to clinical Medicine.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
01-Introduction-to-Information-Management.pdf
PDF
Basic Mud Logging Guide for educational purpose
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Pre independence Education in Inndia.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Classroom Observation Tools for Teachers
FourierSeries-QuestionsWithAnswers(Part-A).pdf
human mycosis Human fungal infections are called human mycosis..pptx
Insiders guide to clinical Medicine.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Microbial disease of the cardiovascular and lymphatic systems
01-Introduction-to-Information-Management.pdf
Basic Mud Logging Guide for educational purpose
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Complications of Minimal Access Surgery at WLH
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
O7-L3 Supply Chain Operations - ICLT Program
Pre independence Education in Inndia.pdf

3 Missing data12256429.ppt

  • 2. MISSING DATA • Missing data are observations that we intend to make but couldn’t. • Answering only certain questions to a questionnaire • Not measuring the temperature due to extreme cold • Not answering income due to being too rich… • When we have missing data, our goal remains the same with what it was if have the complete data. So, the analysis are now more complex. • How to denote missing data: • SAS . • S+ and R NA or na • -9999 or something like this (Be careful! Make sure that the number is not in the dataset and no use them in the analysis) 2
  • 3. Missingness Mechanism • Before starting any analysis with incomplete data, we have to clarify the nature of missingness mechanism which causes some values being missing. Previously, there was common belief that the mechanism was random but it was really as it was thought? • Generally, there are two notions accepted for missingness mechanism by all researchers: ignorable and non-ignorable missingness mechanism. • If the mechanism is ignorable we don’t have to care about it and we can ignore it confidently before missing data analysis but if it is not we have to model the mechanism also as part of the parameter estimation. • Identifying the missingness mechanism with a statistical approach is still being a tough problem and so try to develop some diagnostic procedure on missingness mechanism is an important research topic. 3
  • 4. Missingness Mechanism • Rubin (1976) specified three types of assumptions on missingness mechanism: • Missing Completely at Random (MCAR) • Missing at Random (MAR) • Missing Not at Random (MNAR). • MCAR and MAR are in class of ignorable missingness mechanism but MNAR is in class of non-ignorable mechanism. • MCAR assumption is generally difficult to meet in reality and it assumes that there is no statistically significant difference between incomplete and complete cases. In other words, the observed data points can only be considered as a simple random sample of the variables you would have to analyze. It assumes that missingness is completely unrelated to the data (Enders, 2010). In this case, there is no impact of missingness affecting on the inferences. Little (1988) proposed a chi-square test for diagnosing MCAR mechanism so called Little’s MCAR test. 4
  • 5. Missingness Mechanism • Failure to confirm the assumption of MCAR using statistical tests means that the missing data mechanism is either MAR or MNAR. • Unfortunately, it is impossible to determine whether a mechanism is MAR or MNAR. This is an important practical problem of missing data analysis and classified untestable assumption because we do not know the values of the missing scores, we cannot compare the values of those with and without missing data to see if they differ systematically on that variable (Allison, 2001). • The most of the missing data handling approaches especially EM algorithm and MI relies on MAR assumption (Schafer, 1997). If we can decide that the mechanism that causes missingness is ignorable in such a way, then assuming the mechanism is MAR seems suitable for further analysis. Conducting the EM algorithm and MCMC based MI under MCAR assumption will be also appropriate, since the mechanism of missingness is ignorable (Schafer, 1997). 5
  • 9. Missing Completely at Random (MCAR) 9
  • 10. Missing Completely at Random (MCAR) 10
  • 13. Missing Not at Random 13
  • 14. Missing Data Patterns (a) (b) (c) 𝑌1 𝑌2 𝑌3 𝑌4 𝑌1 𝑌2 𝑌3 𝑌4 𝑌1 𝑌2 𝑌3 𝑌4 m m m m m m m m m m m m m m Figure 1.1:Three prototypical missing data pattern: (a) monotone missingness, (b) univariate missingness, (c) arbitrary missingness 14
  • 15. Ways to Understand the Missingness Mechanism within the Data 15
  • 16. Ways to Understand the Missingness Mechanism within the Data • It is not possible to extract missing data patterns from observed data but you can explore data to get a sense. e.g. Assume there are missing data in X1 variable. Divide X2 and X3 into 2 parts from where X1 is missing and investigate two parts separately. If the results (summary measures or inferences) are different in two part, the missingness in X1 is possibly not at random. X1 X2 X3 missing 16
  • 17. Ways to Understand the Missingness Mechanism within the Data • Although you can and should explore data, you need to make a reasonable assumption for missing data. • MCAR is a stronger assumption than MAR, and MNAR is hard to model. There is usually very little we can do when the case is missing not at random. Usually, MAR is assumed. • Ask experts why data are missing? 17
  • 18. Dealing with Missing Data • Use what you know about • Why data are missing • Distribution of missing data • Decide on the best analysis strategy to yield the least biased estimates 18
  • 19. Deletion Methods • Delete all cases with incomplete data and conduct analysis using only complete cases. • Advantage: Simplicity • Disadvantage: loss of data if we discard all incomplete cases. So, in efficient • NOTE: If you use complete case analysis, then change summary statistics for other variables, too. 19
  • 20. Example: n=19,p=4, only 15% missing values Individual Case 1 Case 2 Case 3 y1 y2 y3 y4 y1 y2 y3 y4 y1 y2 y3 y4 1 NA NA NA NA NA NA 2 NA NA NA NA 3 NA NA 4 NA NA 5 NA NA 6 NA NA 7 8 9 10 Eliminate individual 1 and 2. Keep 8*4=32 data. 20% loss Eliminate variable 1. Keep 10*3=30 data. 25% loss Eliminate individual 1 -6. Keep 4*4=16 data. 60% loss20
  • 21. Listwise Deletion (Complete case analysis) • Only analyze cases with available data on each variable • Advantage: simplicity and comparability across analyses • Disadvantage: reduces statistical power (due to sample size), not use all information, estimates may be biased if data not MCAR • Listwise deletion often produces unbiased regression slope estimates as long as missingness is not a function of outcome variable. 21
  • 22. Pairwise Deletion (Available case analysis) • Analysis with all cases in which the variables of interest are present • Advantage: keeps as many cases as possible for each analysis, uses all information possible with each analysis • Disadvantage: cannot compare analyses because sample is different each time, sample size vary for each parameter estimation, can obtain nonsense results • Compute the summary statistics using ni observations not n. • Compute correlation type statistics using complete pairs for both variables. 22
  • 24. Imputation Methods • 1. Random sample from existing values: You can randomly generate an integer from 1 to n-nmissing, then replace the missing value with the corresponding observation that you chose randomly Case: 1 2 3 4 5 6 7 8 9 10 Y1: 3.4 3.9 2.6 1.9 2.2 3.3 1.7 2.4 2.8 3.6 Y2: 5.7 4.8 4.9 6.2 6.8 5.6 5.4 4.9 5.7 NA Randomly generate number between 1 and 9: Say 3 Replace Y2,10 by Y2,3=4.9 Disadvantage: It may change the distribution of data 4.9 24
  • 25. Imputation Methods • 2. Randomly sample from a reasonable distribution e.g. If gender is missing and you have the information that there re about the sample number of females and males in the population. Gender ~Ber(p=0.5) or estimate p from the observed sample Using random number generator from Bernoulli distribution for p=0.5, generate numbers for missing gender data Disadvantage: distributional assumption may not be reliable (or correct), even the assumption is correct, its representativeness is doubtful. 25
  • 26. Imputation Methods • 3. Mean/Mode Substitution Replace missing value with the sample mean or mode. Then, run analyses as if all complete cases Advantage: We can use complete case analyses Disadvantage: Reduces variability, weakens the correlation estimates because it ignores the relationship between variables, it creates artificial band Unless the proportion of missing data is low, do not use this method. 26
  • 27. Last Observation Carried Forward • This method is specific to longitudinal data problems. • For each individual, NAs are replaced by the last observed value of that variable. Then, analyze data as if data were fully observed. Disadvantage: The covariance structure and distribution change seriously Cases 1 2 3 4 5 6 1 3.8 3.1 2.0 NA NA NA 2 4.1 3.5 2.8 2.4 2.8 3.0 3 2.7 2.4 2.9 3.5 NA NA Observation time 2.0 2.0 2.0 3.5 3.5 27
  • 28. Imputation Methods • 4. Dummy variable adjustment Create an indicator variable for missing value (1 for missing, 0 for observed) Impute missing value to a constant (such as mean) Include missing indicator in the regression Advantage: Uses all information about missing observation Disadvantage: Results in biased estimates, not theoretically driven 28
  • 29. Imputation Methods • 5. Regression imputation Replace missing values with predicted score from regression equation. Use complete cases to regress the variable with incomplete data on the other complete variables. Advantage: Uses information from the observed data, gives better results than previous ones Disadvantage: over-estimates model fit and correlation estimates, weakens variance 29
  • 31. Imputation Methods • 6. Maximum Likelihood Estimation Identifies the set of parameter values that produces the highest log- likelihood. ML estimate: value that is most likely to have resulted in the observed data. Advantage: uses full information (both complete and incomplete) to calculate the log-likelihood, unbiased parameter estimates with MCAR/MAR data Disadvantage: Standard errors biased downward but this can be adjusted by using observed information matrix. 31
  • 35. Multiple Imputation (MI) • Multiple imputation (MI) appears to be one of the most attractive methods for general- purpose handling of missing data in multivariate analysis. The basic idea, first proposed by Rubin (1977) and elaborated in his (1987) book, is quite simple: 1. Impute missing values using an appropriate model that incorporates random variation. 2. Do this M times producing M “complete” data sets. 3. Perform the desired analysis on each data set using standard complete-data methods. 4. Average the values of the parameter estimates across the M samples to produce a single point estimate. 5. Calculate the standard errors by (a) averaging the squared standard errors of the M estimates (b) calculating the variance of the M parameter estimates across samples, and (c) combining the two quantities using a simple formula 35
  • 36. Multiple Imputation • Multiple imputation has several desirable features: • Introducing appropriate random error into the imputation process makes it possible to get approximately unbiased estimates of all parameters. No deterministic imputation method can do this in general settings. • Repeated imputation allows one to get good estimates of the standard errors. Single imputation methods don’t allow for the additional error introduced by imputation (without specialized software of very limited generality). 36
  • 37. Multiple Imputation • With regards to the assumptions needed for MI, • First, the data must be missing at random (MAR), meaning that the probability of missing data on a particular variable Y can depend on other observed variables, but not on Y itself (controlling for the other observed variables). Example: Data are MAR if the probability of missing income depends on marital status, but within each marital status, the probability of missing income does not depend on income; e.g. single people may be more likely to be missing data on income, but low income single people are no more likely to be missing income than are high income single people. • Second, the model used to generate the imputed values must be “correct” in some sense. • Third, the model used for the analysis must match up, in some sense, with the model used in the imputation 37
  • 39. Imputation in R • MICE (Multivariate Imputation via Chained Equations): Creating multiple imputations as compared to a single imputation (such as mean) takes care of uncertainty in missing values. It assumes MAR • Amelia(https://cran.r-project.org/web/packages/Amelia/vignettes/amelia.pdf): This package (Amelia II) is named after Amelia Earhart, the first female aviator to fly solo across the Atlantic Ocean. History says, she got mysteriously disappeared (missing) while flying over the pacific ocean in 1937, hence this package was named to solve missing value problems. This package also performs multiple imputation to deal with missing values. It is enabled with bootstrap based EMB algorithm which makes it faster and robust to impute many variables including cross sectional, time series data etc. Also, it is enabled with parallel imputation feature using multicore CPUs. Asumptions: All variables in a data set have Multivariate Normal Distribution (MVN) and MAR • missForest: an implementation of random forest algorithm. It’s a non parametric imputation method applicable to various variable types. It builds a random forest model for each variable. Then it uses the model to predict missing values in the variable with the help of observed values. It yield OOB (out of bag) imputation error estimate. Moreover, it provides high level of control on imputation process. • Hmisc: a multiple purpose package useful for data analysis, high – level graphics, imputing missing values, advanced table making, model fitting & diagnostics (linear regression, logistic regression & cox regression) etc. impute() function simply imputes missing value using user defined statistical method (mean, max, mean). It’s default is median. On the other hand, aregImpute() allows mean imputation using additive regression, bootstrapping, and predictive mean matching. In bootstrapping, different bootstrap resamples are used for each of multiple imputations. Then, a flexible additive model (non parametric regression method) is fitted on samples taken with replacements from original data and missing values (acts as dependent variable) are predicted using non-missing values (independent variable). • mi: (Multiple imputation with diagnostics) package provides several features for dealing with missing values. It also builds multiple imputation models to approximate missing values. And, uses predictive mean matching method. For each observation in a variable with missing value, we find observation (from available values) with the closest predictive mean to that variable. The observed value from this “match” is then used as imputed value. 39