# Working with residuals of regression

So the background is that the I collected yield data for past 5-6 decades and location from where I collected yield data had high yielding varieties introduced over time. I am looking at the relationship between yield and rainfall but this introduction of HYV might affect the true impact of monsoon on yield and therefore I am detrending the data to remove the effect of HYV.

I did a linear regression of yield against time in R:

mdl1 <- lm(yield ~ time, data=data)


and then removed the linear trend by taking the residuals of the above regression:

yield.res <- resid(mdl1)


Now I am using these residuals for my subsequent analysis. For example, the relationship between yield and rainfall is:

 mdl2 <- lm(yield.res ~ rain, data=data)


In this case, do my yield.res have to be normally distributed before I do this regression? If yes, what sort of transformation do I need to use? Since yield.res consists of both negative and positive numbers, I am slightly confused how to go about it.

• Why would you do such a thing? – Glen_b -Reinstate Monica Aug 4 '14 at 1:42
• I have edited the question to give a background as to why I am doing this – user53020 Aug 5 '14 at 9:19
• Why not use multiple regression? – Glen_b -Reinstate Monica Aug 5 '14 at 10:35

This is a very odd way to try to analyze your data. Do you really believe that the relationship between yield and time is strictly linear? Do the results support that? Why not include both time and rain in a single multiple regression model? Moreover, since it isn't save to assume the relationship with time is strictly linear, you can use a spline function of time like so:
library(splines)

To answer your explicit question, regression methods do not assume the marginal distribution of $Y$ (in this case, yield.res) is normally distributed (see here: What if residuals are normally distributed, but y is not). Instead, they assume that the residuals (more accurately the errors of the data generating process) are normally distributed.