[R] Closed form for regression splines

Stephen A Roberts Steve.Roberts at manchester.ac.uk
Mon Dec 5 14:36:29 CET 2005


Greetings,

I have a model fitted using bs() and need to be able to write down a closed form for the spline function to enable the use of the fitted model outside R. Does anyone know a simple way of extracting the piecewise cubics from the coefficients and knots? As far as I know they are defined by recurrence relationships, but the R implementation is buried in C code, and I guess in non-trivial to invert. I know about predict.bs() within R, but I want the full piecewise cubic.

Steve.

  Dr Steve Roberts 
  steve.roberts at manchester.ac.uk

Senior Lecturer in Medical Statistics,
Biostatistics Group,
University of Manchester,




More information about the R-help mailing list