predict.dierckx: Predict method for object of class 'dierckx'.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Evaluate the spline for a desired set of x values.

Usage

1
2
  ## S3 method for class 'dierckx'
predict(object, newdata, ...)

Arguments

object

An object of class 'dierckx'.

newdata

an optional numeric vector at which 'dierckx' spline predictions are desired.

...

Ignored.

Details

if newdata is provided, evaluate the spline at newdata and return the predictions. Else, return fitted(object).

Value

A numeric vector giving spline predictions for 'newdata' if provided or for each distinct level of 'x' in the spline fit.

Author(s)

Sundar Dorai-Raj and Spencer Graves

References

Dierckx, P. (1993) Curve and Surface Fitting with Splines, Oxford Science Publications.

See Also

curfit

Examples

1
2
3
4
5
6
x <- 0:24
y <- c(1.0,1.0,1.4,1.1,1.0,1.0,4.0,9.0,13.0,
       13.4,12.8,13.1,13.0,14.0,13.0,13.5,
       10.0,2.0,3.0,2.5,2.5,2.5,3.0,4.0,3.5)
fitSS0 <- curfit(x, y, s=0)
predict(fitSS0, seq(2, 3, length=5))

DierckxSpline documentation built on May 2, 2019, 6:30 p.m.