Hi All. I’d love some help with the PSM dataset I’m constructing. I’ve already established overlap and have used a logit model to predict propensity scores (var names are generic):

logit treatment cov1 cov2 cov3 cov4 cov5, vce (robust) nolog
predict PS

I then sorted by treatment and used the teffects command to generate nearest neighbor matches (I’m not really interested in the teffects estimation – just the matching):

teffects nnmatch (y PS) (treatment), nn(5) generate stub

I’ve spot checked and it appears this is giving me what I want -- 5 control observations per treatment observation (oversampled with replacement). But the stubs are observation numbers specific to the current order of the data. What I cannot figure out is how to use the stubs to generate dummies by these observation #s (one stub list at a time, 1 through 5) to refine, save and append so that I have the matched sample I’m trying to construct.

Many thanks in advance! Annie