The plot
method for cobs
objects.
If there was lambda
selection, it provides two plots by default.
# S3 method for 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") , ...)
object of class cobs
.
integer vector specifying which plots should be drawn;
logical indicating if the “effective
dimensionality” \(k\) should also be shown. Only applicable when
which
contains 1.
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
).
line width and point size for the 2nd plot
(i.e. which == 2
).
y-axis limits, see axis
, with a smart default.
axis annotation; see also axis
.
a vector of length 2, specifying a sub title for each
plot (according to which
).
further arguments passed and to internal
plot
methods.
Martin Maechler
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
).
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))
Run the code above in your browser using DataLab