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

From |
Kit Baum <[email protected]> |

To |
[email protected] |

Subject |
st: Re: -mkspline- reference |

Date |
Wed, 6 May 2009 10:55:54 -0400 |

<>

----------------------------- webuse lutkepohl,clear g t1 = 0 g t2 = 0 g a1 = tin(1960q1,1974q4) g a2 = tin(1975q1,1982q4) replace t1 = qtr if tin(1960q1,1974q4) replace t2 = qtr if tin(1975q1,1982q4) reg income a1 a2 t1 t2, nocons hascons predict double ihat, xb tsline ihat if tin(1960q1,1974q4) || tsline ihat if tin(1975q1,1982q4) // 1982q4 is t = 60; apply continuity constraint def 1 a1 + t1*60 = a2 + t2*60 cnsreg income a1 a2 t1 t2, nocons c(1) predict double ihat2, xb tsline ihat2 if tin(1960q1,1974q4) || tsline ihat2 if tin(1975q1,1982q4) --------------------------------

Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html

An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html On May 6, 2009, at 02:33 , statalist-digest wrote:

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.

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE: Re: -mkspline- reference***From:*"Lachenbruch, Peter" <[email protected]>

- Prev by Date:
**RE: st: RE: -mkspline- reference** - Next by Date:
**Re: st: Jackknife and standard error in NEGBIN model** - Previous by thread:
**RE: Re: st: AW: Question about Heckman Test** - Next by thread:
**st: RE: Re: -mkspline- reference** - Index(es):

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