Hi there, Please help me this out.> m[,1] [,2] [1,] 1.1 1.0 [2,] 1.0 1.1> chol2inv(m)[,1] [,2] [1,] 1.5094597 -0.7513148 [2,] -0.7513148 0.8264463>CT -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"cwu" <cwu at fcu.edu.tw> writes:> Hi there, > > Please help me this out. > > > m > [,1] [,2] > [1,] 1.1 1.0 > [2,] 1.0 1.1 > > chol2inv(m) > [,1] [,2] > [1,] 1.5094597 -0.7513148 > [2,] -0.7513148 0.8264463What's the trouble? Are you aware that me is expected to contain a Choleski factor in the upper triangle?> m[,1] [,2] [1,] 1.1 1.0 [2,] 0.0 1.1> t(m)%*%m[,1] [,2] [1,] 1.21 1.10 [2,] 1.10 2.21> chol(t(m)%*%m)[,1] [,2] [1,] 1.1 1.0 [2,] 0.0 1.1> solve(t(m)%*%m)[,1] [,2] [1,] 1.5094597 -0.7513148 [2,] -0.7513148 0.8264463 -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, Mar 21, 2000 at 08:32:35PM +0800, cwu wrote:> Hi there, > > Please help me this out. > > > m > [,1] [,2] > [1,] 1.1 1.0 > [2,] 1.0 1.1 > > chol2inv(m) > [,1] [,2] > [1,] 1.5094597 -0.7513148 > [2,] -0.7513148 0.8264463chol2inv wants the choleski decompostion of m as its argument.> m[,1] [,2] [1,] 1.1 1.0 [2,] 1.0 1.1> mc <- chol(m) > chol2inv(mc)[,1] [,2] [1,] 5.238095 -4.761905 [2,] -4.761905 5.238095 Compare this with the inverse computed directly by Householder transformations.> solve(m)[,1] [,2] [1,] 5.238095 -4.761905 [2,] -4.761905 5.238095 Hope this helps. Ross -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Seemingly Similar Threads
- Cholesky Decomposition
- non user-friendly error for chol2inv functions
- Error in La.chol2inv(x, size) : lapack routines cannot be loaded
- try (nls stops unexpectedly because of chol2inv error
- System is computationally singular error when using cholesky decompostion in MCMC