bcallaway11 / did

Difference in Differences with Multiple Periods, website: https://bcallaway11.github.io/did
287 stars 91 forks source link

ggdid a subset of outcome #172

Closed cjing1 closed 1 year ago

cjing1 commented 1 year ago

Thank you again for the amazing package.

I am wondering whether I can plot a subset of the output based on x-axis when using ggdid. For instance, the y-axis in the plot below is stretched by the large CI around time -55. Is it possible I can modify the input in ggdid function to only plot ex. time periods [-30,30]?

Rplot

I tried to adjust for ylim to c(-1,1). However, it just removes the CI larger than +-1. Rplot01

pedrohcgs commented 1 year ago

You would to do this manually, exploring ggplot functionalities

On Sun, Apr 2, 2023 at 18:34 ChenJ @.***> wrote:

Thank you again for the amazing package.

I am wondering whether I can plot a subset of the output based on time when using ggdid. For instance, the y-axis in the plot below is stretched by the large CI around time -55. Is it possible I can modify the input in ggdid function to only plot ex. time periods [-30,30]?

I tried to adjust for ylim to c(-1,1). However, it just removes the CI larger than +-1. [image: Rplot01] https://user-images.githubusercontent.com/31779053/229384846-1f48dd49-874f-49d4-9662-4acda4fde695.png

— Reply to this email directly, view it on GitHub https://github.com/bcallaway11/did/issues/172, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE7347LHEEPZFL7JP4GXR3W7IEGZANCNFSM6AAAAAAWQTESSY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Pedro H. C. Sant'Anna Department of Economics Vanderbilt University 615-875-8448 (phone) @.*** https://pedrohcgs.github.io

cjing1 commented 1 year ago

You would to do this manually, exploring ggplot functionalities On Sun, Apr 2, 2023 at 18:34 ChenJ @.> wrote: Thank you again for the amazing package. I am wondering whether I can plot a subset of the output based on time when using ggdid. For instance, the y-axis in the plot below is stretched by the large CI around time -55. Is it possible I can modify the input in ggdid function to only plot ex. time periods [-30,30]? I tried to adjust for ylim to c(-1,1). However, it just removes the CI larger than +-1. [image: Rplot01] https://user-images.githubusercontent.com/31779053/229384846-1f48dd49-874f-49d4-9662-4acda4fde695.png — Reply to this email directly, view it on GitHub <#172>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE7347LHEEPZFL7JP4GXR3W7IEGZANCNFSM6AAAAAAWQTESSY . You are receiving this because you are subscribed to this thread.Message ID: @.> -- =============================== Pedro H. C. Sant'Anna Department of Economics Vanderbilt University 615-875-8448 (phone) @.*** https://pedrohcgs.github.io ===============================

Thank you for the prompt reply. I will explore it.

bcallaway11 commented 1 year ago

You might also want to have a look at the min_e and max_e arguments to the aggte function. See here

Brant

cjing1 commented 1 year ago

here

Thank you so much. This works perfectly, only produces a slightly different Std. Error.