# Multiple regression and OLS. How to choose the best "non-linear" specification?

Let's say I have to make a multiple regression like:

$Y_i = \beta_0 + \beta_1 x_i + \beta_2 w_i + ... +\beta_3 z_i + \epsilon_i$

Then I run a Ramsey RESET test upon it and discover that my linear specification is not good. What is the best way to cope with non-linearity? I know that I could specify a log-log model, a log-lin model, or add some powers on variables, or try interaction effects.

What I don't understand by reading Verbeek and Stock - Watson is: how to choose the best non-linear specification? Should I try all of them and then take a look at Akaike's Index (or Bayesian or Hannan Quinn)? Or is there a way to understand which specification is the best?

Sorry if I wasn't clear, English is not my native language.

• Definitely do NOT use AIC to select an optimal transformation of the dependent variable (which I think you were suggesting in the log-linear model). Likelihoods are not comparable between two models where the response has been transformed in different ways, so the AIC is not meaningful. Feb 7 '12 at 0:44
• Of course you're right! My big mistake! So, would $R^2$ be a better indicator? Feb 7 '12 at 10:27

I've become rather enamoured of late with generalized additive modelling to handle non-linearity. The gam() function from the mgcv package for R makes things very easy as it incorporates automated generalized cross-validation to avoid overfitting.
I've never heard of gretl but a parametric version of the excellent gam suggestion by Mike is to use additive regressions such as restricted cubic splines (natural splines). R and Stata make this easy to do. With regression splines (piecewise polynomials) you can model almost any relationship that is fairly smooth, and you still get all the advantages of ordinary models (confidence limits, predictions, formulas, etc.). A good default strategy is to figure what complexity the sample size and signal:noise ratio will support, translate that to the number of knots (join points) in the spline functions, and to fit those functions without later trying to simplify the model. In R that would like like
require(rms)