understanding Linear regression model equation after simplifying.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Muhammad Haris Siddiqui
am 17 Nov. 2021
Beantwortet: Jeff Miller
am 17 Nov. 2021
Hello,
I have run Linear regression on 2 independent variables (b,c) and one dependent variable(a) as shown below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/803849/image.png)
the model equation is simple as ==> y = intercept + x1*b + x2*c
However, When I simplyfy the model using step as shown below
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/803854/image.png)
I could'nt be able to understand the model equation. ==> y~ 1+ x1*x2.
how would I make the equation?
Any help would be appreciated.
Thanking you in anticipation.
0 Kommentare
Akzeptierte Antwort
Jeff Miller
am 17 Nov. 2021
I think the notation y~ 1+ x1*x2 is shorthand for y~ 1*b0+ b1*x1 + b2*x2 + b3*x1*x2. The four b values are the four estimates in the table. The notation is a bit confusing because the interaction term x1:x2 is the numerical product x1*x2. In the model notation, x1*x2 refers to all of the possible combinations of the terms separated by *'s, i.e. x1, x2, and x1:x2.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Polynomials finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!