Generate a data set that is on the balance - sample size frontier.

Share:

Description

generateDataset() allows the user to export a data set that sits on the frontier.

Usage

1
generateDataset(frontier.object, N)

Arguments

frontier.object

An object generated by makeFrontier().

N

The number of observations left in the exported data set. If the user selects an undefined point, generateDataset returns a dataset from the nearest defined point on the frontier.

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)
n <- 300 # Identify the point from which to select the data
matched.data <- generateDataset(my.frontier, N = n)