I am looking for recommended procedures/packages for matching samples (with or without propensity scores) to restrict the number of cases in one of two groups. Data are collected with a survey, and a group has substantial dropout (self-selection). I would like to consider this self-selection by using auxiliary variables (covariates) to match individuals from the other group, the group with a high response rate. In case-control studies, this latter group would be referred to as the “control group”.

I believe I cannot integrate the matching in for instance Stata’s -teffects- module since I need to select a restricted/matched sample and then move this sample to advanced analyses with SEM.

Hopefully, someone can give me advice on what would be a good approach. My coding skills are better in R, but I tend to use Stata for data management within a single data frame. So using a package for either Stata or R would be great.

  • $\begingroup$ What kind of matching are you planning on implementing (e.g Nearest Neighbour, Kernel etc)? I suggest you manually program the matching function via the formula for the method, since Stata's psmatch2 will only give you the observation line of the matched observation(s), if I remember correctly. $\endgroup$
    – Caio C.
    Nov 3, 2020 at 18:21

1 Answer 1


I'd start with the Matching package in R. https://cran.r-project.org/web/packages/Matching/Matching.pdf

  • $\begingroup$ Why would you start with the matching package in R ? Can you explain why that would be better than, say the matchit package for example ? $\endgroup$
    – LeelaSella
    Nov 3, 2020 at 20:54
  • $\begingroup$ I don't have a strong preference between the matching package and MatchIt. $\endgroup$ Nov 3, 2020 at 20:55
  • $\begingroup$ Thanks. I will consider Matching and MatchIt (Matching seems to be continuely updated). Stata's -teffects- has matching but seems to be focused on estimating treatment effects. A challenge for me is that I have lots of missing data (not only because of the common non-reponse to single items, but also missing values by design). As for the choice between Nearest Neighbour and other methods: I guess I will try alternative solutions and compare the results. Any further comments/recommendations are welcome. $\endgroup$
    – cibr
    Nov 4, 2020 at 12:18
  • $\begingroup$ You might consider treating missing as a valid value (so code it to a value like -1 if you have fields that are always positive, or filling categorical columns with "Not Answered"). This is valid in a lot of cases-and your case where missing is often by design is one of those cases. $\endgroup$ Nov 4, 2020 at 14:45
  • 1
    $\begingroup$ I didn't mean to be misleading. Using a set value to stand in for missing on your continuous variables is only valid for the matching portion of the problem, which really isn't a statistical problem. It's a trick I use that generally gives good results, but the effect on the match will depend on your data and your problem. $\endgroup$ Nov 4, 2020 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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