benmiroglio / pymatch

MIT License
272 stars 128 forks source link

Included option for matching without replacement. #19

Closed tlooden closed 5 years ago

tlooden commented 5 years ago

Hi Ben,

Thanks for making this nice tool! If you like, i've implemented a new feature that is common in eg. R packages for the same purpose which is to have the option to match without replacement. The downsides to this can be slightly worse matching overall as well as possible order effects - however for some types of analyses you really want to have unique subjects in each group. Now the user has the choice to make that decision! :)

I've also implemented (line 189) a randomization for the order in which the matching proceeds. This is so that you can check for said ordering effects, and e.g. run it a couple of times until the matching is at a desirable level.

Please let me know if i can make anything more clear. it's my first GH pull request so apologies in advance if my etiquette is not on point.

All the best!

Tristan