Hoping to get some insight into normality of residuals vs the "best" fit of the model.

After running a simple linear regression and checking normality of the residuals, I logged my outcome variable and this significantly improved the normality of residuals. See below: enter image description here

After graphing with geom_smooth(), I noted that perhaps the relationship was not linear but rather a second-order polynomial . enter image description here

I compared the models with AIC and poly^2 was considered a better fit.

                df      AIC
PT~Age          3    496.7536
PT~poly(Age,2)  4    490.3009

My problem comes in when checking the residuals of the model of second order polynomial. I can see they are not normally distributed when compared to a simple linear regression. enter image description here

My question is, what is more important here? Do I go with the simple linear regression or the second-order polynomial (which visually seems to fit my data better)? I should also add that on a physiological level this does make sense with respect to where the inflection is starting at around 50.

  • $\begingroup$ Related: stats.stackexchange.com/questions/232465/… $\endgroup$
    – Galen
    Commented May 23 at 3:30
  • $\begingroup$ While useful the difference in AIC doesn't quite answer my question as I am asking about the assumptions of the model vs "best" fit. $\endgroup$
    – DaniH
    Commented May 23 at 3:44
  • $\begingroup$ Comments are not intended to be answers; that's what answers are for. $\endgroup$
    – Galen
    Commented May 23 at 3:46
  • 2
    $\begingroup$ If I understand this correctly, curvature in the relationship is visible and plausible. The problem is that a quadratic shape doesn't match what I see, or at least a different story, which is an approximately flat relationship at first with a decline from about age 55. (Given my own age, I am rather alarmed at the latter.) You don't have an enormous sample size and in any case need not to jump straight here to "So, it's quadratic!". I see the fuss about AIC and BIC as a utter side-issue compared with the question of choosing a functional form. Something like a spline approach may help. $\endgroup$
    – Nick Cox
    Commented May 24 at 8:33
  • 1
    $\begingroup$ I agree with @NickCox that a spline approach is probably better than a polynomial. Reading this the first time, I mistook the plotted function as the fitted function, and here I think polynomials do worse with distributions that have flat distributions for a large part of the scatterplot. $\endgroup$ Commented May 24 at 9:03

1 Answer 1


First, I will note that the strict adherence to the assumption of normality for the residuals in regression is at best contentious (see commentary on that here). I recently read a paper that showed through various simulations that OLS regression typically performs very well even in the face of extreme departures from normality. I think what is more important is that the residuals serve as a guide for discovering if there are important parts of your model that you may have missed. It seems you have already to a degree examined the core mathematical part that is important, which is the linearity of the distribution. To me it is clear that your data takes on a quadratic curve and so the more appropriate fit is the polynomial equation. Your AIC value does look improved to a small degree, but I think that is less important here.

Personally, I'm not a fan of log transformation unless it either 1) helps with interpretation or 2) helps spread out an extremely skewed distribution. I often see people apply logs to any distribution which departs from the normal distribution. That to me seems completely unnecessary and at times comes at the cost of performance/interpretation. In your case, I don't think the log transformation is necessary. A polynomial suits the job just fine. The only thing the log seems to do in this case is slightly improve the error variance, but I would wager that this doesn't matter for your case.

Probably the most important issue, as discussed in the simulation paper above, is that you don't have a non-normal distribution with extreme outliers. This seems to not be an issue in your case based off the residuals, but even then robust methods would still do well with a polynomial fit.

You've also noted that the inflection point in the curve makes sense. This indicates to me that you have clear theoretical explanations for the fit that your logged model doesn't have.

  • $\begingroup$ I have seen many examples where assuming normality led to a disaster, because it leads to inefficient coefficient estimates when there is strong non-normality, especially strong asymmetry of the distribution. But at the heart of the OP’s problems is the great difficulty of choosing a “correct” transformation of Y before doing the analysis. That’s why I always use transformation-independent semiparametric ordinal models for continuous Y, for which resources are here. $\endgroup$ Commented May 23 at 11:40
  • 1
    $\begingroup$ I should probably highlight the "strict adherence" part in my first sentence to note that this can of course be a concern depending on the context (e.g. fitting binary outcomes, where non-normal residuals denote an obvious problem). My main issue is when people simply transform their data to obscurity because the residuals do not end up looking perfectly normal...they rarely ever are in practice (at least from my experience). In a case like OP's, it is hardly dangerous to fit the model as-is. I wish I could say with more confidence how ordinal models overcome this, but I will read that link :) $\endgroup$ Commented May 23 at 13:46
  • 2
    $\begingroup$ Thanks Shawn. More info is here where I try to make a major point that ordinal models allow for any readouts of interest, both relative measures such as odds ratios and absolute measures such as means and quantiles and group differences in means and quantiles, all on the original scale without assuming a distribution. One just has to be care to request an ordinal regression to compute the mean only if Y is interval-scaled or almost so. $\endgroup$ Commented May 23 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.