Questions tagged [qr-decomposition]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
202 views

How to sample efficiently from an inverse Wishart distribution?

I am trying to understand the code from pybasicbayes, which defines the following function to sample from an inverse Wishart: ...
seeker_after_truth's user avatar
1 vote
1 answer
48 views

QR Iteration convergence

Assuming $\mathbf x_1$ and $\mathbf x_2$ are eigenvectors of matrix $\mathbf A \in \mathbb{R}^{2\times 2}$, there is $$\left(\mathbf I-\mathbf x_1\mathbf x_1^\top\right)\mathbf A\left(\mathbf I-\...
Aaron's user avatar
  • 11
1 vote
0 answers
66 views

Quadratic regression with orthogonal polynomials vs. raw polynomials with QR decomposition

I'm using rstanarm to estimate random slopes for second-order polynomial coefficients. My model has the basic form: ...
sjs_999's user avatar
  • 11
1 vote
0 answers
38 views

Getting least squares calculations from QR decomposition

I am a recent enthusiast into linear modelling and working on a function in R that implements common calculations from lm in R, to better understand how it works. ...
tesla john's user avatar
1 vote
1 answer
740 views

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 ...
sonarclick's user avatar
3 votes
0 answers
77 views

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 ...
cgmil's user avatar
  • 1,313
4 votes
2 answers
4k views

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's user avatar
  • 670
3 votes
1 answer
875 views

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 ...
JDoe2's user avatar
  • 670
2 votes
0 answers
162 views

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)^{-...
cccfran's user avatar
  • 75
3 votes
0 answers
668 views

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 ...
Matifou's user avatar
  • 3,073
0 votes
0 answers
370 views

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 ...
mourinho's user avatar
  • 143
0 votes
2 answers
275 views

Relationship between X and its projection matrix [closed]

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 $...
roc11111111's user avatar
2 votes
0 answers
939 views

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, ...
Haitao Du's user avatar
  • 36.6k