Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"Ariel Linden, DrPH" <ariel.linden@gmail.com> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
re: Re: st: Not Quite Quadratic Regression |

Date |
Sun, 5 Aug 2012 15:45:15 -0400 |

I agree with David's general assessment of the situation here. I would point you to two possible options to model your data here: -mfp- and -mvrs- are user written programs by Patrick Royston (both available through ssc). The first program fits multivariable fractional polynomial models, and the second fits multivariable regression spline models. Ariel Date: Sat, 4 Aug 2012 08:05:34 -0400 From: David Hoaglin <dchoaglin@gmail.com> Subject: Re: st: Not Quite Quadratic Regression If theory predicts a u-shaped relation, it may be useful to transform y, but it probably will not make sense to transform x. Does theory provide any guidance on the scale for y or the scale for x? Common transformations include log and square root. I suppose theory does not predict the functional form of the relation. Since the relation is u-shaped, you may want to center x at the value corresponding to the bottom of the U (either based on theory or based on the data). You may be able to use lowess to trace a fairly smooth summary curve through your noisy scatterplot. That may suggest a functional form. Many nonlinear relations are not well approximated by a quadratic. When the amount of data is large enough, I have sometimes been able to let the data guide the choice of functional form by replacing x by a piecewise-constant function of x with fairly narrow intervals. In your model, the piecewise-constant function would replace ax + bx^2. This approach works when the model contains predictors other than x. It may lead you to a suitable (linear) spline. David Hoaglin On Sat, Aug 4, 2012 at 6:56 AM, A. Shaul <3c5171@gmail.com> wrote: > Hello Statalisters, > > Theory predict an u-shaped relation between two variables, y and x. > When I perform a quadratic linear regression with a model like > > y = ax + bx^2 + constant + error, > > the coefficients a and b are not significant. However, if I change the > exponent to something less than 2, e.g. 1.5, I obtain significance. In > other words a model like > > y = ax + bx^1.5 + constant + error, > > yields significant estimates of a and b. The curvature is still quite > marked using the exponent of 1.5. I can even use an exponent of 1.1 > and obtain significance and a nice shape. But I don't think I can > simply choose the exponent based on whatever yields significance. Or > can I? This is my question. > > I have tried to run a non-linear regression where the exponent was a > free parameter. Although it tend to yield an exponent around 1 to 2, > everything turns out highly insignificant. If I plug the estimated > exponent into an OLS model, like the ones above, I get significance. I > have also tried to use splines as well as a piecewise constant > formulation. Again the results are less than ideal (although I get the > same overall picture). > > The non-linearity is rather apparant in a scatterplot (although > extremely noisy), and the problem shows up when controlling for other > covariates where a simple graphical/nonparametric approach is > unfeasible. * * 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/

- Prev by Date:
**st: Summary stats table in a particular format** - Next by Date:
**RE: st: Warning convergence not achieved** - Previous by thread:
**Re: st: Not Quite Quadratic Regression** - Next by thread:
**st: Creating quantile portfolios based on multiple values** - Index(es):