Hi statalists,
I would like to use Mahalanobis matching in a loop. I think there is a problem within my code related to psmatch2(line 3). However, I don't know how to fix it. Can anyone provide ideas? Thanks!
I would like to use Mahalanobis matching in a loop. I think there is a problem within my code related to psmatch2(line 3). However, I don't know how to fix it. Can anyone provide ideas? Thanks!
Code:
levels firmrating, local(gr) foreach j of local gr{ psmatch2 Dummy, mahal(V1 V2 V3 V4) if firmrating == `j', out(IndVar) foreach var in pscore treated support weight IndVar id n1 pdif{ replace `var'=_`var' if firmrating == `j' } }
Comment