plot.cobs {cobs} | R Documentation |
Plot Method for COBS Objects
Description
The plot
method for cobs
objects.
If there was lambda
selection, it provides two plots by default.
Usage
## 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.cutoff = 100), collapse="\n"),
subtit= c("choosing lambda", "data & spline curve") , ...)
Arguments
x |
object of class |
which |
integer vector specifying which plots should be drawn; |
show.k |
logical indicating if the “effective
dimensionality” |
col , l.col , k.col |
colors for plotting; |
lwd , cex |
line width and point size for the 2nd plot
(i.e. |
ylim |
y-axis limits, see |
xlab , ylab , main |
axis annotation; see also |
subtit |
a vector of length 2, specifying a sub title for each
plot (according to |
... |
further arguments passed and to internal
|
Details
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
).
Author(s)
Martin Maechler
See Also
There are several other methods for COBS objects, see, e.g.
summary.cobs
or predict.cobs
.
cobs
for examples.
Examples
example(cobs)
plot(Sbs)
plot(fitted(Sbs), resid(Sbs),
main = "Tukey-Anscombe plot for cobs()",
sub = deparse(Sbs$call))