cobs
objects.## S3 method for class 'cobs':
predict(object,
z, minz = knots[1], maxz = knots[nknots], nz = 100,
interval = c("none", "confidence", "simultaneous", "both"),
level = 0.95, ...)
cobs
.nz
grid
points between minz
and maxz
. Note that now z
may lie outside of the knots intez
is not specified; defaults to
min(x)
or the first knot if knots
are given.minz
; defaults to max(x)
or the
last knot if knots
are given.z
if that is not given;
defaults to 100.predict.cobs
produces aa matrix of
predictions and bounds if interval
is set (not "none").
The columns are named z
, fit
, further cb.lo
and
cb.up
for the simultaneous
confidence band, and ci.lo
and
ci.up
the pointwise confidence
intervals according to
specified level
.cobs
the model fitting function.example(cobs) # continuing :
(pRbs <- predict(Rbs))
str(pSbs <- predict(Sbs, xx, interval = "both"))
plot(x,y, xlim = range(xx), ylim = range(y, pSbs[,2], finite = TRUE),
main = "COBS Median smoothing spline, automatical lambda")
lines(pSbs, col = "red")
lines(spline(x,f.true), col = "gray40")
matlines(pSbs[,1], pSbs[,-(1:2)],
col= rep(c("green","blue"),c(2,2)), lty=2)
Run the code above in your browser using DataLab