Timeline for When to transform predictor variables when doing multiple regression?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 20, 2011 at 19:28 | comment | added | Frank Harrell | Just fitting splines is a much more direct approach to the problem and requires fewer decisions. | |
Nov 14, 2011 at 0:15 | comment | added | gung - Reinstate Monica | @matt if you just want to know which of the available transformation is best, in practice, most people will just try a couple and pick the one that looks best. Transformations like x^2 and ln(x) are part of what's called the Box-Cox family of transformations; you can solve for an exact power (e.g., x^1.9) but I don't know anyone who does. Mostly, your goal is to get the functional form right (resids don't systematically deviate) without heteroscedasticity. As for normality, the Gauss-Markov theorem says you don't really need it, although you ought to bootstrap in that case. | |
Nov 14, 2011 at 0:11 | comment | added | Matt | Sorry, still getting the hang of posting on here. Please forgive. To expound on my last comment: A recent example I went through in a text had the resulting model y~x1 + log(x2), and the only note about the transformation is "it was apparent that x2 was well suited for a logarithmic transformation." I'm trying to improve my sense of when transformations are applicable. Is it enough to just look at y~x_i plots and proceed as we would in the single-predictor case? What else should I consider? | |
Nov 14, 2011 at 0:08 | comment | added | Frank Harrell | Peter- regression splines are not much more complex than quadratics. Who knows how to interpret the coefficient of age when age^2 is in the model anyway? And I don't see where centering helps. I interpret spline fits with graphs, which my collaborators like. Matt a transformation is almost always needed. It's just a question of adequacy of sample size for estimating enough parameters to fit nonlinear effects. Regression splines directly estimate the transformations, and lead to appropriate confidence intervals that are penalized for "data looks". Residuals involve an indirect approach. | |
Nov 13, 2011 at 23:58 | comment | added | Matt | Thank you all for the input, I greatly appreciate it. I think you're currently giving me too much credit. My question is actually centered around what to look for in individual predictors to know when/if a transformation is applicable. For example, if I have a strictly additive model, with 3 predictors, how would I go about determining an appropriate transformation? In the multiple predictors case, are we generally striving for the same principles we look for in simple linear regression? (i.e. favorable residuals vs. predicted plot and qqplot of residuals). | |
Nov 13, 2011 at 23:54 | comment | added | Peter Flom | @Frank I often like restricted cubic splines. The only negative is one of interpretation, which is a little tricky and often turns my clients off. Adding a polynomial term (after centering) seems to be more interpretable | |
Nov 13, 2011 at 22:13 | comment | added | Frank Harrell | I would encourage a more direct approach: use regression splines to model the effects of predictors so as to (1) not assume linearity and (2) estimate all transformations simultaneously. This is akin to quadratic regression - adding a square term for all predictors. With restricted cubic splines, for example, one adds one or more nonlinear basis functions to the model for each predictor not known to operate linearly. | |
Nov 13, 2011 at 21:17 | history | answered | gung - Reinstate Monica | CC BY-SA 3.0 |