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
Related Posts with PSM help: using observation # stubs to generate dummies
Generating new variable in a panel dataset with values of first time periodHi everyone! Apologies for the vague title. I have a variable (URBAN) that defines each village (IDP…
DEA with loopSuppose I have a set of 100 hospitals and each hospital has an observation for four years. I want to…
Stata 17 Speed vs Stata 16.1 SpeedFirst of all, congratulations to all for getting the New update. It is great to see STATA putting ef…
Extreme values in upper/lower bound bands not in original dataI want to create a graph with upper/lower bound bands - using this code (similar to that used here U…
Issues with running stata code for cnormI have issues running the stata code for cnorm as shown below, is there any way to resolve this issu…
Subscribe to:
Post Comments (Atom)
0 Response to PSM help: using observation # stubs to generate dummies
Post a Comment