Dear Statalisters,
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
In this example, the first treated observation (idcode=1 in year 72) has been matched to control number 8762 (_n1=8762), which also belongs to union (i.e. treated observation). Moreover, the value of ln_wage for observation # 8762 (2.249184) is different from the matched control value i.e. _ln_wage (2.3289595) , reported by psmatch2.


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