4
$\begingroup$

This is my first question at stats. I need to impute some factors and numbers in my data set in R. What are my best options regarding packages and also a source to read more about the theory.

$\endgroup$
  • 2
    $\begingroup$ mice package and anything by its author Stef van Buuren. $\endgroup$ – llewmills Apr 27 at 1:24
  • $\begingroup$ @llewmills great thanks! Maybe it requires a new question but I also want to know how to handle "extreme outliers". $\endgroup$ – David Apr 27 at 9:50
  • 2
    $\begingroup$ Possible duplicate of Good references on learning how to deal with missing data/imputation Note that Amelia II has documentation that explains what imputation is and how it works in addition to the fact that it is R software. $\endgroup$ – Sycorax says Reinstate Monica Apr 27 at 15:12
  • $\begingroup$ @Sycorax : This is not a duplicate; this is about software packages in R. $\endgroup$ – Michael Hardy Apr 27 at 18:00
  • 1
    $\begingroup$ Definitely needs a new question and I'm sure there are already tonnes of well-answered questions on the site already. Winsorizing works well. But you should always approach removing outliers with extreme caution, unless you have strong evidence the observations are illegitimate in some way you may be removing data that is part of the process you are trying to model, however extreme they are. $\endgroup$ – llewmills Apr 28 at 3:57
2
$\begingroup$

My Master's thesis revolved around the use of the mice package in R and I have only good things to say about it. I tried to use Amelia II but it just wasn't well suited to my data so I can't comment too much on that. The approach of the two packages does differ though so you may want to research which is better suited for your data.

If you do end up taking the MICE route, here are some papers I would recommend to get you off to a running start:

Azur, M. J., Stuart, E. A., Frangakis, C., and Leaf, P. J. (2011). Multiple imputation by chained equations: what is it and how does it work? International Journal of Methods in Psychiatric Research, 20(1):40–49.

Buuren, S. and Groothuis-Oudshoorn, K. (2011). mice: Multivariate imputation by chained equations in R. Journal of Statistical Software, 45(3):1–66.

I also really liked the following textbook,

Enders, C. K. (2010). Applied missing data analysis. Guilford Press.

$\endgroup$
  • $\begingroup$ Thanks. My data is mostly administrative data from the health sector ( e.g. electronic patient journal) and mostly timestamps or character/factors. E.g. sometimes I don't have a timestamp or missing the factor (emergency vs routine). $\endgroup$ – David Apr 28 at 9:58
1
$\begingroup$

I found Chapter 3 in Regression Modeling Strategies by Frank Harrell to be a good overview. It covers types of missing data, strategies for imputation, and discusses simplistic and advanced methods. The packages recommended in that chapter are MICE and aregImpute in R.

$\endgroup$

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