plot.cobs {cobs} | R Documentation |
The plot
method for cobs
objects.
If there was lambda
selection, it provides two plots by default.
## S3 method for class 'cobs': plot(x, which = if(x$select.lambda) 1:2 else 2, show.k = TRUE, col = par("col"), l.col = c("red","pink"), k.col = gray(c(0.6, 0.8)), lwd = 2, cex = 0.4, ylim = NULL, xlab = deparse(x$call[[2]]), ylab = deparse(x$call[[3]]), main = paste(deparse(x$call, width.cut = 100), collapse="\n"), subtit= c("choosing lambda", "data & spline curve") , ...)
x |
object of class cobs . |
which |
integer vector specifying which plots should be drawn; |
show.k |
logical indicating if the “effective
dimensionality” k should also be shown. Only applicable when
which contains 1. |
col, l.col, k.col |
colors for plotting; k.col only
applies when show.k is true in the first plot (which
== 1 ) where l.col[2] and k.col[2] are only used as well,
for denoting “doubtful” points; col is only used for
the 2nd plot (which == 2 ). |
lwd, cex |
line width and point size for the 2nd plot
(i.e. which == 2 ). |
ylim |
y-axis limits, see axis , with a smart default. |
xlab, ylab, main |
axis annotation; see also axis . |
subtit |
a vector of length 2, specifying a sub title for each
plot (according to which ). |
... |
further arguments passed and to internal
plot methods. |
plot(.)
produces two side-by-side plots in case there was a
search for the optimal lambda(which = 1:2
), and only the
(second) data plus spline curve plot otherwise (which = 2
).
Martin Maechler
There are several other methods for COBS objects, see, e.g.
summary.cobs
or predict.cobs
.
cobs
for examples.
example(cobs) plot(Sbs) plot(fitted(Sbs), resid(Sbs), main = "Tukey-Anscombe plot for cobs()", sub = deparse(Sbs$call))