[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: RE: -mkspline- reference

From   "Nick Cox" <>
To   <>
Subject   RE: st: RE: -mkspline- reference
Date   Wed, 6 May 2009 09:50:45 +0100

Kieran's reference was entirely pertinent. -mkspline, cubic- calculates restricted cubic splines, as from Stata 10. 


Jacob Wegelin

Thanks.  Actually, -mkspline- computes *linear* splines. For instance,
the following code:

. mkspline  Age1  44  Age2 = Age

. regress Y Age1 Age2

fits a continuous, piecewise linear model of E(Y|Age) for which the
slope is permitted to change abruptly at Age=44.

Thus I am looking for a reference that specifically explains what
algorithm and formulas are implemented in -mkspline-, and perhaps also
discusses uses of linear splines and gives examples where they are
used to good effect.

On Tue, May 5, 2009 at 7:05 PM, Kieran McCaul <> 

> Frank Harrell's book "Regression Modelling Strategies" has a chapter on
> restricted cubic splines.

Jacob Wegelin

> Can anyone point me to a reference for  -mkspline- ?
> I mean, ideally, a published article or book that describes in
> software-independent terms (so that statisticians who do not know
> Stata will understand) exactly the algorithm and/or formula that the
> Stata programmers implemented when they wrote -mkspline-.
> I apologize if the answer is in [R] Stata Reference Manual. I do not
> own that book.

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index