search for: nearpd

Displaying 16 results from an estimated 16 matches for "nearpd".

2011 Feb 04
2
always about positive definite matrix
...ts 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 eigenenvalues and vectors, then replace any eigenvalues that are small or negative with some suitable small positive number and reconstruct the matrix from this modified eigenvalue decomposition. posdefify and nearPD implement modifications of this basic idea. 4. I...
2015 Feb 02
5
error code 1 from Lapack routine 'dsyevr'
Thank you for your reply. Do you have any idea of how to get rid of the errors? I tried Null function to calculate eigenvectors and nearPD to get approximate positive definite matrix first but they also had errors. -- View this message in context: http://r.789695.n4.nabble.com/error-code-1-from-Lapack-routine-dsyevr-tp4702571p4702639.html Sent from the R devel mailing list archive at Nabble.com.
2010 May 23
1
need help in understanding R code, and maybe some math
Hi, I am trying to implement Higham's algorithm for correcting a non positive definite covariance matrix. I found this code in R: http://projects.cs.kent.ac.uk/projects/cxxr/trac/browser/trunk/src/library/Recommended/Matrix/R/nearPD.R?rev=637 I managed to understand most of it, the only line I really don't understand is this one: X <- tcrossprod(Q * rep(d[p], each=nrow(Q)), Q) This line is supposed to calculate the matrix product Q*D*Q^T, Q is an n by m matrix and R is a diagonal n by n matrix. What does this mean? I...
2009 Apr 01
2
Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition
Dear fellow R Users: I am doing a Cholesky decomposition on a correlation matrix and get error message the matrix is not semi-definite. Does anyone know: 1- a work around to this issue? 2- Is there any approach to try and figure out what vector might be co-linear with another in thr Matrix? 3- any way to perturb the data to work around this? Thanks for any suggestions.
2017 Nov 20
2
package check fail on Windows-release only?
..., .nC2l, .diag.dsC, .solve.dgC.chol, .solve.dgC.qr, .solve.dgC.lu, diagN2U, diagU2N, .diagU2N, .diag2tT, .diag2sT, .diag2mat, drop0, expand, expm, facmul, fac2sparse, fac2Sparse, forceSymmetric, T2graph, graph2T, anyDuplicatedT, uniqTsparse, isTriangular, isDiagonal, isLDL, is.null.DN, invPerm, lu, nearPD, nnzero, formatSpMatrix, formatSparseM, .formatSparseSimple, printSpMatrix, printSpMatrix2, qrR, rankMatrix, readHB, readMM, sparse.model.matrix, sparseVector, symmpart, skewpart, tril, triu, updown, pack, unpack, .updateCHMfactor, .validateCsparse, writeMM, cBind, rBind ERROR: lazy loading failed...
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%
2007 Dec 05
1
Calculating large determinants
I apologise for not including a reproducible example with this query but I hope that I can make things clear without one. I am fitting some finite mixture models to data. Each mixture component has p parameters (p=29 in my application) and there are q components to the mixture. The number of data points is n ~ 1500. I need to select a good q and I have been considering model selection methods
2015 Feb 02
1
error code 1 from Lapack routine 'dsyevr'
...ill Dunlap > TIBCO Software > wdunlap tibco.com > > On Sun, Feb 1, 2015 at 7:08 PM, eigen <liguowei1991 at gmail.com> wrote: > > > Thank you for your reply. Do you have any idea of how to get rid of the > > errors? I tried Null function to calculate eigenvectors and nearPD to get > > approximate positive definite matrix first but they also had errors. > > > > > > > > -- > > View this message in context: > > > http://r.789695.n4.nabble.com/error-code-1-from-Lapack-routine-dsyevr-tp4702571p4702639.html > > Sent from th...
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
2015 Jan 31
2
error code 1 from Lapack routine 'dsyevr'
Hi, I got an error message in my program saying "Error in eigen(gene_intersection.kernel) : error code 1 from Lapack routine 'dsyevr' Execution halted". As you see, I was trying to compute the eigenvalues of a matrix but got this error. Is there anyone who knows what this error means and how I can fix it? Theoretically the eigenvalues should be nonnegative, if it helps.
2015 Feb 02
0
error code 1 from Lapack routine 'dsyevr'
On 02 Feb 2015, at 04:08 , eigen <liguowei1991 at gmail.com> wrote: > Thank you for your reply. Do you have any idea of how to get rid of the > errors? I tried Null function to calculate eigenvectors and nearPD to get > approximate positive definite matrix first but they also had errors. > How could we? All we know is that you are having trouble running some unspecified code on some unspecified data on an unspecified platform. It is a bit like someone calling from Finland and telling you that t...
2015 Feb 02
0
error code 1 from Lapack routine 'dsyevr'
...ng at its singular values). Bill Dunlap TIBCO Software wdunlap tibco.com On Sun, Feb 1, 2015 at 7:08 PM, eigen <liguowei1991 at gmail.com> wrote: > Thank you for your reply. Do you have any idea of how to get rid of the > errors? I tried Null function to calculate eigenvectors and nearPD to get > approximate positive definite matrix first but they also had errors. > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/error-code-1-from-Lapack-routine-dsyevr-tp4702571p4702639.html > Sent from the R devel mailing list archive at Nabble.com....
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 Jan 02
2
quadratic programming-maximization instead of minization
Hi, I need to maximize a quadratic function under constraints in R. For minimization I used solve.QP but for maximization it is not useful since the matrix D of the quadratic function should be positive definite hence I cannot simply change the sign. any suggestion ? thanks -- View this message in context:
2017 Nov 21
0
package check fail on Windows-release only?
....solve.dgC.qr, .solve.dgC.lu, diagN2U, diagU2N, > .diagU2N, .diag2tT, .diag2sT, .diag2mat, drop0, expand, expm, facmul, > fac2sparse, fac2Sparse, forceSymmetric, T2graph, graph2T, > anyDuplicatedT, uniqTsparse, isTriangular, isDiagonal, isLDL, > is.null.DN, invPerm, lu, nearPD, nnzero, formatSpMatrix, > formatSparseM, .formatSparseSimple, printSpMatrix, printSpMatrix2, > qrR, rankMatrix, readHB, readMM, sparse.model.matrix, sparseVector, > symmpart, skewpart, tril, triu, updown, pack, unpack, > .updateCHMfactor, .validateCsparse, writeMM, cBin...
2011 Jan 31
2
computing var-covar matrix with much missing data
Is there an R function for computing a variance-covariance matrix that guarantees that it will have no negative eigenvalues? In my case, there is a *lot* of missing data, especially for a subset of variables. I think my tactic will be to compute cor(x, use="pairwise.complete.obs") and then pre- and post-multiply by a diagonal matrix of standard deviations that were computed based