plot_PanelEstimate.Rd
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(),
...
)
The object with the estimation results.
The y-axis label.
The x-axis label.
The main title for the plot.
The limits for the y-axis.
The theme to use for the plot. Defaults to causalverse::ama_theme().
Additional parameters to pass to labs() function.
A ggplot object with the desired plot.
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)
}