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?