Plot covariate means along the frontier.

Share:

Description

plotMeans() plots means along the frontier.

Usage

1
2
3
4
5
6
7
8
plotMeans(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
9
data(lalonde)

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

plotMeans(my.frontier)