Um, yes. ANY regression computation takes into account the relation between the variables.
So backslash, regress, lscov, lsqr, fit,etc. All take that into account.
I think your issue is that you don't understand how regression works. For that, there are entire courses that are taught.
Yes, it is true that x and x^3 are correlated with each other. Note that mathematical linear independence is not the same as saying the two variables are not related. That is, it is true that no linear combination of a*x + b*x^3 is zero EXCEPT for the case where a=b=0. So x and x^3 provide different information to the problem. Yet at the same time, it is not true that x and x^3 are orthogonal. There is essentially some overlap in what they do.
Yes, it is also true that there may be numerical issues. But that relationship between the variables is factored in when the regression is done. I really cannot say much more without specifics, or without writing a complete text on linear regression myself. Better that you read one, since many have been published. Perhaps a classic like that by Draper and Smith would be a good choice.
1 Comment
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/353753-regression-with-dependent-independent-variables#comment_479262
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/353753-regression-with-dependent-independent-variables#comment_479262
Sign in to comment.