I have to perform a linear regression on a dataset. However, I am having trouble figuring out what type of imputation I should do on the data because in some cases the majority of the the data is missing, or at least 50% is.

Also, the data has 20,000 plus rows.

I am considering two options as of now:

  • Do you all suggest I replace every NA with the mean?
  • Or should I just drop all NAs which will reduce my data significantly.

By the way, I do have to run a linear regression on all the variables, and then again on each of my variables singularly.

The problem with second option is, I can see how dropping all of the NAs mislead the data.

Is there because replacing with the mean can oversaturate the data?

Just want to hear the feedback from the community.

  • $\begingroup$ I am not sure what your field is, or what your data represents which makes it difficult to suggest a "good" course of action. If the NAs are a result of missing data, it does not seem wise to include them in your analysis because it would result in a biases toward whatever value you employ to replace the NAs. If the NAs are a result of a sample non-detect, it could make sense to replace those values with 1/2*detection limit or for a more conservative answer just the detection limit. It could be interesting to write your code so you could look at both options - replacing NAs or removing them $\endgroup$ – melmo Jun 3 '20 at 14:08
  • $\begingroup$ Hi, the data has to do with infection rates. i was thinking of writing a code that replaces the nas with a mean and one that just omits it all together. $\endgroup$ – aped Jun 3 '20 at 14:13
  • $\begingroup$ This may be a helpful reference as it compares a number of solutions and their respective properties bmcmedresmethodol.biomedcentral.com/articles/10.1186/… $\endgroup$ – Ryan Volpi Jun 4 '20 at 3:36

Your Answer

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

Browse other questions tagged or ask your own question.