I am using Matlab to estimate a regression model with ordinary least squares (OLS).
The model is y = xB
, where x
is a very sparse matrix with dimension 500000 x 2500
. I'm using a QR decomposition:
[C,R] = qr(x,y,0)
and then estimating b
with
b = R\C
My question is whether I need to be worried about numerical errors here. Is there some additional iteration I need to do? Should I check the condition number of R
, or R'R
? Any guidance would be much appreciated.