Could anyone tell me why I am getting different results from
R weighted least squares and manual solution by matrix operation?
Specifically, I am trying to manually solve $\mathbf W \mathbf A\mathbf x=\mathbf W \mathbf b$, where $\mathbf W$ is the diagonal matrix on weights, $\mathbf A$ is the data matrix, $\mathbf b$ is the response vector.
I am trying to compare the results with the
lm function using the