R/spline.bbase.R

Defines functions spline.bbase

spline.bbase <-
function(knots, X., BDEG.) {
	dx <- diff(knots)[1]
	P <- outer(X., knots, tpower, BDEG.)
	n <- dim(P)[2]
	D <- diff(diag(n), diff = BDEG. + 1)/(gamma(BDEG. + 1)*dx^BDEG.)
	B <- (-1) ^ (BDEG. + 1) * P %*% t(D)
	B
}

Try the SpATS package in your browser

Any scripts or data that you put into this service are public.

SpATS documentation built on Oct. 16, 2024, 9:06 a.m.