I'm running Stata/MP 14.2 under Windows 7. I have a question about different results between summarize and ksmatch (http://ideas.repec.org/c/boc/bocode/s458346.html). ksmatch gives me the following output:
I'm trying to reproduce the results in summarize. This works with the treatment group because the weights are 1 (at least that's the way I read the ksmatch documentation). However, I get this with summarize:
The number of obs and the sum of the weights are both correct. Can the discrepancy in the mean between ksmatch and summarize be attributed to rounding error?
Code:
. kmatch ps anesthesia encounter_age bsa2 qrs2 pulgrade pul_stenosis rightventsize lvefecho2 /*
> */ (lvef2=encounter_age bsa2 qrs2 pulgrade pul_stenosis rightventsize lvefecho2), /*
> */ comsup kernel(biweight) pscmd(logit) att bwidth(cv) /*
> */ generate(_KM_treat _KM_nc _KM_nm _KM_mw) po
(12 observations with PS outside common support)
(computing bandwidth ................ done)
Propensity-score kernel matching Number of obs = 117
Kernel = biweight
Treatment : anesthesia = 1
Covariates : encounter_age bsa2 qrs2 pulgrade pul_stenosis rightventsize lvefecho2
PS model : logit (pr)
RA equations: lvef2 = encounter_age bsa2 qrs2 pulgrade pul_stenosis rightventsize lvefecho2 _cons
Matching statistics
------------------------------------------------------------------------------------------
| Matched | Controls | Bandwidth
| Yes No Total | Used Unused Total |
-----------+---------------------------------+---------------------------------+----------
Treated | 27 5 32 | 78 7 85 | .07729
------------------------------------------------------------------------------------------
Treatment-effects estimation
------------------------------------------------------------------------------
lvef2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ATT | -6.285085 1.763609 -3.56 0.001 -9.778135 -2.792035
Y1 | 50.03333 1.300894 38.46 0.000 47.45675 52.60992
Y0 | 56.31842 1.16635 48.29 0.000 54.00832 58.62852
------------------------------------------------------------------------------
Code:
. summarize lvef2 if anesthesia==0 & _KM_nm~=0 & _KM_nm~=. [aw=_KM_mw]
Variable | Obs Weight Mean Std. Dev. Min Max
-------------+-----------------------------------------------------------------
lvef2 | 78 27 56.22177 5.17997 42 69

Comment