Advanced Handling of Missing Data One-Day Workshop

Advanced Handling of Missing Data One-Day Workshop

Advanced Handling of Missing Data One-day Workshop Nicole Janz [email protected] Goals • Discuss types of missingness • Know advantages & disadvantages of missing data methods • Learn multiple imputation • Practical: diagnose, visualize and handle missing data in R 2 Steps in the research process 1. Identify patterns of missingness for each variable 2. Why are data missing? Could this bias your sample? 3. How do other scholars in your field handle missingness? 4. Decide on method to handle missingness for your particular variables 5. Robustness: try different missing data methods, run your analysis, compare the results 3 ProportionsA SIMPLIFIED of missingnessBIVARIATE TEST per GUIDE variable in a table variable nmiss n propmiss country 0 5568 0.00000000 year 0 5568 0.00000000 UN_FDI_flow 477 5568 0.08566810 US_fdi_electrical 1896 5568 0.34051724 US_fdi_machinery 1922 5568 0.34518678 US_fdi_transport 1968 5568 0.35344828 US_fdi_mining 3908 5568 0.70186782 US_fdi_services 3955 5568 0.71030891 US_fdi_petrol 4258 5568 0.76472701 US_fdi_utilities 4984 5568 0.89511494 4 ProportionsA SIMPLIFIED of missingnessBIVARIATE TEST per GUIDE variable in a graph Proportion of missingness Petrol/GDP Mining/GDP Other FDI/GDP Deposit./GDP Finance/GDP US FDI/GDP Wh.Trade/GDP Food/GDP Chemical/GDP Metal/GDP Transp./GDP Machinery/GDP Mosley Law Mosley Prac. Mosley Labor Electr./GDP PTS Democracy CIRI Women CIRI Phys. CIRI Emp. CIRI Worker Trade GDP p. capita Population Conflict Fariss Life exp. Inf.mort. 0.0 0.2 0.4 0.6 0.8 1.0 5 TimeA SIMPLIFIED series: number BIVARIATE of years TEST withGUIDE existing data 6 HeatmapA SIMPLIFIED per country-year BIVARIATE TEST and GUIDE variable yellow=missing 7 WhyA SIMPLIFIEDare my data BIVARIATE missing? TEST GUIDE Due to social/natural processes • school graduation, dropout, death • a country does not exist anymore e.g. GDR • statistics office reclassified variables • intentional non-disclosure Skip patterns in surveys • E.g. only married respondents are asked certain follow-up questions Respondent refusal • income 8 WhyA SIMPLIFIEDare my data BIVARIATE missing? TEST GUIDE variable nmiss n propmiss US_fdi_mining 3908 5568 0.70186782 US_fdi_petrol 4258 5568 0.76472701 US_fdi_utilities 4984 5568 0.89511494 • Mining FDI is available until 1999 • Petrol FDI is available from 2000 • Utilities FDI is a new category was introduced after 2000 9 ThreeA SIMPLIFIED types of missingnessBIVARIATE TEST GUIDE 1. MCAR - Missing Completely at Random 2. MAR - Missing at Random 3. MNAR Missing not at Random 10 MCAR:A SIMPLIFIED Missing CompletelyBIVARIATE TEST at Random GUIDE Missing value (y) neither depends on x nor y. Probability of missingness is the same for all units. Survey respondent decides whether to answer the “earnings” question by rolling a die and refusing to answer if a “6” shows up Some survey questions asked of a simple random sample of original sample What to do: If data are missing completely at random, then throwing out cases with missing data does not bias your inferences -> do listwise deletion, then run analysis 11 MAR:A SIMPLIFIED Missing at BIVARIATE Random TEST GUIDE Probability that a variable is missing depends only observed data, but not the missing data itself, or unobserved data. If sex, race, education, and age are recorded for all the people in the survey, then “earnings” is MAR if the probability of nonresponse depends only on these variables If men are more likely to tell you their weight than women, and we record gender, then weight is MAR. What to do? Some say listwise deletion is fine, but only if regression controls for all variables that affect probability of missingness. More common: use multiple imputation (MI) because listwise deletion introduces bias. 12 MNAR:A SIMPLIFIED Missing BIVARIATE not at Random TEST GUIDE (non-ignorable missingness) Missingness depends at least in part on unobserved factors. Special case: Missingness depends on variable that is missing People with college degrees are less likely to reveal their earnings, we don’t have education data for all respondents If a particular treatment causes discomfort, a patient is more likely to drop out of the study. We don’t have a measure for discomfort for all patients. Respondents with high income less likely to report income. 13 MNAR:A SIMPLIFIED Missing BIVARIATE not at Random TEST GUIDE (non-ignorable missingness) What to do? Most problematic case. Potential lurking variables are often unobserved. MI based on auxiliary, external data e.g. estimate race based on Census data associated with the address of the respondent. Try to include as many predictors as possible in a model to get MNAR closer to MAR. 14 HowA SIMPLIFIEDto distinguish BIVARIATE between TEST MNAR GUIDE and MAR? Think about your variables and use your substantive scientific knowledge of the data and your field. Can you collect more data that explain missingness, or is it very likely that they will remain unobserved? What does the literature say about predictors of that particular missing variable? 15 HowA SIMPLIFIEDto distinguish BIVARIATE between TEST MAR GUIDE and MCAR? Again, think about the data. Some indication (but no definitive answer) can be gained from two tests: 1) Little’s test for MCAR (Little 1988) Maximum likelihood chi-square test for missing completely at random. H0 is that the data is MCAR. If the p value for Little's MCAR test is not significant, then the data may be assumed to be MCAR and missingness is ignorable (do listwise deletion). mcartest in STATA; EM option in SPSS; in R see lab 16 HowA SIMPLIFIEDto distinguish BIVARIATE between TEST MAR GUIDE and MCAR? 2. Dummy variable approach for MCAR create dummy variables for whether a variable is missing: 1 = missing 0 = observed Run t-tests (continuous) and chi-square (categorical) tests between this dummy and other variables to see if the missingness is related to the values of other variables Tests which return a finding of significance indicate MAR rather than MCAR (-> use multiple imputation) (SPSS: MVA option, R see lab) 17 Ad-hocA SIMPLIFIED methods BIVARIATE TEST GUIDE Listwise deletion (complete case analysis) Automatically done in regression in most software; or by hand; assumes MCAR • If MAR or MNAR: introduces biased sample • reduces sample size Pairwise deletion (available case analysis) different aspects of a problem are studied with different subsets of the data • Results between subsets not consistent / comparable • if the non-respondents differ systematically from the respondents, this will bias the available-case summaries • Potential omitted variable bias if excludes a complete variable because its high missingness 18 Ad-hocA SIMPLIFIED methods BIVARIATE TEST GUIDE Last value carried forward replace missing outcome values with pre-treatment measure • would lead to underestimates of the true treatment effect • ignores changes over time Mean imputation easiest way to impute is to replace each NA with the mean • distorts distribution for this variable, e.g. underestimates sd • ignores changes over time Filling in values manually based on case-based knowledge from other sources • time-consuming • prone to measurement error 19 SingleA SIMPLIFIED imputation BIVARIATE TEST GUIDE Impute missing values from predicted values results from regression • the error in these cases becomes zero. However, random errors are a feature of the real world and one variable treated with single imputation will be fundamentally different from the other variables. • leads to overconfidence in our models and biases the coefficients upwards 20 MultipleA SIMPLIFIED Imputation BIVARIATE Techniques TEST GUIDE Multiple imputation (MI) is also based on the idea of using predicted values, but it builds in mechanisms to incorporate uncertainty about the predicted values. MI imputes values for each missing data point, but it does so n times (usually 5). It then creates n (5) completed data sets. The observed values remain the same, but the imputed value varies across these 5 data sets, reflecting uncertainty. MI is much closer to reality when calculating new values. MI is a good alternative to listwise deletion because the main assumption is that data are MAR, meaning that some other variables in the data set may (and should) explain why an 21 observation is missing MultipleA SIMPLIFIED Imputation BIVARIATE Techniques TEST GUIDE amelia.pdf /web/packages/Amelia/vignettes/ cran.r-project.org 22 Details on expectation maximization (EM) algorithm, see King et al. (2001). Figure: https:// CombinationA SIMPLIFIED of BIVARIATE results TEST GUIDE Run each analysis (e.g. regression) on all 5 imputed data sets. Collect all 5 coefficients and standard errors (and other measures of interest), and combine them into one estimate according to Rubin’s Rule (1987): • Estimates: average of the individual estimates • Standard error: combine between-imputation variance and within-imputation variance 23 See King et al. (2001). MultipleA SIMPLIFIED Imputation BIVARIATE Software TEST GUIDE {Amelia} in R (by Gary King and collaborators) {mi} in R (by Andrew Gelman and collaborators) {mice} in R (by Stef van Buuren and collaborators) SPSS (Analyze > Multiple Imputation) STATA mi estimate 24 Social Sciences Research Methods Centre Lab SummarizingA SIMPLIFIED and BIVARIATE Visualizing TEST GUIDE Missingness in R % of missingness per variable and subsets of variables Graphical display Using Amelia for diagnosis of missingness 26 MCARA SIMPLIFIED patterns? BIVARIATE TEST GUIDE 1) BaylorEdPsych (Little’s Test to diagnose MCAR) https://cran.r-project.org/web/packages/BaylorEdPsych/ BaylorEdPsych.pdf 2) Creating a dummy variable for missingness 0/1, then running correlations among variables 27 Ad-hocA SIMPLIFIED measures BIVARIATE in R TEST GUIDE 1) Listwise deletion, pairwise deletion 2) Carry last value forward 3) Mean imputation 4) Manually recoding particular variables 5) Replace NAs with predicted values from regression 28 ExampleA SIMPLIFIED 1 BIVARIATE TEST GUIDE Adapted from Schlomer et al. (2010) 60 clients under age 21 years at a large university counseling center were referred for counseling by the dean of students due to underage drinking violations.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    38 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us