plot.gains {gains} | R Documentation |
Plotting Gains Table Objects
Description
Plot method for objects of class gains
. These plots are sometimes called lift charts.
Usage
## 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 |
y |
included for compatability with the |
xlab |
a title for the x axis. See |
ylab |
a title for the y axis. See |
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 |
main |
an overall title for the plot. See |
... |
additional arguments to |
.
See Also
gains
, plot
.
Examples
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)