search for: bsplinematrix

Displaying 1 result from an estimated 1 matches for "bsplinematrix".

2006 Dec 13
2
caching frequently used values
...the basis functions would be evaluated (not necessarily the nodes). Something like this: bsplinegrid <- list(nodes=1:8,order=4,grid=seq(2,5,by=.2)) I need the design matrix (computed by splineDesign) for various derivatives (not necessarily known in advance), to be calculated by the function bsplinematrix <- function(bsplinegrid, deriv=0) { x <- bsplinegrid$grid Matrix(splineDesign(bslinegrid$knots, x, ord=basis$order, derivs = rep(deriv,length(x)))) } However, I don't want to call splineDesign all the time. A smart way would be storing the calculated matrices i...