Hi all,

I am using teffects nnmatch to match treated units with several controls units. My goal is to only get the matches -- I am not interested in ATT or other outputs of teffects.

To this end, I am using the following command.

Code:
teffects nnmatch (fake_outcome cont_var1 cont_var2) (treat), ///
         ematch(integer_var1 integer_var2) nn(4) ///
         generate(obs_num) osample(insuff_match) metric(euclidean)
The problem is that because I am aiming for exact match in terms of some integer variables, several observations are not match-able. This results in an error, and obs_num variables never get created.

Now most of these non-matches are in the control sample, and I do not care if a control unit is not matched. Very few treated units are un-matched. I deleted these units, and re-ran the command, but I continue to get the error.

Is there a way in which osample() identifies the unmatched observations, but also creates the obs_num variables? This way I would be able to simply filter out the treated units that have a match.

Any leads are much appreciated.

Best
Tirupam