Plots the effect estimates along the frontier to see how the effect changes with different remaining sample sizes. The plot includes the effect estimates as well as confidence interval or model dependence bands. The bands are produced using ggplot2::geom_ribbon().

# S3 method for frontierEstimates
plot(x,
     band, band.col = "red",
     band.border.col = "red",
     band.alpha = .5, ...)

Arguments

x

a frontierEstimates object; the output of a call to estimateEffects().

band

which type of band to display. Can be "none" for no band, "confidence" for confidence bands, or "model-dependence" for model dependence bands (only if requested in the original call to estimateEffects()). The default is "model-dependence" when model dependence bounds were requested in the original call to estimateEffects() and "confidence" otherwise.

band.col

the desired color of the band, if present. Passed to the fill argument of ggplot2::geom_ribbon().

band.border.col

the desired color of the band borders if present. Passed to the color argument of ggplot2::geom_ribbon().

band.alpha

the desired transparency of the band, if present. Passed to the alpha argument of ggplot2::geom_ribbon().

...

further arguments passed to ggplot2::geom_line() to control the appearance of the line (e.g., color, size, etc.).

Details

plot.frontierEstimates() uses ggplot2::geom_line() and ggplot2::geom_ribbon() to display the effect estimates along the frontier. The plot has two x-axes: the bottom one indicates the number of units dropped, and the top one indicates the number of units remaining. Which group this "number of units" refers to depends on the QOI and metric supplied to the original call to makeFrontier(). The y-axis indicates the effect estimate at the given sample size.

An additional point and error bar will be displayed corresponding to the effect and bounds estimated in the unadjusted sample (prior to matching or dropping units).

Value

A ggplot object that can be further manipulated using ggplot2 functionality.

Examples

#See examples at help("estimateEffects").