plot.frontierEstimates.Rd
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, ...)
a frontierEstimates
object; the output of a call to estimateEffects()
.
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.
the desired color of the band, if present. Passed to the fill
argument of ggplot2::geom_ribbon()
.
the desired color of the band borders if present. Passed to the color
argument of ggplot2::geom_ribbon()
.
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.).
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).
A ggplot
object that can be further manipulated using ggplot2 functionality.
#See examples at help("estimateEffects").