Plot an earth object
Plot an earth
object.
By default the plot shows model selection, cumulative distribution
of the residuals, residuals versus fitted values, and the residual QQ plot.
This function calls plotres
internally.
The first arguments are identical to plotres
.
## S3 method for class 'earth' plot(x = stop("no 'x' argument"), # the following are identical to plotres arguments which = 1:4, info = FALSE, versus = 1, standardize = FALSE, delever = FALSE, level = 0, id.n = 3, labels.id = NULL, smooth.col = 2, grid.col = 0, jitter = 0, do.par = NULL, caption = NULL, trace = 0, npoints = 3000, center = TRUE, type = NULL, nresponse = NA, # the following are earth specific col.cv = "lightblue", col.grsq = 1, col.rsq = 2, col.infold.rsq = 0, col.mean.infold.rsq = 0, col.mean.oof.rsq = "palevioletred", col.npreds = if(is.null(object$cv.oof.rsq.tab)) 1 else 0, col.oof.labs = 0, col.oof.rsq = "mistyrose2", col.oof.vline = col.mean.oof.rsq, col.pch.cv.rsq = 0, col.pch.max.oof.rsq = 0, col.vline = col.grsq, col.vseg = 0, lty.grsq = 1, lty.npreds = 2, lty.rsq = 5, lty.vline = "12", legend.pos = NULL, ...) earth_plotmodsel( # for internal use by plotres x, col.rsq = 2, col.grsq = 1, col.infold.rsq = 0, col.mean.infold.rsq = 0, col.mean.oof.rsq = "palevioletred", col.npreds = NULL, col.oof.labs = 0, col.oof.rsq = "mistyrose2", col.oof.vline = col.mean.oof.rsq, col.pch.cv.rsq = 0, col.pch.max.oof.rsq = 0, col.vline = col.grsq, col.vseg = 0, lty.grsq = 1, lty.npreds = 2, lty.rsq = 5, lty.vline = "12", legend.pos=NULL, add = FALSE, jitter = 0, max.nterms = length(object$rss.per.subset), max.npreds=max(1,get.nused.preds.per.subset(object$dirs,object$prune.terms)), ...)
x |
An |
which,info,versus |
These arguments are identical to |
standardize,delever,level |
. |
id.n,labels.id,smooth.col |
. |
grid.col,jitter |
. |
do.par,caption,trace |
. |
npoints,center |
. |
type,nresponse |
. |
col.cv |
Default |
col.grsq |
Default |
col.rsq |
Default |
col.infold.rsq |
Color of in-fold RSq lines for each fold in the Model Selection plot.
Applies only if |
col.mean.infold.rsq |
Color of mean in-fold RSq for each number of terms in the Model Selection plot.
Default is |
col.mean.oof.rsq |
Default |
col.npreds |
Color
of the "number of predictors" plot in the Model Selection plot.
The default displays the number of predictors unless the |
col.oof.labs |
Color of fold number labels on the |
col.oof.rsq |
Color of out-of-fold RSq lines for each fold in the Model Selection plot.
Applies only if |
col.oof.vline |
Color of vertical line at the maximum |
col.pch.cv.rsq |
Color of point plotted on the |
col.pch.max.oof.rsq |
Color of point plotted on the |
col.vline |
Color of the vertical line at selected model in the Model Selection plot.
Default is |
col.vseg |
Default is |
lty.grsq |
Line type of GRSq line in the Model Selection plot.
Default is |
lty.npreds |
Line type of the "number of predictors" plot in the Model Selection plot.
Default is |
lty.rsq |
Line type of RSq line in the Model Selection plot.
Default is |
lty.vline |
Line type of vertical line at selected model in the Model Selection plot.
Default is |
legend.pos |
Position of the legend in the Model Selection plot.
Default is |
add, max.nterms, max.npreds |
|
... |
Please see The |
For details on interpreting the graphs,
please see the earth
package vignettes
“Notes on the earth package”
and
“Variance models in earth”.
Note that cross-validation data will not be displayed unless
both nfold
and keepxy
were used in the original call to
earth
.
To remove the Number of used predictors
from the Model Selection
graph (to reduce clutter), use col.npreds=0
.
earth_plotmodsel
is provided for use by plotres
.
data(ozone1) earth.mod <- earth(O3 ~ ., data = ozone1, degree = 2) plot(earth.mod)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.