Home  >>  Archives  >>  Volume 12 Number 3  >>  sg151_2

The Stata Journal
Volume 12 Number 3: pp. 479-504



Subscribe to the Stata Journal
cover

Sensible parameters for univariate and multivariate splines

Roger B. Newson
National Heart and Lung Institute
Imperial College London
London, UK
[email protected]
Abstract.  The package bspline, downloadable from Statistical Software Components, now has three commands. The first, bspline, generates a basis of Schoenberg B-splines. The second, frencurv, generates a basis of reference splines whose parameters in the regression model are simply values of the spline at reference points on the X axis. The recent addition, flexcurv, is an easy-to-use version of frencurv that generates reference splines with automatically generated, sensibly spaced knots. frencurv and flexcurv now have the additional option of generating an incomplete basis of reference splines, with the reference spline for a baseline reference point omitted or set to 0. This incomplete basis can be completed by adding the standard unit vector to the design matrix and can then be used to estimate differences between values of the spline at the remaining reference points and the value of the spline at the baseline reference point. Reference splines therefore model continuous factor variables as indicator variables (or “dummies”) model discrete factor variables. The method can be extended in a similar way to define factor-product bases, allowing the user to estimate factor-combination means, subset-specific effects, or even factor interactions involving multiple continuous or discrete factors.
Terms of use     View this article (PDF)

View all articles by this author: Roger B. Newson

View all articles with these keywords: bspline, flexcurv, frencurv, polynomial, spline, B-spline, interpolation, linear, quadratic, cubic, multivariate, factor, interaction

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS