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

View source: R/PanelEstimate.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,
  ...
)

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

...

Additional optional arguments to be passed to plot.

Examples

PM.results <- PanelMatch(lag = 4, time.id = "year", unit.id = "wbcode2", 
                         treatment = "dem", refinement.method = "mahalanobis", 
                         data = dem, match.missing = 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, data = dem, number.iterations = 100)
plot(PE.results)



insongkim/PanelMatch documentation built on June 10, 2022, 8 p.m.