Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: Polynomial Fitting and RD Design

From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: Polynomial Fitting and RD Design
Date   Thu, 1 Sep 2011 10:06:59 +0200

--- On Wed, Aug 31, 2011 at 9:54 PM, Patrick Button wrote:
>>> I need to run a regression that fits a 4th degree polynomial separately
>>> for points of the running variable, x, below 0.5 and above 0.5. The
>>> regression includes a dummy variable for if x >= 0.5 or not as well. If
>>> there is a discontinuity at 0.5, then this is picked up in the coefficient
>>> on that dummy variable.
>>> *Left Side Polynomial
>>> gen xa = (1-D)*x
>>> gen x2a = (1-D)*x^2

--- On Thu, Sep 1, 2011 at 8:37 AM, Nick Cox wrote:
> Even if you can get this to work as intended, look at the sizes of
> those coefficients! The resultant curve may look about right, but this
> is a dubious thing to do numerically and statistically. I

The numerical problems can be alleviated by using orthogonal
polynomials, see -help orthog-. This is just a different way of
representing that 4th degree polynomial that makes it a lot easier for
computers to deal with.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index