Hi stata-users,
I have used the following code to pair data (1:1) after running psmatch2 in a 1:1 fashion:
Issue: I get equal numbers of treated and untreated observations when I run it on a small sample like 100,000 observations. But when I run it on a large dataset ranging from 200,000 to 900,000 observations, my untreated group always has two extra observations than the treated group making them unequal. It is impossible to manually see what's happening there.
Anyone else who might have faced similar problems here?
Much appreciated. Thanks.
I have used the following code to pair data (1:1) after running psmatch2 in a 1:1 fashion:
Code:
gen pair = _id if _treated==0 replace pair = _n1 if _treated==1 bysort pair: egen paircount = count(pair) tab paircount drop if paircount!=2
Anyone else who might have faced similar problems here?
Much appreciated. Thanks.