I'm using R to plot some graphs for visually inspecting the normality of variables that will go into a linear regression model. Except for a histogram and a QQ plot, what other graphics could I use?

  • 2
    $\begingroup$ PP plot. The classic paper Wilk, M.B., & Gnanadesikan, R. 1968. Probability plotting methods for the analysis of data. Biometrika 55: 1-17 which introduced the terminology of QQ and PP plots is very much worth reading. The QQ plot remains the best in my opinion. $\endgroup$ – Nick Cox Dec 4 '13 at 8:37
  • 1
    $\begingroup$ See also stats.stackexchange.com/questions/64026/… $\endgroup$ – Nick Cox Dec 4 '13 at 10:36
  • 2
    $\begingroup$ Also density plots and box plots can be useful to highlight different aspects of violations of normality. As an aside, variables that go into a regression do not have to be normally distributed; the residuals from the model do. $\endgroup$ – Peter Flom Dec 4 '13 at 10:54
  • 2
    $\begingroup$ Histograms are okay, with appropriate levels of caution. I'd second the recommendation of the QQ plot as probably the best choice. = $\endgroup$ – Glen_b -Reinstate Monica Dec 4 '13 at 11:02
  • $\begingroup$ And please do not forget that most regression models do not assume normality of any of their variables, so why are you doing this in the first place? $\endgroup$ – whuber Feb 23 '14 at 16:43

As suggested by @Peter Flom a third option could be the boxplot.

The picture below shows two distributions (with n=1000):

  1. On the left column a Normal distribution with $\mu = 4$ and $\sigma = 1$ and,
  2. On the right a two parameter Weibull distribution, with shape = 1.5 and scale = 2.

The first line shows the histograms and the second line illustrates a quantile-quantile plot (with the normal distribution as the baseline for comparison). The third line contains the boxplot plots). Note how the Weibull presents non symmetric whiskers in the boxplot.

enter image description here

Here is the R code to reproduce the picture



hist   (x,prob=T, main="Normal ~ (4,1)  "                  , ylab="Density"          , xlab="Quantile"          , ylim=c(0,0.6), xlim=c(0,8))
hist   (y,prob=T, main="Weibull ~ (1.5,2)"                 , ylab="Density"          , xlab="Quantile"          , ylim=c(0,0.6), xlim=c(0,8))
qqplot (x,x     , main="Normal ~ (4,1) x Normal ~ (4,1)"   , ylab="Normal quantiles" , xlab="Normal quantiles"                              )
qqplot (x,y     , main="Normal ~ (4,1) x Weibull ~ (1.5,2)", ylab="Weibull quantiles", xlab="Normal ~ quantiles"                            )
boxplot(x       , main="Normal ~ (4,1)  "                  , ylab="Quantile"         , xlab=""                  , ylim=c(0,8               ))
boxplot(y       , main="Weibull ~ (1.5,2)"                 , ylab="Quantile"         , xlab=""                  , ylim=c(0,8               ))  

Lastly, just to emphasize the hint provided by Peter, regression assumption of normality is observed over the residuals' distribution and not the predictors'.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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