plot.AcrossTic {AcrossTic}R Documentation

Plot function for simple AcrossTic objects

Description

Plot an object of class AcrossTic (see details). Currently intended for two-class objects built with two-dimensional Xs.

Usage

## S3 method for class 'AcrossTic'
 plot(x, X.values, y, grp.cols = c(2, 4), grp.pch = c(16, 17), ...)

Arguments

x

AcrossTic object, normally the output from rRegMatch.

X.values

Matrix of data. If not spplied the function looks in x.

y

Vector with two distinct values giving the label for each observation.

grp.cols

Colors for the two groups. Default: 2 and 4.

grp.pch

Plotting points for the two groups. Default: 16 and 17.

...

Other arguments, passed on to plot.

Details

This demonstrates a graph of the matching of the rRegMatch type. Points are plotted in 2d; then within-group matches are shown with dotted lines and between-group pairings with solid ones. If X has more than two columns, the first two are used, with a warning. If Y is supplied it will be used; if not, it will be extracted from x; if no y is found, an error is issued. Y must have exactly two distinct values.

Value

No output. Side effect: a plot is produced.

Author(s)

David Ruth and Sam Buttrey

Examples

set.seed (123)
X <- matrix (rnorm (100), 50, 2) # Create data...
y <- rep (c (0, 1), each=25) # ...and class membership
plot (rRegMatch (X, r = 3, y = y))

[Package AcrossTic version 1.0-3 Index]