Questions tagged [qr-decomposition]
The qr-decomposition tag has no summary.
15 questions
1 vote
0 answers
55 views
INDSCAL as a special case of CANDELINC
Here is my attempt to show that INDSCAL as a special case of CANDELINC. I am using the following paper as my reference for definitions. Kolda, Tamara G., and Brett W. Bader. "Tensor ...
12 votes
1 answer
464 views
Transforming Hessian to original parameters after centering and QR-transforming X
I'm starting to more routinely mean-center and QR-rotate design matrices $X$ when doing maximum likelihood estimation (MLE) or Bayesian posterior sampling. This helps with convergence and quickens ...
2 votes
1 answer
652 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: ...
1 vote
1 answer
82 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-\...
1 vote
0 answers
101 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: ...
1 vote
0 answers
65 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. ...
1 vote
1 answer
917 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 ...
3 votes
0 answers
115 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 ...
5 votes
2 answers
7k 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?
3 votes
1 answer
1k 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 ...
2 votes
0 answers
207 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)^{-...
3 votes
0 answers
765 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 ...
0 votes
0 answers
462 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 ...
0 votes
2 answers
322 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 $...
3 votes
1 answer
1k 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, ...