plot.earth {earth} | R Documentation |
Plot an earth
object.
The plot shows model selection, cumulative distribution
of the residuals, residuals versus fitted values, and the residual QQ plot.
## S3 method for class 'earth' plot(x = stop("no 'x' arg"), which = 1:4, nresponse = 1, caption = if(do.par) NULL else "", col.grsq = 1, lty.grsq = 1, col.rsq = "lightblue", lty.rsq = 5, col.vline = col.grsq, lty.vline = 3, col.npreds = if(is.null(x$cv.oof.rsq.tab)) 1 else 0, lty.npreds = 2, col.mean.oof.rsq = "palevioletred", col.oof.rsq = "mistyrose2", col.oof.vline = col.mean.oof.rsq, col.oof.labs = 0, col.pch.max.oof.rsq = 0, col.pch.cv.rsq = 0, col.mean.infold.rsq = 0, col.infold.rsq = 0, col.sel.grid = 0, ylim = c(-1,-1), col.legend = 1, cex.legend = NULL, legend.pos = NULL, col.cum.grid = "lightgray", cum.grid = "percentages", id.n = 3, labels.id = rownames(residuals(x, warn=FALSE)), col.residuals = 1, col.loess = col.rsq, nresiduals = 1000, col.qq = col.rsq, do.par = TRUE, main = NULL, pch = 1, rlim = NA, col.grid = NA, ...)
x |
An |
which |
Which plots to plot. Default is |
nresponse |
Specify which column of the response to plot if the model has multiple responses.
Default is 1.
This argument does not affect the Model Selection plot which is always across all responses. |
caption |
Overall caption. The default value is
|
col.grsq |
Color of GRSq line (in the Model Selection plot).
Default 1.
Use |
lty.grsq |
Line type of GRSq line (in the Model Selection plot). Default 1. |
col.rsq |
Color of RSq line (in the Model Selection plot).
Default is |
lty.rsq |
Line type of RSq line (in the Model Selection plot). Default 5. |
col.vline |
Color of the vertical line at selected model (in the Model Selection plot).
Default is |
lty.vline |
Line type of vertical line at selected model (in the Model Selection plot).
Default is |
col.npreds |
Color of the "number of predictors" plot (in the Model Selection plot).
The default displays the number of predictors unless the |
lty.npreds |
Line type of the "number of predictors" plot (in the Model Selection plot).
Default is |
col.mean.oof.rsq |
Color of mean out-of-fold RSq for each number of terms (in the Model Selection plot).
Applies only if |
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.oof.labs |
Color of fold number labels on the |
col.pch.max.oof.rsq |
Color of point plotted on the |
col.pch.cv.rsq |
Color of point plotted on the |
col.mean.infold.rsq |
Color of mean in-fold RSq for each number of terms (in the Model Selection plot).
Default |
col.infold.rsq |
Color of in-fold RSq lines for each fold (in the Model Selection plot).
Applies only if |
col.sel.grid |
Color of grid lines in the Model Selection graph.
Default is |
ylim |
Two element vector |
col.legend |
Legend color.
Default is |
cex.legend |
Legend cex. Default is NULL, meaning choose automatically. |
legend.pos |
Legend position.
Default |
col.cum.grid |
Color of grid lines in the Cumulative Distribution plot.
Default is |
cum.grid |
Specify grid type in the Cumulative Distribution plot.
Values are: |
id.n |
The largest |
labels.id |
Residual names. Default is |
col.loess |
Color of |
col.residuals |
Color of the residual points in the Residuals and QQ plots.
Default is |
nresiduals |
Maximum number of residuals to plot.
Use |
col.qq |
Color of QQ line (in the QQ plot).
Default is |
do.par |
Call |
main |
Title of each plot.
Default is |
pch |
Plot character in the QQ and Residuals plot. Default is |
rlim |
Deprecated. Please use |
col.grid |
Deprecated. Please use |
... |
Extra arguments passed to plotting functions. |
For details on interpreting the graphs,
please see the earth
package vignette
“Notes on the earth
package”.
Note that cross-validation data will not be displayed unless
both nfold
and keepxy
were used in the original call to
earth
.
earth
,
plot.earth.models
,
plotd
,
plotmo
data(ozone1) a <- earth(O3 ~ ., data = ozone1, degree = 2) plot(a)