plotPrunedMeans: Plot covariate means for the removed observations along the...

Description Usage Arguments Details References Examples

View source: R/plotPrunedMeans.R

Description

plotMeans() plots means for the removed observations along the frontier.

Usage

1
2
3
4
5
6
7
8
plotPrunedMeans(frontier.object,
          xlab = 'Number of Observations Pruned',
          main = 'Means Plot',
          xlim = c(1,max(frontier.object$frontier$Xs)),
          ylim = c(0, 1),
          cols = rainbow(length(frontier.object$match.on)),
          diff.in.means = FALSE,
          ...)

Arguments

frontier.object

An object generated by makeFrontier()

xlab

The label for the x-axis. Defaults to 'Number of Observations Pruned'.

main

The main label. Defaults to Means Plot'.

xlim

The x-axis limits. Defaults to the range of the frontier.

ylim

The y-axis limits. Defaults to (0, 1).

cols

The line colors. Defaults to the rainbow palette.

diff.in.means

If TRUE, means are the difference in means between treated and control groups. If FALSE (the default), means are the covariate means pooling across treated and control.

...

Additional arguments to be passed to plot.

Details

plotMeans() wraps plot and uses ... to pass additional arguments to the base plot() function.

References

King, Gary, Christopher Lucas, and Richard Nielsen. "The Balance-Sample Size Frontier in Matching Methods for Causal Inference." (2015).

Examples

1
2
3
4
5
6
7
8
data(lalonde)

match.on <- colnames(lalonde)[!(colnames(lalonde) %in% c('re78', 'treat'))]
my.frontier <- makeFrontier(dataset = lalonde,
                            treatment = 'treat',
                            match.on = match.on)

plotPrunedMeans(my.frontier)

ChristopherLucas/MatchingFrontier documentation built on June 10, 2020, 6:01 p.m.