2
$\begingroup$

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.

enter image description here

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.

$\endgroup$

migrated from stackoverflow.com Mar 18 '12 at 3:21

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

  • 1
    $\begingroup$ 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. $\endgroup$ – guest Mar 18 '12 at 3:34
  • $\begingroup$ 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. $\endgroup$ – Al-Ahmadgaid Asaad Mar 18 '12 at 3:42
  • 2
    $\begingroup$ Did you try a Box-Cox transform ? $\endgroup$ – Stéphane Laurent Mar 18 '12 at 7:27
  • $\begingroup$ 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. $\endgroup$ – guest Mar 18 '12 at 7:40
  • $\begingroup$ 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? $\endgroup$ – Michelle Mar 18 '12 at 9:40

Your Answer

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

Browse other questions tagged or ask your own question.