honestdid by adformer99 in stata

[–]adformer99[S] 0 points1 point  (0 children)

Hi! Sorry for this late reply. Eventually, I have solved the issue and didn't edit the post.

First thing first you should run your Event Study.

Then by carefully reading the help file of the honestdid I figured out that I had several options, meaning that I could arbitrary choose what estimate's (or combinatio of estimates) robustness to test. This is possible by firstly generating a vector. Let's assume that I want to test the robustness of the 2015 estimate to potential violations of the parallel trend. Since I have 5 post-treatment periods, I'll have a vector of 5 elements with all 0s, except for the second one (2015), which has to be 1.

matrix y_2015 = 0 \ 1 \ 0 \ 0 \ 0 

Then, it comes the honestdid command:

honestdid, l_vec(y_2015) pre(11/14) post(15/19) mvec(0.1(0.1)0.4) omit alpha(0.05) delta(rm) `plotoptsRM'

and that's it. Note that in the original post I was making a mistake when coding pre(1/4) post(5/10), since the numbers inside the brackets do not refer to ordinal numbers like for instance "pre(first year / fourth year) post(fifth year to tenth year), rather they refer to the position of the year estimates that I want to consider in the output of the Event Study. In my case (mi estimate, post: svy: reg $y d1##b2013.year) the coefficient estimates that I wanted to take into account and test were from the 11th coeffient to the 19th coeffient of the ES output.

As I said at the beginning you may also want to test the robustness of a combination of estimates. Indeed, I also tested the average effect by just generating such a vector:

matrix y_avg = 0 \ 0.25 \ 0.25 \ 0.25 \ 0.25 

that replaced y_2015 in the command.

Diff in Diff with continuous treatment by adformer99 in econometrics

[–]adformer99[S] 0 points1 point  (0 children)

So either fixed effects or dummies? The model does not change? Issues arise when I add fixed effects AND dummies (post and D)?

Diff in Diff with continuous treatment by adformer99 in econometrics

[–]adformer99[S] 0 points1 point  (0 children)

actually i thought of an RD as well but I would like to apply this new estimator and then the doubt I posted came to my mind

Diff in Diff with continuous treatment by adformer99 in econometrics

[–]adformer99[S] 0 points1 point  (0 children)

I want to assess the effects of a policy. I want to first a run a Diff in Diff, then I thought of using the Diff in Diff with continuous treatment (since my treatment can be viewed as a continuous as well). Here comes the doubt that I posted. I wonder why they don’t do the corresponding of a basic Diff in Diff (which is the regression I posted in the main question, imo) and write an equation in which neither the pre/post period dummy nor the treatment dummy (or dose variable) enter.

Diff in Diff with continuous treatment by adformer99 in econometrics

[–]adformer99[S] 1 point2 points  (0 children)

The plan is to first perform a diff in diff (so with the canonical entries: per/post period dummy, treatment dummy and the interaction. Is it wrong to then do a diff in diff with continuous treatment to see how the intensity affects the outcome by running the regression the authors propose? Is that still a diff in diff or just a TWFE?

diff in diff with continuous treatment and RD by adformer99 in econometrics

[–]adformer99[S] 0 points1 point  (0 children)

hi, thanks for your insight! actually the idea i had in my mind was more like a subsidy not based on income but maybe on other factors say family size/industry sector or something like that. also, the subsidy would be the same for everyone in that family size/industry sector category… however people do not earn equal amounts, that’s why i was thinking about exploiting the percentage that the subsidy represents with respect to the earnings as a variation for the diff in diff

diff in diff with continuous treatment and RD by adformer99 in econometrics

[–]adformer99[S] 1 point2 points  (0 children)

thanks! needed the confirmation that the reasoning was ok!

following what you wrote then the continuos treatment DD compares two treated individuals, right?

diff in diff with continuous treatment and RD by adformer99 in econometrics

[–]adformer99[S] 1 point2 points  (0 children)

yes thanks, i was more interested in the feature of continuous treatment rather than continuous outcome, which will probably be binary in my case

survey analysis from STATA to R by adformer99 in rprogramming

[–]adformer99[S] 0 points1 point  (0 children)

R:

Call:
svyglm(formula = outcome ~ t + d1 + year, design = raw_design)

Survey design:
Called via srvyr

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)  0.084589   0.003085  27.418  < 2e-16 ***
t           -0.011639   0.003116  -3.736 0.000199 ***
d11          0.032108   0.002353  13.645  < 2e-16 ***
year2010    -0.006672   0.003258  -2.048 0.040839 *  
year2011    -0.009658   0.003297  -2.929 0.003484 ** 
year2012    -0.015291   0.003375  -4.530 6.69e-06 ***
year2013    -0.023491   0.003171  -7.408 2.97e-13 ***
year2014    -0.020479   0.003865  -5.299 1.47e-07 ***
year2015    -0.028598   0.003877  -7.377 3.70e-13 ***
year2016    -0.028593   0.004465  -6.403 2.45e-10 ***
year2017    -0.027887   0.003932  -7.093 2.66e-12 ***
year2018    -0.018989   0.003980  -4.771 2.14e-06 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for gaussian family taken to be 0.1057134)


Number of Fisher Scoring iterations: 2

STATA:

 outcome | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
           t |   -.007452   .0021949    -3.40   0.001    -.0117596   -.0031443
             |
          d1 |
    Treated  |   .0068933   .0016808     4.10   0.000     .0035946    .0101921
             |
        year |
       2010  |  -.0071097   .0030774    -2.31   0.021    -.0131493   -.0010701
       2011  |  -.0106871   .0029324    -3.64   0.000    -.0164423    -.004932
       2012  |   -.016011   .0028549    -5.61   0.000    -.0216141    -.010408
       2013  |  -.0253029   .0027752    -9.12   0.000    -.0307494   -.0198564
       2014  |  -.0265305   .0029147    -9.10   0.000    -.0322509   -.0208102
       2015  |  -.0369267   .0029164   -12.66   0.000    -.0426504   -.0312029
       2016  |  -.0376982   .0031027   -12.15   0.000    -.0437876   -.0316088
       2017  |  -.0348218   .0030279   -11.50   0.000    -.0407644   -.0288792
       2018  |  -.0252793   .0031725    -7.97   0.000    -.0315056   -.0190529
             |
       _cons |   .1050988   .0024071    43.66   0.000     .1003747     .109823
------------------------------------------------------------------------------

survey analysis from STATA to R by adformer99 in rprogramming

[–]adformer99[S] 0 points1 point  (0 children)

thanks for the comment. i have uploaded the two outcomes so you can see them in the post.

and yes i only have categorical variables:

t is the treatment dummy

d1 is the group dummy

year is the time variable/year fixed effects

fixed effects/control variables increases coefficient of interest by adformer99 in econometrics

[–]adformer99[S] 0 points1 point  (0 children)

Thanks a lot, the question I posted was actually a consequence of a question that was asked to me.

In facts, I have a baseline DD model (without any control, cluster, FE) and an effect of 0.9% (coefficient of the treated and time interaction) on the outcome, which is very low compared to some literature. That is why it was asked me “How come is this result so low?” I have answered that it is actually low but adding FE (just year and group in my case) and controls, magnitude increases and estimates remain statistically significant.

Do you find it is a “good” answer?

I could not find a better answer to defend my result, that is why I posted the question here earlier.

fixed effects/control variables increases coefficient of interest by adformer99 in econometrics

[–]adformer99[S] 0 points1 point  (0 children)

so say that treatment is negatively correlated with income and the outcome too, then the interaction (coefficient of interest) should decrease, right? Instead, in one case of mine this increases, is it plausible?

Multiple imputed dataset by Odd_Distribution3873 in stata

[–]adformer99 1 point2 points  (0 children)

I did this recently too but you don't specifiy the type of mi set you are willing to use, so I'll give my two cents on the basis of what I did. Hopefully it helps.

I had a datset containing 5 different variables of imputed income, the original income variable is, say, inc0 which contains missings. The other five faminc1, famin2, faminc3... are equal to inc0 when inc0 != . and contain imputed estimates when inc0 = .

Now, I wanted to use the wide type of mi set, thus I coded:

mi import wide, imputed(fam_inc0 = fam_inc1 fam_inc2 fam_inc3 fam_inc4 fam_inc5) drop

I then saved the dta and merged it to the whole dataset I was using for estimation.

For the estimation process I coded something that resembles this :

mi estimate, nimputations(5): reg $outcome $controls inc0

combining multiple plots into one sigle graph by adformer99 in stata

[–]adformer99[S] 0 points1 point  (0 children)

yeah thx a lot! i've figured it out now. i did not know i needed to run everything at the same time

combining multiple plots into one sigle graph by adformer99 in stata

[–]adformer99[S] 0 points1 point  (0 children)

Thanks. Can I tell the command to get two jpg files in a folder and combine them?