kosukeimai / MatchIt

R package MatchIt
205 stars 43 forks source link

Alllow for missing values in variables that are not part of the model #41

Closed JohannesWiesner closed 3 years ago

JohannesWiesner commented 3 years ago

I downloaded the MatchIT package from CRAN (version 3.0.2). In this version, the matchit function apparently does not allow for missing values in variables, even if they are not part of the model (see this stackoverflow answer). I wonder what's the reason for this? My dataset contains a lot of 'systematic' NaNs in certain variables that are not used for matching (To make it short: I am working with neuroimaging data and I have a column that contains filepaths which point to preprocessed files. Some files still need to be preprocessed so I do not yet have a value for these rows, though I would like to work on the matching script in the meantime). Does MatchIT 4.0.0 also have this restriction and if yes, what is the reason for it?

ngreifer commented 3 years ago

This has been fixed in version 4.0.0, which you can install from GitHub while it is under review at CRAN by running devtools::install_github("kosukeimai/MatchIt"). I noted this fix in #8.