Dear Statalist,
My team and I are running a propensity score matching analysis on agricultural data in order to assess the impact of credit in several farmer outcomes. For this, we are using the psmatch2 command, but I was frustrated as we never got to completely and globally balance the treatment and control groups on the observable covariates considered. So we decided to switch to the command teffects nnmatch, that allows to perform the matching exactly on the observable covariates, which is useful for categorical variables for example.
Anyways, we are now getting an error after running the command, which is similar to the one of this thread:http://www.statalist.org/forums/foru...match-question
We first run a line of code that looks like the following:
teffects nnmatch (dep_variable x_covariate) (treatment) which gives the following error message: no exact matches for observation 23472; use option osample() to identify all observations with deficient matches
We then include the option osample: teffects nnmatch (dep_variable x_covariate) (treatment) , osample(newvar) After Stata identifies the observations for which an exact match cant be found (they have a 1 in newvar). We do the following:
teffects nnmatch (dep_variable x_covariate) (treatment) if newvar == 0 Unfortunately, we end up with an error message similar to when we first ran the command, that is, the Stata claims it didnt find exact matches for a certain observation, different than the one at the beginning. Each time I run it, it takes about 2 hours to finish, so I'm not sure how to deal with this issue without having to run several times the command with the option osample.
Does anybody know a solution for this problem?
Best regards,
Juan
My team and I are running a propensity score matching analysis on agricultural data in order to assess the impact of credit in several farmer outcomes. For this, we are using the psmatch2 command, but I was frustrated as we never got to completely and globally balance the treatment and control groups on the observable covariates considered. So we decided to switch to the command teffects nnmatch, that allows to perform the matching exactly on the observable covariates, which is useful for categorical variables for example.
Anyways, we are now getting an error after running the command, which is similar to the one of this thread:http://www.statalist.org/forums/foru...match-question
We first run a line of code that looks like the following:
teffects nnmatch (dep_variable x_covariate) (treatment) which gives the following error message: no exact matches for observation 23472; use option osample() to identify all observations with deficient matches
We then include the option osample: teffects nnmatch (dep_variable x_covariate) (treatment) , osample(newvar) After Stata identifies the observations for which an exact match cant be found (they have a 1 in newvar). We do the following:
teffects nnmatch (dep_variable x_covariate) (treatment) if newvar == 0 Unfortunately, we end up with an error message similar to when we first ran the command, that is, the Stata claims it didnt find exact matches for a certain observation, different than the one at the beginning. Each time I run it, it takes about 2 hours to finish, so I'm not sure how to deal with this issue without having to run several times the command with the option osample.
Does anybody know a solution for this problem?
Best regards,
Juan
Comment