This function takes an object (result of PanelEstimate or similar) and plots its estimates over time.

plot_PanelEstimate(
  pe.object,
  ylab = "Estimated Effect of Treatment",
  xlab = "Time Since Treatment",
  main = "Estimated Effects of Treatment Over Time",
  ylim = NULL,
  theme_use = causalverse::ama_theme(),
  ...
)

Arguments

pe.object

The object with the estimation results.

ylab

The y-axis label.

xlab

The x-axis label.

main

The main title for the plot.

ylim

The limits for the y-axis.

theme_use

The theme to use for the plot. Defaults to causalverse::ama_theme().

...

Additional parameters to pass to labs() function.

Value

A ggplot object with the desired plot.

Examples

if (FALSE) {
PM.results.ps.weight <- PanelMatch(lag = 4, time.id = "year", unit.id = "wbcode2",
                                   treatment = "dem", refinement.method = "ps.weight",
                                   data = dem, match.missing = FALSE, listwise.delete = TRUE,
                                   covs.formula = ~ I(lag(tradewb, 1:4)) + I(lag(y, 1:4)),
                                   size.match = 5, qoi = "att", outcome.var = "y",
                                   lead = 0:4, forbid.treatment.reversal = FALSE)

PE.results <- PanelEstimate(sets = PM.results.ps.weight, 
                            data = dem,
                            se.method = "bootstrap",
                            number.iterations = 1000,
                            confidence.level = .95)

plot_PanelEstimate(PE.results)
}