
Plot Estimated Effects of Treatment Over Time
plot_panel_estimate.RdThis function takes an object (result of PanelEstimate or similar) and plots its estimates over time.
Usage
plot_panel_estimate(
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(),
...
)
plot_PanelEstimate(...)Examples
if (FALSE) { # \dontrun{
library(PanelMatch)
pd <- PanelData(panel.data = dem, unit.id = "wbcode2",
time.id = "year", treatment = "dem", outcome = "y")
PM.results.ps.weight <- PanelMatch(
panel.data = pd, lag = 4, refinement.method = "ps.weight",
match.missing = FALSE, listwise.delete = TRUE,
covs.formula = ~ I(lag(tradewb, 1:4)) + I(lag(y, 1:4)),
size.match = 5, qoi = "att", lead = 0:4,
forbid.treatment.reversal = FALSE
)
PE.results <- PanelEstimate(sets = PM.results.ps.weight,
panel.data = pd,
se.method = "bootstrap",
number.iterations = 1000,
confidence.level = .95)
plot_panel_estimate(PE.results)
} # }