Questions tagged [qr]

9 questions
3
votes
0 answers

Why is my QR decomposition updating code numerically off?

I apologize if this is the wrong place for this question; there are a number of potential points of failure each of which suggest either Math StackExchange or StackOverflow or here, but since the application is statistics, I think this might be the…
cgmil
  • 647
  • 4
  • 12
3
votes
1 answer

Generalised least squares using QR decomposition

I know that the calculation of parameter values of a standard OLS can be made more efficient using a QR decomposition; i.e. if $X=QR$ and we are using the model $Y=X\beta+\epsilon$; Then it is true that $R\beta=Q^TY$ and therefore we can make the…
JDoe2
  • 576
  • 3
  • 14
3
votes
0 answers

Fast way to obtain SSR (Sum of Squares residuals) from QR in least square model?

I am using a linear regression, yet the only output I need is the Sum of Squared Residuals (SSR), I don't care about the coefficients. (Context is a non-linear LS, which is linear given an extra parameter, so I am running a grid search of…
Matifou
  • 2,699
  • 14
  • 25
2
votes
1 answer

QR decomposition computational efficiency

I am struggling to find a reference for this: In terms of big Oh notation does anyone know of any expressions for the computational time taken by commonly used algorithms for QR decompositions?
JDoe2
  • 576
  • 3
  • 14
2
votes
0 answers

Calculating sandwich estimator

Considering design matrix $X \in \mathbb{R}^{n\times p}$ $(n>p)$ and response $y\in \mathbb{R}^{n}$. The sandwich estimator can be calculated directly using $$(X^TX)^{-1}X^T diag(r^2) X (X^TX)^{-1}$$ where $r$ is the residuals. The sandwich…
2
votes
0 answers

Orthogonal polynomial expansion and QR decomposition

Here is the source code of R poly function (boundary checking are removed). Why we can use QR to build polynomial expansion, which is very different from orthogonal polynomial tutorials like this one. Could anyone help me to understand the…
Haitao Du
  • 32,885
  • 17
  • 118
  • 213
1
vote
0 answers

Order of eigenvalues when using different methods

I'm doing PCA in a covariance matrix where each column and row represents tenors of the yield curve. I have coded the Jacobi rotation method and I also have a QR algorithm based on numpy.linalg.qr in order to be able to calculate the eigenvalues and…
sonarclick
  • 11
  • 1
0
votes
0 answers

Does Column ordering matter in QR decomposition?

I am trying to understand if the ordering of columns matters in QR decompsoition. In general it seems that column ordering won't matter. I guess for SVD or any matrix factorization the way columns and rows are ordered has no effect, i.e. we can…
mourinho
  • 143
  • 3
0
votes
2 answers

Relationship between X and its projection matrix

Suppose $Q_{1}$ is an $n$ x $p $ matrix (derived from the QR Decomposition of X) whose columns provide an orthonormal basis for the subspace ${\chi}$ of $\mathbb{R}^{n}$ spanned by the columns of an $n$ x $p$ matrix $X$ = $(x_1,...,x_p)$. The hat…