0
$\begingroup$

I have a large dataset (501 rows and 39 columns) with a lot of missing data. I have already deleted all the rows where the (binary) response variable is missing as well as three columns that were variables clearly not helpful in the logistic regression (they were year, month of admission and race for predicting viral vs bacterial desease).

But there are still many, many, missing values. I don't need to impute values in a very complex way. If there are less than 15% NA's I can just set them to the mean of the given column. But there are still only 3 variables with between 16 and 20% NA's and the rest has more than that.

So I removed all rows with NA's from a specific variable $X$ and that produced a set with 19 variables with less then 15% NA's. But I probably could have selected $X$ in a way that would make more sense than just randomly selecting it.

Then I could do the same thing with a different variable and compare the two models later.

If there is a simple procedure for dealing with this kind of dataset I would appreciate if someone could point me towards it.

$\endgroup$
2
$\begingroup$

How you want to deal with this depends somewhat on why the data are missing.

If the data are missing completely at random (e.g., there was a bug in the programming during data collection that affected some people at random), you're fine using listwise deletion as you've done. If the data are missing for some more meaningful reason, using listwise deletion could lead to erroneous results. Logistic regression will produce unbiased parameter estimates when you use listwise deletion even if data aren't missing at random on the IV or DV, but estimates may be biased if they're missing not at random on both the IV and the DV.

A good first step to explore whether your data are missing at random would be to create variables representing missingness for each variable you're concerned about, which is 0 if the case isn't missing data on that variable and 1 if it is. Then test whether other variables in the model differ as a function of the missingness variable. If these tests are significant for both the IV and DV, your data might not be missing at random and you should be very concerned about using listwise deletion (and really, if you get significant results for both you should be concerned about your results regardless of the method of handling missing data you use).

The simplest way to handle this would be add the rows you deleted back in and run the model in MPlus, which easily handles maximum likelihood for logistic regression and will retain cases even if they have missing data. You just have to specify CATEGORICAL = [name of your DV]; ANALYSIS: ESTIMATOR=ML; INTEGRATION=MONTECARLO;, and then list your variables with missing data in the IV in square brackets at the end of the model code section as explained here. You can then further reduce bias by including additional variables in your model that are associated with your missingness variables or the variables with missing data themselves. These are called "auxiliary variables" and you want to regress them on all other variables in the model.

Last time I checked, there isn't a way to use maximum likelihood for logistic regression models in R, but that might have changed.

$\endgroup$
  • 1
    $\begingroup$ gives helpful advice but I recommend reading a comprehensive introduction to missing data. A good overview is John W. Graham's 2009 article, "Missing data analysis: Making it work in the real world." Also, Paul D. Allison wrote a short introductory book in the Sage series. $\endgroup$ – rolando2 May 12 at 13:24
1
$\begingroup$

Well, if you want something simple, it may not be the best to predict values (which would work, but for a data set this large it would take far too long.)

From the research I've done on this topic, perhaps the most simple technique you could use is the Nearest Neighbor technique. Here is a quick guide on what it is in summary:

In R, there is a nearest neighbor function. I will attach the documentation to that, as well.

Hopefully this helps!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.