Hello all,
I wish to apply a doubly robust difference-in-difference estimator using the drdid package. My data is repeated cross-section therefore there are unbalanced characteristics across the two groups, thus in order to estimate atet, I need reweighting.
policy is my "post" variable (=1 after policy) and treat = 1 if individual is treated.
My codes:
1) using only pre-treatment variables
[CODE
drdid scores age c.age#c.age i.sex i.maeduc ymid i.location i.popsize munic_gdp i.state_school if policy==0 , time(year) tr(treat) all
Doubly robust difference-in-differences estimator summary
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
ATET |
dripw | .0253289 .0062734 4.04 0.000 .0130333 .0376245
dripw_rc1 | .0073257 .0062618 1.17 0.242 -.0049473 .0195986
drimp | -.0192829 .005635 -3.42 0.001 -.0303273 -.0082384
drimp_rc1 | -.0000959 .0056453 -0.02 0.986 -.0111605 .0109687
reg | -.0003035 .0047153 -0.06 0.949 -.0095454 .0089383
ipw | -.0219987 .0068335 -3.22 0.001 -.0353921 -.0086053
stdipw | .0034359 .0076242 0.45 0.652 -.0115072 .018379
------------------------------------------------------------------------------
Note: This table is provided for comparison across estimations only. You cannot use it to compare estimates across different estimators
dripw :Doubly Robust IPW
drimp :Doubly Robust Improved estimator
reg :Outcome regression or Regression augmented estimator
ipw :Abadie(2005) IPW estimator
stdipw:Standardized IPW estimator
sipwra:IPW and Regression adjustment estimator.
2) using variables from both groups (before and after)
[CODE] drdid scores age c.age#c.age i.sex i.maeduc ymid i.location i.popsize munic_gdp i.state_school , time(policy) tr(treat) all
Doubly robust difference-in-differences estimator summary
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
ATET |
dripw | .027256 .0036539 7.46 0.000 .0200944 .0344175
dripw_rc1 | .0102055 .0037384 2.73 0.006 .0028783 .0175327
drimp | .0118586 .0030361 3.91 0.000 .005908 .0178093
drimp_rc1 | .0249633 .0030417 8.21 0.000 .0190017 .0309249
reg | .0180872 .0024844 7.28 0.000 .0132179 .0229566
ipw | -.0164215 .0037662 -4.36 0.000 -.0238031 -.0090399
stdipw | -.0088338 .0042984 -2.06 0.040 -.0172585 -.000409
------------------------------------------------------------------------------
]
Considering this is a rcs data type, I am not sure which one to use and how can I assume PT hold after reweighting? in the help file it states "the estimator is appropriate if either the propensity of treatment, or the outcome regression is correctly specified", how can I know?
I asked it to generate the RIF variable but that is only for the "before" part of the data. Am I missing something here?
#[CODE] drdid scores age c.age#c.age i.sex i.maeduc ymid i.location i.popsize munic_gdp i.state_school if policy==0 , time(year) tr(treat) stub(rif2) dripw
Doubly robust difference-in-differences Number of obs = 2,032,024
Outcome model : least squares
Treatment model: inverse probability
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
ATET |
treat |
(1 vs 0) | .0253289 .0062734 4.04 0.000 .0130333 .0376245
------------------------------------------------------------------------------
. sum rif2att , d
rif2att
-------------------------------------------------------------
Percentiles Smallest
1% -16.02436 -953.9732
5% -4.304641 -905.3324
10% -2.991486 -877.8985 Obs 2,032,024
25% -1.426803 -812.6595 Sum of wgt. 2,032,024
50% .0161535 Mean .0253289
Largest Std. dev. 8.942679
75% 1.484337 1007.817
90% 3.095296 1056.131 Variance 79.9715
95% 4.399576 1302.176 Skewness 4.728444
99% 15.83226 1311.288 Kurtosis 1675.18
[CODE]
Can anyone help?
Is there a way I could replicate this by hand or generate the weights? (sorry for so many questions)
I wish to apply a doubly robust difference-in-difference estimator using the drdid package. My data is repeated cross-section therefore there are unbalanced characteristics across the two groups, thus in order to estimate atet, I need reweighting.
policy is my "post" variable (=1 after policy) and treat = 1 if individual is treated.
My codes:
1) using only pre-treatment variables
[CODE
drdid scores age c.age#c.age i.sex i.maeduc ymid i.location i.popsize munic_gdp i.state_school if policy==0 , time(year) tr(treat) all
Doubly robust difference-in-differences estimator summary
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
ATET |
dripw | .0253289 .0062734 4.04 0.000 .0130333 .0376245
dripw_rc1 | .0073257 .0062618 1.17 0.242 -.0049473 .0195986
drimp | -.0192829 .005635 -3.42 0.001 -.0303273 -.0082384
drimp_rc1 | -.0000959 .0056453 -0.02 0.986 -.0111605 .0109687
reg | -.0003035 .0047153 -0.06 0.949 -.0095454 .0089383
ipw | -.0219987 .0068335 -3.22 0.001 -.0353921 -.0086053
stdipw | .0034359 .0076242 0.45 0.652 -.0115072 .018379
------------------------------------------------------------------------------
Note: This table is provided for comparison across estimations only. You cannot use it to compare estimates across different estimators
dripw :Doubly Robust IPW
drimp :Doubly Robust Improved estimator
reg :Outcome regression or Regression augmented estimator
ipw :Abadie(2005) IPW estimator
stdipw:Standardized IPW estimator
sipwra:IPW and Regression adjustment estimator.
2) using variables from both groups (before and after)
[CODE] drdid scores age c.age#c.age i.sex i.maeduc ymid i.location i.popsize munic_gdp i.state_school , time(policy) tr(treat) all
Doubly robust difference-in-differences estimator summary
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
ATET |
dripw | .027256 .0036539 7.46 0.000 .0200944 .0344175
dripw_rc1 | .0102055 .0037384 2.73 0.006 .0028783 .0175327
drimp | .0118586 .0030361 3.91 0.000 .005908 .0178093
drimp_rc1 | .0249633 .0030417 8.21 0.000 .0190017 .0309249
reg | .0180872 .0024844 7.28 0.000 .0132179 .0229566
ipw | -.0164215 .0037662 -4.36 0.000 -.0238031 -.0090399
stdipw | -.0088338 .0042984 -2.06 0.040 -.0172585 -.000409
------------------------------------------------------------------------------
]
Considering this is a rcs data type, I am not sure which one to use and how can I assume PT hold after reweighting? in the help file it states "the estimator is appropriate if either the propensity of treatment, or the outcome regression is correctly specified", how can I know?
I asked it to generate the RIF variable but that is only for the "before" part of the data. Am I missing something here?
#[CODE] drdid scores age c.age#c.age i.sex i.maeduc ymid i.location i.popsize munic_gdp i.state_school if policy==0 , time(year) tr(treat) stub(rif2) dripw
Doubly robust difference-in-differences Number of obs = 2,032,024
Outcome model : least squares
Treatment model: inverse probability
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
ATET |
treat |
(1 vs 0) | .0253289 .0062734 4.04 0.000 .0130333 .0376245
------------------------------------------------------------------------------
. sum rif2att , d
rif2att
-------------------------------------------------------------
Percentiles Smallest
1% -16.02436 -953.9732
5% -4.304641 -905.3324
10% -2.991486 -877.8985 Obs 2,032,024
25% -1.426803 -812.6595 Sum of wgt. 2,032,024
50% .0161535 Mean .0253289
Largest Std. dev. 8.942679
75% 1.484337 1007.817
90% 3.095296 1056.131 Variance 79.9715
95% 4.399576 1302.176 Skewness 4.728444
99% 15.83226 1311.288 Kurtosis 1675.18
[CODE]
Can anyone help?
Is there a way I could replicate this by hand or generate the weights? (sorry for so many questions)
Comment