SplineBasis: Creating 'SplineBasis' Objects.

View source: R/orthogonalBsplines.R

SplineBasisR Documentation

Creating SplineBasis Objects.

Description

The function to create SplineBasis and OrthogonalSplineBasis Objects

Usage

	SplineBasis(knots, order=4, keep.duplicates=FALSE)
	OrthogonalSplineBasis(knots, ...)
	OBasis(...)

Arguments

knots

The full set of knots used to define the basis functions.

order

Order of the spline fit.(degree= order-1)

keep.duplicates

Should duplicate interior knots that could cause computation problem be kept or removed. Defaults to false, which removes duplicate knots with a warning if duplicate interior knots are found.

...

Other arguments either ignored or passed onto other functions.

Details

SplineBasis produces an object representing the basis functions used in spline fitting. Provides a compact easily evaluated representation of the functions. Produces a class of object SplineBasis. OrthogonalSplineBasis is a shortcut to obtain a set of orthogonalized basis functions from the knots. OBasis is an alias for OrthogonalSplineBasis. Both provide an object of class OrthogonalSplineBasis. The class OrthogonalSplineBasis inherits directly from SplineBasis meaning all functions that apply to SplineBasis functions also apply to the orthogonalized version.

Value

Object of class SplineBasis or OrthogonalSplineBasis

References

General matrix representations for B-splines Kaihuai, Qin, The Visual Computer 2000 16:177–186

See Also

SplineBasis, spline, orthogonalsplinebasis-package

Examples

knots<-c(0,0,0,0:10,10,10,10)
plot(SplineBasis(knots))
obase<-OBasis(knots)
plot(obase)
dim(obase)[2] #number of functions
evaluate(obase, 1:10-.5)

orthogonalsplinebasis documentation built on May 24, 2022, 1:05 a.m.