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

Description Usage Arguments References Examples

View source: R/parallelPlot.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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'
             )

Example output

Loading MatchingFrontier Version 1.0.0

## Citation ##
King, Gary, Christopher Lucas, and Richard Nielsen. "MatchingFrontier:
Automated Matching for Causal Inference." R package version 1.0.0.

## BibTeX ##
@manual{MatchingFrontier,
	title={MatchingFrontier: Automated Matching for Causal Inference},
	author={King, Gary and Lucas, Christopher and Nielsen, Richard},
	year={2014},
	note={R package version 1.0.0}
}

Calculating Mahalanobis distances...
Calculating theoretical frontier...
Calculating information for plotting the frontier...

MatchingFrontier documentation built on May 2, 2019, 4:16 a.m.