Dear all,
I am performing some observational research which uses IPTW and the -teffects ipw- package.
After performing the analysis, I am using the -tebalance summarize- command to obtain the standardized differences, as so:
but does anyone know how to get the actual weighted means and SDs (or weighted numbers/percentages for binary variables)?
I have attached a figure showing what I am trying to achieve.
The columns to the right show the weighted numbers and percentages (for binary variables) and weighted means/SDs (for continuous variables), and these are the numbers I would like to get.
My attempt has been to use each demographic variable that I am interested in as an "outcome" in the -teffects ipw- analysis and use the POMs as the weighted means.
I think this is correct for the weighted means, but I am unsure how to go from the robust SEs given to SDs. But since SE = SD / sqrt(n), perhaps it is just multiplying the SE by the square root of the number of observations in the weighted sample?
For example:
for the control group above, and
for the treatment group
Can anyone help?
Many thanks, Phil
I am performing some observational research which uses IPTW and the -teffects ipw- package.
After performing the analysis, I am using the -tebalance summarize- command to obtain the standardized differences, as so:
Code:
quietly webuse cattaneo2, clear quietly teffects ipw (bweight) (mbsmoke foreign alcohol mage medu fage fedu, logit) tebalance summarize mage alcohol Covariate balance summary Raw Weighted ----------------------------------------- Number of obs = 4,642 4,642.0 Treated obs = 864 2,238.7 Control obs = 3,778 2,403.3 ----------------------------------------- ----------------------------------------------------------------- |Standardized differences Variance ratio | Raw Weighted Raw Weighted ----------------+------------------------------------------------ mage | -.300179 -.0893001 .8818025 .8381985 alcohol | .3222725 -.0033769 4.509207 .9828912 -----------------------------------------------------------------
I have attached a figure showing what I am trying to achieve.
The columns to the right show the weighted numbers and percentages (for binary variables) and weighted means/SDs (for continuous variables), and these are the numbers I would like to get.
My attempt has been to use each demographic variable that I am interested in as an "outcome" in the -teffects ipw- analysis and use the POMs as the weighted means.
Code:
. teffects ipw (mage) (mbsmoke foreign alcohol mage medu fage fedu, logit), pom Iteration 0: EE criterion = 3.138e-17 Iteration 1: EE criterion = 1.339e-29 Treatment-effects estimation Number of obs = 4,642 Estimator : inverse-probability weights Outcome model : weighted mean Treatment model: logit ------------------------------------------------------------------------------ | Robust mage | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- POmeans | mbsmoke | nonsmoker | 26.45739 .0842272 314.12 0.000 26.29231 26.62247 smoker | 25.96681 .1190025 218.20 0.000 25.73357 26.20005 ------------------------------------------------------------------------------
For example:
Code:
. di sqrt(2403.3) * .0842272 4.1291091
Code:
. di sqrt(2238.7) * .1190025 5.6305917
Can anyone help?
Many thanks, Phil
Comment