earth
models by plotting them.## S3 method for class 'earth.models':
plot(x = stop("no 'x' arg"), which = c(1:2),
caption = "", jitter = 0,
col.grsq = discrete.plot.cols(length(x)), lty.grsq = 1,
col.line = 0, lty.rsq = 5,
col.vline = col.grsq, lty.vline = 3,
col.npreds = 0, lty.npreds = 2, col.sel.grid = 0,
ylim = c(0,1),
col.legend = 1, cex.legend = NULL, legend.pos = NULL, legend.text = NULL,
col.cum = NULL, do.par = TRUE,
main = "Model Comparison", cex.main = 1.2, ...)
1:2
, meaning both."string"
string
""
(default) no caption
NULL
generate a caption from the $call
component of the earth
objects.0
, meaning no jitter.
A typical useful value is 0.01.
For the col arguments below, 0 means do not plot the corresponding graph element.
You cadiscrete.plot.cols(length(x))
which is vector
of distinguishable colors, the first three of which are also distinguishable on
a monochrome printer.
You can examine the colors 1
.0
, meaning no RSq plot.5
.col.vline
.
Default is col.grsq
.3
.0
, meaning no "number of predictors" plot.
The special value NULL
means borrow col.grsq
(or col.line<
2
.0
, no grid.
Try something like "lightgray"
, "linen"
, or "seashell"
.c(min,max)
specifying min and max
values on the y axis of the RSq/GRSq plot.
Default is c(0,1)
.
The special value min=-1
means the minimum y axis value
is the smallest GRSq or RSq, excllegend.pos=NA
for no legend.NULL
, meaning position the legend automatically.
Use NA for no legend.
Specify c(x,y)
in user coordinates,
or use "topleft"
etc. as explained in
NULL
(default) means generate the legend text automatically
from call$formula
.NULL
(default) means borrow col.grsq
(or col.line
if col.grsq
is NULL
).
The following settings are relapar()
for global settings as appropriate.
Default is TRUE
,
which sets mfrow, mar=c(4,4,2,3), mgp=c(1.6,0.6,0), cex=0.7
.
Set to FALSE
if you want to append figures to an existing plot.NULL
, meaning generate figure headings automatically.1.2
.
Used only if do.par
is TRUE
(default).earth
,
plot.earth
,
plot.earth.models
,
plotd
,
plotmo
data(ozone1)
a1 <- earth(O3 ~ ., data = ozone1, degree = 2)
a2 <- earth(O3 ~ .-wind, data = ozone1, degree = 2)
a3 <- earth(O3 ~ .-humidity, data = ozone1, degree = 2)
plot.earth.models(list(a1,a2,a3), ylim=c(.65,.85))
Run the code above in your browser using DataLab