Plot method for objects of class gains. These plots are sometimes called lift charts.
Usage
# S3 method for 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.
# NOT RUN {data(ciaScores)
# }# NOT RUN {plot(with(subset(ciaScores,train==0),
gains(actual=CellPhonesPP, predicted=PredOLS, optimal=TRUE)),
main="Test Gains Table Plot")
# }