1
$\begingroup$

I am doing multiple linear regression. I was directed to this question on how to solve MLR as a sequence of simple linear regressions, Question on how to normalize regression coefficient and I understand this result.

However I have also been told that Moore-Penrose Pseudo Inverse can be used for MLR. In doing so I see that it does indeed give the least squares result for a set of linear equations. However I can't figure out how to use it for linear regression if I have a y intercept that is non-zero.

The Moore-Penrose Equation that I understand, which is ( (A' * A)^-1 * A' ) * y seems to force a regression through the origin. Is there a way to use it and then calculate an intercept ?

$\endgroup$
2
$\begingroup$

The intercept term can be viewed as the coefficient of an independent variable that is always one. Therefore, adding a column of ones to the matrix $A$ will result in the intercept term surfacing at the corresponding position.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.