plot.PanelEstimate: Plot point estimates and standard errors from a PanelEstimate...

View source: R/PanelEstimateObject.R

plot.PanelEstimateR 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 PanelEstimate object

ylab

default is "Estimated Effect of Treatment." This is the same argument as the standard argument for plot()

xlab

default is "Time". This is the same argument as the standard argument for plot()

main

default is "Estimated Effects of Treatment Over Time". This is the same argument as the standard argument for plot

ylim

default is NULL. This is the same argument as the standard argument for plot()

pch

default is NULL. This is the same argument as the standard argument for plot()

cex

default is NULL. This is the same argument as the standard argument for plot()

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 plot().

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)


PanelMatch documentation built on June 22, 2024, 10:32 a.m.