Estimate b when $\hat{y}$ and x are given

159 Views Asked by At

Using linear algebra for solving this linear regression problem, I've got the equation $\hat{y}$ = xb. Finding the projection $\hat{y}$ of y onto the columns of the matrix X containing the observations is the strategy.

Find b (the coefficients for the least squares equation) when $\hat{y}$ and x are given for a sample of observations.

By keeping the following in mind the solution should be found:

Estimate for linear regression

Now my question is how to go on about it and where to start. Should QR factorization be used, the relation p = X$\hat{y}$ (where p is the projection) or this relation below which I guess we can't use cause matrix X is not square (A = X in our case):

Projection equation using transpose of X