insongkim / PanelMatch

111 stars 34 forks source link

Changing x-axis labels #125

Closed sbby23 closed 10 months ago

sbby23 commented 1 year ago

Hi, thanks for the great package!

However, I was wondering whether there is a way to change the x-Axis labels from t+0 and t+1 to for example 2017 and 2018. I have not yet figured out how to do so after plotting the Panel.Estimate with the plot() function.

Additionally I was wondering whether there is a way to use the Panel.Estimate in ggplot?

Furthermore, is there any reasonable way to extract the summary table of the treatment effects from R? (i.e. using stargazer?)

Thanks for your help in advance!

adamrauh commented 1 year ago

Thanks for using the package!

You should be able to change some of the features (including the x axis labels, I think) by providing extra arguments to the plot function as you would with any base R plot (e.g. xaxt = "x axis"). If that doesn't work, let me know and we can try to make some improvements!

For ggplot, stargazer, etc., -- my recommendation would be to extract the data frame with key results from using summary.PanelEstimate(). Then you can wrangle that however you'd like to get custom plots, tables, etc. That is largely all that plot.PanelEstimate() is doing under the hood anyway.

Let me know if you have additional questions.