简体   繁体   中英

Handling NAs in Matching Package

The Matching Package's Match function estimates Matching techniques quite straightforwardly. However, problems start occurring when variables to be match on contain NAs as the function will return an error for any number of NAs present. I recently encountered this case and wanted to ask whether there is a convenient way to handle NAs in the package. There appears not to be a specification for data and I don't want to build a new dataset every time I have some NAs somewhere.

More information on the package can be found

https://cran.r-project.org/web/packages/Matching/Matching.pdf

This isn't a problem with the Matching package in particular, it's a problem with how to decide on the distance between two units that have missing covariate values. There is no obvious solution to this problem.

One method is to use multiple imputation to impute missing values and create many imputed datasets, perform the matching and treatment effect estimation in each one, and then combine the results. The mice and mitools packages can be useful for this. If you decide you would be okay using MatchIt instead of Matching , the MatchThem package works as a wrapper for MatchIt for multiply imputed data.

Step 1 is deciding how you want to deal with your missing data and whether your assumptions about the missingness are justified.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM