Skip to main content
2 of 4
deleted 5 characters in body; edited title
Nick Cox
  • 59.5k
  • 8
  • 136
  • 212

Box-Cox transformation for residuals in R

I have residuals for my model. They are simply measured-predicted. However, I notice that they do not follow a normal distribution. I want to make my residuals distribution normal so that I can obtain confidence intervals that are representative of the distribution. I have tried doing the following:

    >library(MASS)
    >boxcox(residuals)
    Error: $ operator is invalid for atomic vectors

However, I get an error. After looking at the Box-Cox more closely I have to input a formula or fitted object. If I input the measured vs. predicted fit, will the Box-Cox transformation normalize the residuals? Is there another way to implement the Box-Cox transformation so that it only needs to look at the distribution of the data?

GK89
  • 264
  • 5
  • 14