similar to: Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition

Displaying 20 results from an estimated 3000 matches similar to: "Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition"

2005 Jan 21
1
Cholesky Decomposition
Can we do Cholesky Decompositon in R for any matrix --------------------------------- [[alternative HTML version deleted]]
2009 Mar 10
5
Cholesky Decomposition in R
Hi everyone: I try to use r to do the Cholesky Decomposition,which is A=LDL',so far I only found how to decomposite A in to LL' by using chol(A),the function Cholesky(A) doesnt work,any one know other command to decomposte A in to LDL' My r code is: library(Matrix) A=matrix(c(1,1,1,1,5,5,1,5,14),nrow=3) > chol(A) [,1] [,2] [,3] [1,] 1 1 1 [2,] 0 2 2
2011 Feb 04
2
always about positive definite matrix
1. Martin Maechler's comments should be taken as replacements for anything I wrote where appropriate. Any apparent conflict is a result of his superior knowledge. 2. 'eigen' returns the eigenvalue decomposition assuming the matrix is symmetric, ignoring anything in m[upper.tri(m)]. 3. The basic idea behind both posdefify and nearPD is to compute the
2012 May 03
0
Modified Cholesky decomposition for sparse matrices
I am trying to estimate a covariance matrix from the Hessian of a posterior mode. However, this Hessian is indefinite (possibly because of numerical/roundoff issues), and thus, the Cholesky decomposition does not exist. So, I want to use a modified Cholesky algorithm to estimate a Cholesky of a pseudovariance that is reasonably close to the original matrix. I know that there are R packages that
2013 Jun 19
0
Simple example of variables decorrelation using the Cholesky decomposition
Dear all, I made a simple test of the Cholesky decomposition in the package 'Matrix', by considering 2 variables 100% correlated. http://blogs.sas.com/content/iml/2012/02/08/use-the-cholesky-transformation-to-correlate-and-uncorrelate-variables/ The full code is below and can be simply copy&paste in the R prompt. After uncorrelation I still have a correlation of +-100%...
2009 Mar 11
0
LDL' Cholesky decomposition
The gchol function in library(kinship) does an LDL decomposition. An updated version has just recently been posted on Rforge, in the bdsmatrix library which is part of survival. > temp <- matrix(c(1,1,1,1,5,8,1,8,14), 3) > gt <- gchol(temp) > as.matrix(gt) # L [,1] [,2] [,3] [1,] 1 0.00 0 [2,] 1 1.00 0 [3,] 1 1.75 1 > diag(gt) # D [1]
2009 Mar 11
0
anyone can help me with Cholesky Decomposition
Hi: what I want to do is decompose the a symmetric matrix A into this form A=LDL' hence TAT'=D,T is inverse of (L)and T is a lower trangular matrix,and D is dignoal matrix for one case A=1 1 1 1 5 5 1 5 14 T=inverse(L)= 1 0 0 -1 1 0 0 -1 1 D=(1,4,9) I tried to use chol(A),but it returns only trangular, anyone know the function can return
2011 Dec 29
1
Cholesky update/downdate
Dear R-devel members, I am looking for a fast Cholesky update/downdate. The matrix A being symmetric positive definite (n, n) and factorized as A = L %*% t(L), the goal is to factor the new matrix A +- C %*% t(C) where C is (n, r). For instance, C is 1-column when adding/removing an observation in a linear regression. Of special interest is the case where A is sparse. Looking at the
2007 Jun 12
5
R Book Advice Needed
I am new to using R and would appreciate some advice on which books to start with to get up to speed on using R. My Background: 1-C# programmer. 2-Programmed directly using IMSL (Now Visual Numerics). 3- Used in past SPSS and Statistica. I put together a list but would like to pick the "best of" and avoid redundancy. Any suggestions on these books would be helpful (i.e. too much
2012 Feb 21
1
System is computationally singular error when using cholesky decompostion in MCMC
Hello Everyone I have a MCMC loop to calculate a time varying hierarchical Bayesian structure. This requires me to use around 5-6 matrix inversions in the loop. I use cholesky and chol2inv for the matrix decomposition. Because of the data I am working with I am required to invert a 167 by 167 matrix twice in one iteration. I need to run the iteration for 10000 times, but I get the error
2011 Jan 29
1
Regularization of a matrix that has some tiny negative eigenvalues
Dear all: In what I am doing I sometimes get a (Hessian) matrix that has a couple of tiny negative eigenvalues (e.g. -6 * 10^-17). So, I can't run a Cholesky decomp on it - but I need to. Is there an established way to regularize my (Hessian) matrix (e.g., via some transformation) that would allow me to get a semi-positive definite matrix to be used in Cholesky decomp? Or should I try some
2012 Nov 30
1
Choleski decomposition
m <- matrix(nrow=5, ncol=5) m <- ifelse(row(m)==col(m), 1, 0.2) c <- chol(m) # Choleski decomposition u <- matrix(rnorm(2000*5), ncol=5) uc <- u %*% c cr <- pnorm(uc) cr <- qbinom(cr,1,0.5) cor(cr) I expected that the cor(cr) to be 0.2 as i set in m, but the result is around 0.1. Why is that? Thanks -- View this message in context:
2008 Mar 20
1
Interpretation of Variance decomposition in VAR model
Hi all, This question is not really R related, rather on Statistics subject itself. Even I did not do those using R. however still I want to post it here, because my hope is I could get help from great statisticians who are the very active member of this group. My problem is to interpret Variance decomposition of VAR model in layman's language. Using EViews I got following : Variance
2017 Nov 20
2
package check fail on Windows-release only?
I mistakenly left a write in "/tmp" in the rockchalk package (version 1.8.109) that I uploaded last Friday. Kurt H wrote and asked me to fix today. While uploading a new one, I became aware of a problem I had not seen. The version I uploaded last Friday, 1.8.109, has OK status on all platforms except r-release-windows-ix86+x86_64. I get OK on oldrel-windows and also on devel-windows.
2008 Oct 20
3
A question about positive definite matrix
I know, this is a forum about R. But I am so desperate of this problem (BTW, anyone knows any good Statistics/Math forum to post question like this?): A and B are both n x n positive definite matrix. Denote A > B, if A - B is positive definite. I know this is true: if A > B, then A^{-1} < B^{-1}. But how to prove this? I tried to diagonalize A and B, but since they can have different
2007 Apr 24
1
Matrix: how to re-use the symbolic Cholesky factorization?
I have been playing around with sparse matrices in the Matrix package, in particularly with the Cholesky factorization of matrices of class dsCMatrix. And BTW, what a fantastic package. My problem is that I have to carry out repeated Cholesky factorization of a spares symmetric matrices, say Q_1, Q_2, ...,Q_n, where the Q's have the same non-zero pattern. I know in this case one does
2007 Dec 12
2
Need good Reference Material and Reading about Gaussian Copulas
Can anyone advise me on some pratical papers or books On Gaussian Copulas? Anything in the genre of Copulas Dummies Would be a help. As simpe, and approachable with minimal pedantic style. Thanks, Neil -------------------------------------------------------- This information is being sent at the recipient's reques...{{dropped:16}}
2008 Apr 10
2
QP.solve, QPmat, constraint matrix, and positive definite
hello all, i'm trying to use QPmat, from the popbio package. it appears to be based on solve.QP and is intended for making a population projection matrix. QPmat asks for: nout, A time series of population vectors and C, C constraint matrix, (with two more vectors, b and nonzero). i believe the relevant code from QPmat is: function (nout, C, b, nonzero) { if (!"quadprog" %in%
2006 Mar 15
1
Log Cholesky parametrization in lme
Dear R-Users I used the nlme library to fit a linear mixed model (lme). The random effect standard errors and correlation reported are based on a Log-Cholesky parametrization. Can anyone tell me how to get the Covariance matrix of the random effects, given the above mentioned parameters based on the Log-Cholesky parametrization?? Thanks in advance Pryseley
2010 Oct 21
4
how do I make a correlation matrix positive definite?
Hi, If a matrix is not positive definite, make.positive.definite() function in corpcor library finds the nearest positive definite matrix by the method proposed by Higham (1988). However, when I deal with correlation matrices whose diagonals have to be 1 by definition, how do I do it? The above-mentioned function seem to mess up the diagonal entries. [I haven't seen this complication, but