Multiple regression with multiple variations
1 view (last 30 days)
Show older comments
I have the example data as show in bellow,
x1 = [288 298 308 318 328 338 283 293 303 313 323 333 283 293 303 313 323 333];
x2 = [17.42 17.4217.42 17.42 17.42 17.42 17.95 17.95 17.95 17.95 17.95 17.95 17.13 17.13 17.13 17.13 17.13 17.13];
x3 = [1.2111 1.2111 1.2111 1.2111 1.2111 1.2111 1.2684 1.2684 1.2684 1.2684 1.2684 1.2684 0.6207 0.6207 0.6207 0.6207 0.6207 0.6207];
y = [6.785 6.777 6.770 6.762 6.754 6.746 6.793 6.785 6.777 6.768 6.760 6.751 6.786 6.777 6.769 6.760 6.752 6.743];
and, I have the equation for predicting as show in the following,
y = a + bx2 + cx3 + (d + e*x2 + f*x3) / x1) ....(1)
where, a, b, c, d, e, and f are the constant.
How to write the code in matlab for optimizing the constants of Eq. (1)?
1 Comment
Matt J
on 3 Feb 2020
Greeting All
If I have the data and I want to get the equation for the Multiple regression with MATLAB code is that possiable?
Thanks
Samir
Accepted Answer
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!