I am using balanced panel data where the panel variable is country and the time variable is year. I intend to investigate the effect of aid received by countries on the dependent variable using matching methods, e.g. propensity matching, to address the self selection problem, using the user contributed psmatch2 command. However, I get the feeling that I am not doing the matching correctly for panel data, since I find that a treated observation (i.e. country level observation for any given year) has been matched to another treated country level dependent variable for another year. My thought process is that any treated country (i.e. having received aid in any year) should be matched to another country that had never received aid. I have tried to replicate the problem below using the nlswork dataset.
Code:
webuse nlswork xtset idcode year drop if year<70 | year==75 drop if union==. levelsof year, local(levels) foreach l of local levels { logistic union i.collgrad i.not_smsa ttl_exp occ_code if year == `l' predict double ps replace pscore2 = ps if year == `l' drop ps } isid idcode year, sort set seed 12345 gen double rsort=runiform() isid rsort psmatch2 union, pscore(pscore2) outcome( ln_wage ) n(1) common
Any suggestions as to how to use psmatch2 correctly for panel data, and what I am doing wrong will be greatly appreciated.
Thank you,
Suryadipta
0 Response to Using psmatch2 for panel data
Post a Comment