plot.PanelEstimate {PanelMatch} | R Documentation |
Plot point estimates and standard errors from a PanelEstimate calculation.
Description
The plot.PanelEstimate
method takes an object returned by the PanelEstimate
function and plots the calculated
point estimates and standard errors over the specified lead
time period.
The only mandatory argument is an object of the PanelEstimate
class.
Usage
## S3 method for class 'PanelEstimate'
plot(
x,
ylab = "Estimated Effect of Treatment",
xlab = "Time",
main = "Estimated Effects of Treatment Over Time",
ylim = NULL,
pch = NULL,
cex = NULL,
bias.corrected = FALSE,
...
)
Arguments
x |
a |
ylab |
default is "Estimated Effect of Treatment." This is the same argument as the standard argument for |
xlab |
default is "Time". This is the same argument as the standard argument for |
main |
default is "Estimated Effects of Treatment Over Time". This is the same argument as the standard argument for |
ylim |
default is NULL. This is the same argument as the standard argument for |
pch |
default is NULL. This is the same argument as the standard argument for |
cex |
default is NULL. This is the same argument as the standard argument for |
bias.corrected |
logical indicating whether or not bias corrected estimates should be plotted Default is FALSE. This argument only applies for standard errors calculated with the bootstrap. |
... |
Additional optional arguments to be passed to |
Examples
dem.sub <- dem[dem[, "wbcode2"] <= 100, ]
# create subset of data for simplicity
PM.results <- PanelMatch(lag = 4, time.id = "year", unit.id = "wbcode2",
treatment = "dem", refinement.method = "mahalanobis",
data = dem.sub, match.missing = TRUE,
covs.formula = ~ tradewb,
size.match = 5, qoi = "att",
outcome.var = "y", lead = 0:4, forbid.treatment.reversal = FALSE)
PE.results <- PanelEstimate(sets = PM.results, data = dem.sub, se.method = "unconditional")
plot(PE.results)