TABLE OF CONTENTS
splineUtils/evalBinte [ Functions ]
NAME
evalBinte --- compute the integrals of each spline basis function
FUNCTION
The set of spline basis functions are defined entirely by the set of knots and the order of the spline. This function computes the integral of each of those basis functions, which is used for normalizing the frailty basis splines and for computing cumulative integrals for the hazard.
SYNOPSIS
1440 evalBinte <- function(knots, ord)
INPUTS
knots a set of spline knots as produced by makeknots ord integer order of the spline
OUTPUTS
a vector containing the integral over each spline basis function
SOURCE
1443 { 1444 K <- sum(knots > attr(knots, "b")[1] & knots < attr(knots, "b")[2]) 1445 Binte <- rep(0, K + ord) 1446 for(j in 1:(K + ord)){ 1447 Binte[j] <- (knots[ki(knots, j)] - knots[ki(knots, j - ord)]) / ord 1448 } 1449 return(Binte) 1450 }