X and y for test problem: [,1] [,2] [1,] 1e+00 1e+00 [2,] 1e-07 0e+00 [3,] 0e+00 1e-07 [1] 0.0 -1.1 1.0 Coefficients found using lm function: Call: lm(formula = y ~ X - 1) Residuals: 1 2 3 5e-09 -5e-02 -5e-02 Coefficients: Estimate Std. Error t value Pr(>|t|) X1 -10500000 500000 -21 0.030292 * X2 10500000 500000 21 0.030292 * --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: 0.07071067811865001 on 1 degrees of freedom Multiple R-Squared: 0.9977375565611, Adjusted R-squared: 0.9932126696833 F-statistic: 220.5 on 2 and 1 DF, p-value: 0.04756514941545 Matrix to find Cholesky decomposition of: [,1] [,2] [1,] 1.00000000000001 1.00000000000000 [2,] 1.00000000000000 1.00000000000001 Cholesky decomposition: [,1] [,2] [1,] 1.000000000000005 9.999999999999951e-01 [2,] 0.000000000000000 1.405772735484928e-07 Coefficients found using Cholesky decomposition: [1] -10626471.03087416 10626471.03087415 Householder decomposition: $X [,1] [,2] [1,] -1.000000000000005 -9.999999999999953e-01 [2,] 0.000000000000000 1.414213562373092e-07 [3,] 0.000000000000000 0.000000000000000e+00 $y [1] 1.099999999999995e-07 1.484924240491745e+00 -7.071067811865395e-02 Coefficients found using Householder decomposition: $coef [1] -10500000.00000000 10499999.99999999 $res.std.dev [1] 0.07071067811865464 $std.errs [1] 500000.0000000007 500000.0000000004