# How do I satisfy the nonlinearity of my regression function with this plot image?

I have some problem with the transformation of my data. This is my project in my regression class, and we're asked to run our data and satisfy all the possible assumptions, until we can chose a model. Which we're going to use for prediction. Now, I tried all possible transformations, but It doesn't give me any solution to make this scatter plot linear. Or is there any test that I can use to check the linearity of my data? Than using informal method of looking to the plot only.

Well, Here's the plot image of Residual versus the Fitted Values.

I tried log-transforming, modifying my regression function, and etc. But still it doesn't make linear.

Though, I check the constancy of my error variance using the Breusch-Pagan test, which concludes it to be constant.

But, I don't know any other test for checking Non-linearity.

I really appreciate your help.

## migrated from stackoverflow.comMar 18 '12 at 3:21

This question came from our site for professional and enthusiast programmers.

• What are you trying to do with this data? For many purposes, you need not have linearity, so it's not clear why you want to force the relationship to be linear. Please edit your question to make the purpose of the analysis clearer. – guest Mar 18 '12 at 3:34
• My purpose is to chose a model, that satisfy all the assumptions of residual analysis. That's my project in my regression class, and we're asked to test our data and satisfy all the assumptions, until we can have our chosen-model, which we're going to use for the prediction then. – Al-Ahmadgaid Asaad Mar 18 '12 at 3:42
• Did you try a Box-Cox transform ? – Stéphane Laurent Mar 18 '12 at 7:27
• Alstat; Please add a 'homework' tag to your question. For prediction, ask your instructor about using cross-validation to pick a predictive model, then actually validating it in some independent data. – guest Mar 18 '12 at 7:40
• Hi there and welcome to the site. You look like you might have hetereoscedasticity in your residuals - the residuals appear to be getting larger with increasing fitted values. I assume your fitted values are the logs, have you tried a stronger transform, e.g. as suggested by boxcox() from the MASS package, as suggested by @StéphaneLaurent above? – Michelle Mar 18 '12 at 9:40