Hi everyone,

I am currently working on a project where I want to use STATA command teffects rather than psmatch2 (according to https://www.ssc.wisc.edu/sscc/pubs/stata_psmatch.htm). So far psmatch2 worked without any problems in my sample, but when I try to use teffects I have some trouble to get it going.

I have in total ~70.000 firm observations, which I want to match based on 3 criteria (that is return-on-assets, leverage and firm size). My treatment dummy is coded binary (1 for treated observations and 0 for control observations). My dependent variable is bid-ask-spread. The code line for that looks as follows:

Code:
teffects psmatch (basmed_ln) (treat roa lntasset leverage), caliper(0.01) osample(nomatch) nneighbor(1)
However when I try to run this in my do-file I always get
26 observations have no propensity-score matches within
caliper .01; they are identified in the osample() variable
I had a look at the data editor and could see that 26 observations had indeed no propensity score.
Next, I wanted to drop those obs where
Code:
osample == "."
To do this is used the suggestion by Jonathan Seiden: https://www.statalist.org/forums/for...ffects-nnmatch

So I adjusted my code to :
Code:
logit treat_hard (roa lntasset leverage)  
predict ps  
teffects psmatch (basmed_ln) (ps), caliper(0.01) nneighbor(1) osample(outofrange) vce(robust)  
drop if outofrange == 1    
teffects psmatch (basmed_ln) (treat_hard ps), caliper(0.01) nneighbor(1) vce(robust)
When I ran this, I get the following error:
treatment variable ps must contain nonnegative integers
.

This is not obvious to me as
Code:
ps
does not have any nonnegative values (it is within a range of 0 and 1).

I tried using
Code:
drop if ps =="."
, as I have 288 missing values generated but it didn't do the job...

Anyone an idea what I am missing to get teffects working?

P.S. I am using STATA 14.2