similar to: how do I make a correlation matrix positive definite?

Displaying 20 results from an estimated 1400 matches similar to: "how do I make a correlation matrix positive definite?"

2007 Dec 06
3
correlated data
Hi, Is there an R library that has the same functionalities of Splus7.0+ library correlatedData? I'd appreciate any input. Hakan Demirtas [[alternative HTML version deleted]]
2010 Apr 02
2
tetrachoric correlations
Hi, Is there any R library/package that calculates tetrachoric correlations from given marginals and Pearson correlations among ordinal variables? Inputs to polychor function in polycor package are either contingency tables or ordinal data themselves. I am looking for something that takes marginal distributions and Pearson correlation as inputs. For example, Y1=(1,2,3) with P(Y1=1)=0.3,
2003 Jun 12
1
R-compatible fortran compiler
Hi, Is there any Fortran compiler that generates R-compatible object files ? (For Windows based systems) Thanks, Hakan Demirtas Pennsylvania State University Department of Statistics [[alternate HTML version deleted]]
2010 Jan 04
1
polygamma or Hurwitz zeta function
Hi, Is there any R library that is capable of handling polygamma function (Hurwitz zeta function also works)? I am aware of digamma(0 and trigamma(), but could not find more advanced versions. I'd appreciate any help. Hakan Demirtas
2006 Aug 14
1
solving non-linear system of equations
Didn't get any useful response to the following question. Trying again. -------------------------------------------------------------------------------- I can't seem to get computationally stable estimates for the following system: Y=a+bX+cX^2+dX^3, where X~N(0,1). (Y is expressed as a linear combination of the first three powers of a standard normal variable.) Assuming that E(Y)=0 and
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
2010 Nov 15
1
Non-positive definite cross-covariance matrices
I am creating covariance matrices from sets of points, and I am having frequent problems where I create matrices that are non-positive definite. I've started using the corpcor package, which was specifically designed to address these types of problems. It has solved many of my problems, but I still have one left. One of the matrices I need to calculate is a cross-covariance matrix. In other
2009 Oct 07
1
sinusoidal relationship
Hi, Suppose x and y are vectors whose elements are known. I know that there is a sinusoidal relation between them. In other words, y=a*sin(bx) where b is probably a function of pi. How do I find a and b in R? Hakan [[alternative HTML version deleted]]
2010 Feb 09
1
lmer
Does lmer do three-level mixed-effects models? What forms of outcome variables can it handle (continuous, survival, binary)? I'd appreciate any help.
2010 Mar 11
1
mixed-effects survival
Hi, What R libraries should I use to implement mixed effects models with continuous time and discrete-time survival data? What if I have two crossed random effects? I'd appreciate any help. Regards, Hakan Demirtas [[alternative HTML version deleted]]
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.
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%
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 21
3
positive semi-definite matrix
I have a covariance matrix that is not positive semi-definite matrix and I need it to be via some sort of adjustment. Is there any R routine or package to help me do this? Thanks, Roger [[alternative HTML version deleted]]
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
2006 Dec 29
1
Failure loading library into second R 2.3.1 session on Windows XP
Hi. I am using R 2.3.1 on Windows XP. I had installed a library package into my first session and wanted the same package in my second session, so I went out to the CRAN mirror and tried to install the package, and got the following message: ********************************************************************* >utils:::menuInstallPkgs() trying URL
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
2010 Dec 02
2
Hmisc label function applied to data frame
Hello, I'm attempting to create a data frame with correlations between every pair of variables in a data frame, so that I can then sort by the value of the correlation coefficient and see which pairs of variables are most strongly correlated. The sm2vec function in the corpcor library works very nicely as shown here: library(Hmisc) library(corpcor) # Create example data x1 = runif(50) x2 =
2005 Dec 07
1
KMO sampling adequacy and SPSS -- partial solution
Dear colleagues, I've been searching for information on the Kaiser-Meyer-Olkin (KMO) Measure of Sampling Adequacy (MSA). This statistic is generated in SPSS and is often used to determine if a dataset is "appropriate" for factor analysis -- it's true utility seems quite low, but it seems to come up in stats classes a lot. It did in mine, and a glance through the R-help
2007 Jul 13
2
nearest correlation to polychoric
Dear all, Has someone implemented in R (or any other language) Knol DL, ten Berge JMF. Least-squares approximation of an improper correlation matrix by a proper one. Psychometrika, 1989, 54, 53-61. or any other similar algorithm? Best regards Jens Oehlschl?gel Background: I want to factanal() matrices of polychoric correlations which have negative eigenvalue. I coded Highham 2002