Usage
plotd(object, hist = FALSE, type="response", thresh = .5, xlim = NULL,
main=NULL, xlab="Predicted Value", ylab=if(hist) "Count" else "Density",
lty = 1, col = c("grey60", 1, "lightblue", "brown", "pink", 2, 3, 4),
borders = NULL, zero.line=FALSE,
legend = TRUE, legend.names = NULL, legend.pos = NULL,
legend.cex = .8, legend.bg = "white", legend.extra = FALSE,
vline.col = 0, vline.thresh = thresh, vline.lty = 1,
...)
Arguments
object
model object.
Typically a model which predicts a class or a class probability.
hist
FALSE
(default) to call density
internally
TRUE
to call hist
internallytype
type parameter passed on to predict
.
Default is "response"
.
See the predict method for your object to see other values;
for example see p
thresh
Passed to predict.earth
(only used if type="class"
).
Default is .5
.
Also used as a default for the vline.thresh
argument (see below). xlim
limits of the x axis.
The default NULL
means determine these limits automatically,
else specify c(xmin,xmax)
.
main
main graph title. Values:
"string"
string
""
no title
NULL
(default) generate a title from the $call
component of the model object.
xlab
x axis label.
Default is "Predicted Value"
.
ylab
y axis label.
Default is if(hist) "Count" else "Density"
.
lty
per class line types for the plotted lines.
Default is 1 for all lines.
col
per class graph colors.
The first few colors of the default are intended to be
easily distinguishable on both color displays and monochrome printers.
borders
per class border colors for hist
plot.
Only used if hist=TRUE
.
The default NULL
means use the values in the col
argument. zero.line
parameter for plot.density
.
Only used if hist=FALSE
.
Default is FALSE
. legend
TRUE
(default) to draw a legend
legend.names
class names in legend.
The default NULL
means determine these automatically.
legend.pos
position of the legend.
The default NULL
means try to position the legend automatically,
else specify c(x,y)
.
legend.cex
cex
for legend
.
Default is .8
.
Make this smaller for a smaller legend.legend.bg
bg
color for legend
.
Default is "white"
.legend.extra
show number of occurrences of each class.
Default is FALSE
.
vline.col
color of vertical line.
Default is 0, meaning no vertical line.
The vertical line is intended to indicate class separation.
vline.thresh
x position of vertical line. Default is thresh
.
vline.lty
line type of vertical line.
Default is 1.
...
extra arguments passed to density
or hist
.
Arguments for hist
which affect only plotting
are not allowed