friosavila / csdid_drdid

Repository for the implementation of csdid and drdid
GNU General Public License v3.0
18 stars 7 forks source link

Report the sample size? #28

Closed mkp132 closed 1 year ago

mkp132 commented 2 years ago

Hi, thank you so much for writing these commands and making the github!

I am working with csdid in Stata and am now working on reporting my estimations. I have noticed that I cannot get the sample size to generate in any of the tables. For example, I run:

csdid AVGDRNKS_con_DRINK [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r1) csdid AVGDRNKS_W_NO_DRNK [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r2) csdid DrinkOccasionsPerDay [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r3) csdid BINGE [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r4) csdid DrinkAny30Days [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r5) esttab r1 r2 r3 r4 r5, stats(N) b(3) se(3) star(* 0.10 ** 0.05 *** 0.01)

and the resulting table has a row of blank sample sizes (N). I was wondering what the best way to report results with the sample size?

Thanks so much!

friosavila commented 2 years ago

Hi there I have not made the update for csdid and drdid in the github repository, but will do that soon. For now, if you download (or replace) the commands from ssc (ssc install drdid, replace and ssc install csdid, replace), you will see that sample size is not provided. Also, if you use csdid, you can also type matrix list e(gtt) and this will give youtube disaggregated sample sizes by ATTGT, with info on how many controls and treated its were. (Note that the second to last column is N of controls, while the last column is N of Treated).

Let me know if you have any other questions Fernando

On Tue, Nov 23, 2021 at 11:45 AM mkp132 @.***> wrote:

Hi, thank you so much for writing these commands and making the github!

I am working with csdid in Stata and am now working on reporting my estimations. I have noticed that I cannot get the sample size to generate in any of the tables. For example, I run:

csdid AVGDRNKS_con_DRINK [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r1) csdid AVGDRNKS_W_NO_DRNK [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r2) csdid DrinkOccasionsPerDay [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r3) csdid BINGE [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r4) csdid DrinkAny30Days [iw=sampleweight], time(year) gvar(yvar) estat simple, estore(r5) esttab r1 r2 r3 r4 r5, stats(N) b(3) se(3) star( 0.10 0.05 0.01)

and the resulting table has a row of blank sample sizes (N). I was wondering what the best way to report results with the sample size?

Thanks so much!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/friosavila/csdid_drdid/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZKKFTWKULMALGKBJFK3ZLUNPAJ5ANCNFSM5IT7AEHQ .

mkp132 commented 2 years ago

Thanks Fernando!

I have just tried typing matrix list e(gtt), (forgive me—I am somewhat new to Stata as a PhD student so I may be missing something or misunderstanding), but I am getting a matrix with four columns, and the first three seem to be the data years of my sample (years 2013 through 2021) while the last column I think is maybe providing the N of the treated as you described, but no N for the control.

friosavila commented 2 years ago

did you get the last versions for csdid from SSC?

On Tue, Nov 23, 2021 at 5:57 PM mkp132 @.***> wrote:

Thanks Fernando!

I have just tried typing matrix list e(gtt), (forgive me—I am somewhat new to Stata as a PhD student so I may be missing something or misunderstanding), but I am getting a matrix with four columns, and the first three seem to be the data years of my sample (years 2013 through 2021) while the last column I think is maybe providing the N of the treated as you described, but no N for the control.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/friosavila/csdid_drdid/issues/28#issuecomment-977248898, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZKKFTPHEL225SEIBBBYD3UNQL4NANCNFSM5IT7AEHQ .

mkp132 commented 2 years ago

Ah I see—needed to update the package! Thank you Fernando!