Learn R Programming

MatchingFrontier (version 1.0.0)

parallelPlot: Create a parallel plot for a specified point on the frontier.

Description

parallelPlot() creates a parallel plot for a specified point on the frontier. Wraps parcoord() from MASS.

Usage

parallelPlot(frontier.object, N, variables, treated.col = 'grey', control.col = 'black')

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.
variables
The variables to be included in the parallel plot.
treated.col
The color of the lines corresponding to observations assigned to the treatment. Grey by default.
control.col
The color of the lines corresponding to observations assigned to the control. Black by default.

References

Venables, William N., and Brian D. Ripley. Modern applied statistics with S. Springer, 2002.

Examples

Run this code
data(lalonde)

match.on <- colnames(lalonde)[!(colnames(lalonde) %in% c('re78', 'treat'))]
mahal.frontier <- makeFrontier(dataset = lalonde,
                            treatment = 'treat',
                            outcome = 're78',
                            match.on = match.on)
parallelPlot(mahal.frontier,
             N = 300,
             variables = c('age',
             're74',
             're75',
             'black'),
             treated.col = 'grey',
             control.col = 'blue'
             )

Run the code above in your browser using DataLab