How likely is it that I can use simple linear regression to predict?

4 次查看(过去 30 天)
This is a simple linear fit between height as independent variable and density as dependent variable. I have used curve fitting tool. I want to know if I can trust that I can use simple linear regression. Goodness of fit shows that the model fits very good. The residual plot shows high residuals on the highest and lowest y values, but all the points do still lie near the prediction line. How can I find out if its likely the models is linear or not.
Linear model Poly1: f(x) = p1*x + p2
Coefficients (with 95% confidence bounds):
p1 = -0.0001176 (-0.0001208, -0.0001145)
p2 = 1.255 (1.252, 1.258)
Goodness of fit:
SSE: 4.342e-05
R-square: 0.998
Adjusted R-square: 0.9978
RMSE: 0.001827

回答(1 个)

John D'Errico
John D'Errico 2018-10-14
编辑:John D'Errico 2018-10-14
No real world data truly follows a perfectly linear model. Even where there is an essentially linear domain, there are always limits, where at the ends perhaps, things start to deviate more from linearity. Very likely here this is what you are seeing.
The patterned residuals suggest to me that your data pushes the limits just a bit. Those larger residuals at each end are sufficient to bias the line just a bit. Or, perhaps, there is just more noise at the ends of the curve. This is also not uncommon behavior, where you have a non-uniform noise variance.
So, yes, your model is very likely approximately linear. Is it perfectly so? Of course not. If I wanted to ask the question "Is it NOT linear", I might next fit a quadratic model. Then look if the quadratic coefficient you obtain has bounds that contain zero. A simple question to ask, so TRY IT! If those confidence bounds allow the possibility that the quadratic coefficient is zero, then I would say that your data is not sufficient to show the model is NOT linear. What you cannot do is use what you have done so far to prove that your data does truly follow a linear model.
However, since we do not have your data, nor have you shown the results of that higher order fit, then all I can do is suggest that you do the test I have suggested.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by