This question is closed. Reopen it to edit or answer.
How to find the multiple linear regression coefficients for this case?
1 view (last 30 days)
I have three matrices each of 3420 rows and 28 columns, namely, y, x1, and x2. I want to build a multiple linear regression such that:
I wanted to know the multiple linear regression coefficients and each of them will be arrays of 3420 rows and 1 column. How to do it?
I tried the following code:
n = 3420;
b = zeros(n,4);
X(i,4)=[ones([28,1]) x1(i,:)' x2(i,:)' (x1(i,:).*x2(i,:))'];
Kindly help me with the same.