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.rsq = "lightblue", col.loess = col.rsq,
col.qq = col.rsq, col.grid = "grey",
col.vline = "grey", lty.vline = 3,
col.legend = 1, col.npreds = 1,
nresiduals = 1000, cum.grid = "percentages", rlim = c(-1,-1),
id.n = 3, labels.id = rownames(residuals(x, warn=FALSE)),
legend.pos = NULL, do.par = TRUE,
main = NULL, pch = 1, ...)
1:4
, meaning all.
1) model selection (GRSq plot)
2) cumulative distribution of absolute values of residuals
3) residuals versus fitted values
4) QQ plot of residualsnrespons
if(do.par) NULL else ""
. Values are:
"string"
string
""
no caption
NULL
generate a caption from the $call
component of the earth
obj"lightblue"
.loess
line in residuals plot.
Default is col.rsq
.
Generating the loess line occasionally causes warnings such as
"Warning: pseudoinverse used".
To get rid of these warnincol.rsq
."grey"
."grey"
.3
.1
, meaning draw a legend.
Use 0
for no legend.1
.
Use 0
for no "number of predictors" plot.-1
for all.
Default is 1000
(not all to reduce over-plotting).
A systematic sample of size nresiduals
is taken but
the largest few residuals are always include"none"
no grid on cumulative distribution plot
"grid"
add grid
"percentages"
(default) add grid and percentage labels to quantile lines.c(min,max)
specifying min and max
values on the y axis of the RSq plot.
Default is c(-1,-1)
. Special value min=-1
means the minimum y axis value
is the smallest GRSq or RSq value e
3
.rownames(residuals(x))
.NULL
(default) means position legend automatically.
Else specify c(x,y)
in user coordinates,
or use "topleft"
etc. as explained in legend
.
The following separ()
for global settings as appropriate.
Default is TRUE
,
which sets mfrow, mar=c(4,4,2,1), 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
.earth
,
plot.earth.models
,
plotd
,
plotmo
data(ozone1)
a <- earth(O3 ~ ., data = ozone1, degree = 2)
plot(a)
Run the code above in your browser using DataLab