similar to: computing var-covar matrix with much missing data

Displaying 20 results from an estimated 9000 matches similar to: "computing var-covar matrix with much missing data"

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
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
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
2006 Feb 22
1
var-covar matrices comparison
> Date: Mon, 20 Feb 2006 16:43:55 -0600 > From: Aldi Kraja <aldi at wustl.edu> > > Hi, > Using package gclus in R, I have created some graphs that show the > trends within subgroups of data and correlations among 9 variables (v1-v9). > Being interested for more details on these data I have produced also the > var-covar matrices. > Question: From a pair of two
2006 Feb 20
1
var-covar matrices comparison:
Hi, Using package gclus in R, I have created some graphs that show the trends within subgroups of data and correlations among 9 variables (v1-v9). Being interested for more details on these data I have produced also the var-covar matrices. Question: From a pair of two subsets of data (with 9 variables each, I have two var-covar matrices for each subgroup, that differ for a treatment on one
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
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.
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:
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
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.
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
2006 Jul 25
1
PCA with not non-negative definite covariance
Am I correct to understand from the previous discussions on this topic (a few years back) that if I have a matrix with missing values my PCA options seem dismal if: (1) I don’t want to impute the missing values. (2) I don’t want to completely remove cases with missing values. (3) I do cov() with use=”pairwise.complete.obs”, as this produces negative eigenvalues (which it has in
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%
2008 Jun 26
2
constructing arbitrary (positive definite) covariance matrix
Dear list, I am trying to use the 'mvrnorm' function from the MASS package for simulating multivariate Gaussian data with given covariance matrix. The diagonal elements of my covariance matrix should be the same, i.e., all variables have the same marginal variance. Also all correlations between all pair of variables should be identical, but could be any value in [-1,1]. The problem I am
2011 Nov 23
0
Error using coeftest() with a heteroskedasticity-consistent estimation of the covar.
Hey I am trying to run /coeftest()/ using a heteroskedasticity-consistent estimation of the covariance matrix and i get this error: # packages >library(lmtest) >library(sandwich) #test > coeftest(*GSm_inc.pool*, vcov = vcovHC(*GSm_inc.pool*, method="arellano", > type="HC3")) /Fehler in 1 - diaghat : nicht-numerisches Argument f?r bin?ren Operator/ something like:
2010 May 11
2
ANCOVA in R, single CoVar, two Variables
Hello, I am VERY new to R, just picking it up infact. I have got my head around the basics of ANOVA with post hoc tests but I am struggling with regression, especially with ANCOVAs. I have two sets of data, one of type A, one of type B. Both have been placed in a wind tunnel and sampled every week. The co variate is of course the days since the start. An example is day A B 0 10.0 10.0 7 9.0
2011 Feb 16
2
covar
Hi all, I want to construct relatedness among individuals and have a look at the following script. ######################### rm(list=ls()) N=5 id = c(1:N) dad = c(0,0,0,3,3) mom = c(0,0,2,1,1) sex = c(2,2,1,2,2) # 1= M and 2=F A=diag(nrow = N) for(i in 1:N) { for(j in i:N) { ss = dad[j] dd = mom[j] sx = sex[j] if( ss > 0
2015 Feb 02
1
error code 1 from Lapack routine 'dsyevr'
On 2 February 2015 at 10:07, William Dunlap <wdunlap at tibco.com> wrote: <snip> > > If all goes well then > eigen(lastEigenX) > will cause the same error and you or someone on this list can see what > is odd about that matrix (e.g., by looking at its singular values). Preferably *not* this list as this doesn't really seem to be about developing R or with/for
2003 Jul 11
1
How to generate regression matrix with correlation matrix
Dear R community: I want to simulate a regression matrix which is generated from an orthonormal matrix X of dimension 30*10 with different between-column pairwise correlation coefficients generated from uniform distribution U(-1,1). Thanks in advance! Rui [[alternative HTML version deleted]]
2013 Mar 20
2
Dealing with missing values in princomp (package "psych")
Hello! I am running principle components analysis using princomp function in pacakge psych. mypc <- princomp(mydataforpc, cor=TRUE) Question: I'd like to use pairwise deletion of missing cases when correlations are calculated. I.e., I'd like to have a correlation between any 2 variables to be based on all cases that have valid values on both variables. What should my na.action be in