did_plot_yearly_effects {fixest} | R Documentation |
This function plots the results of a did_estimate_yearly_effects
estimation.
did_plot_yearly_effects(object, x.shift = 0, w = 0.1, ci_level = 0.95, style = c("bar", "interval", "tube"), add = FALSE, col = 1, bar.col = col, bar.lwd = par("lwd"), bar.lty, grid = TRUE, grid.par = list(lty = 1), bar.join = TRUE, ...)
object |
An object returned by the function |
x.shift |
Shifts the confidence intervals bars to the left or right, depending on the value of |
w |
The width of the confidence intervals. |
ci_level |
Scalar between 0 and 1: the level of the CI. By default it is equal to 0.95. |
style |
One of |
add |
Default is |
col |
Color of the point estimate and of the line joining them (if |
bar.col |
Color of the bars of the confidence interval. Defaults to |
bar.lwd |
Line width of the confidence intervals, defaults to |
bar.lty |
Line type of the confidence intervals, defaults to |
grid |
Whether to add an horizontal grid. Default is |
grid.par |
Graphical parameters used when plotting the grid in the background. Default is |
bar.join |
Logical, default is |
... |
Any other argument to be passed to |
Laurent Berge
did_estimate_yearly_effects
, errbar
.
# Sample data illustrating the DiD data(base_did) # Estimation of yearly effect (they are automatically added) est = did_estimate_yearly_effects(y ~ x1 + treat + post, base_did, treat_time = ~treat+period, reference = 5) # Now we plot the results did_plot_yearly_effects(est) # Now with fixed-effects: est_fe = did_estimate_yearly_effects(y ~ x1 | id + period, base_did, treat_time = ~treat+period, reference = 5) did_plot_yearly_effects(est_fe) # you can change the type of SE to be plotted: did_plot_yearly_effects(est_fe, se = "cluster") # default did_plot_yearly_effects(est_fe, se = "standard")