plot.gains: Plotting Gains Table Objects

Description Usage Arguments See Also Examples

View source: R/plot.gains.R

Description

Plot method for objects of class gains. These plots are sometimes called lift charts.

Usage

1
2
3
4
5
6
7
## S3 method for class 'gains'
plot(x, y=NULL, xlab="Depth of File", ylab="Mean Response", 
    type="b", col=c("red3","bisque4","blue4"), pch=c(1,1,1), lty=c(1,1,1),
    legend=c(
    "Mean Response","Cumulative Mean Response","Mean Predicted Response"),
    ylim=c(min(c(x$mean.resp,x$mean.prediction)),
    max(c(x$mean.resp,x$mean.prediction))), main="Gains Table Plot", ...)

Arguments

x

an object of class gains.

y

included for compatability with the plot generic but is not used.

xlab

a title for the x axis. See title.

ylab

a title for the y axis. See title.

type

what type of plot should be drawn. The default is "b" for points and lines.

col

vector of length 3 specifying the colors for the series of mean response rates, cumulative mean response rates, and mean predicted response rates, respectively.

pch

vector of length 3 specifying the plotting characters for the series of mean response rates, cumulative mean response rates, and mean predicted response rates, respectively.

lty

vector of length 3 specifying the line types for the series of mean response rates, cumulative mean response rates, and mean predicted response rates, respectively.

legend

character or expression vector of length 3 specifying the legend descriptions for the series of mean response rates, cumulative mean response rates, and mean predicted response rates, respectively.

ylim

the y limits of the plot. See plot.window.

main

an overall title for the plot. See title.

...

additional arguments to plot

.

See Also

gains, plot.

Examples

1
2
3
4
5
data(ciaScores)
## Not run: plot(with(subset(ciaScores,train==0), 
      gains(actual=CellPhonesPP, predicted=PredOLS, optimal=TRUE)),
      main="Test Gains Table Plot")
## End(Not run)

gains documentation built on May 2, 2019, 3:25 a.m.

Related to plot.gains in gains...