Error In Chol.defaultw
Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Cross Validated Questions Tags Users Badges Unanswered Ask Question _ Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top “the leading minor of order 1 is not positive definite” error using 2l.norm in mice up vote 4 down vote favorite 1 I am having a problem using the 2l.norm method of multilevel imputation in mice. Unfortunately I cannot post a reproducible example because of the size of my data - when I reduce the size, the problem vanishes. For a particular variable, mice produces the following errors and warnings: Error in chol.default(inv.sigma2[class] * X.SS[[class]] + inv.psi) : the leading minor of order 1 is not positive definite In addition: Warning messages: 1: In rgamma(n.class, n.g/2 + 1/(2 * theta), scale = 2 * theta/(ss * : NAs produced 2: In rgamma(1, n.class/(2 * theta) + 1, scale = 2 * theta * H/n.class) : NAs produced 3: In rgamma(1, n.class/2 - 1, scale = 2/(n.class * (sigma2.0/H - log(sigma2.0) + : NAs produced If I use the 2l.pan, norm or pmm methods, the problem does not occur. The variable has the following distribution: Min. 1st Qu. Median Mean 3rd Qu. Max. NA's 50.0 117.0 136.0 136.7 155.0 249.0 3124 Also, the class sizes have the following distribution: Min. 1st Qu. Median Mean 3rd Qu. Max. 3.00 50.00 80.00 88.52 111.00 350.00 r missing-data multiple-imputation mice share|improve this question edited Apr 12 '13 at 12:08 asked Apr 12 '13 at 11:59 Robert Long 5,3901437 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote I have had a similar problem in MICE, see my self-discussion here. The problem occurs because you have overfitted your model (too many parameters, variables), some variables are highly colinear or you have case
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, http://stats.stackexchange.com/questions/55925/the-leading-minor-of-order-1-is-not-positive-definite-error-using-2l-norm-in-m just like you, helping each other. Join them; it only takes a minute: Sign up R coda “The leading minor of order 3 is not positive definite” up vote 4 down vote favorite Can someone explain to me what this error message means? I have an MCMC sampling method called hitandrun (in unfinished package https://github.com/davidkane9/kmatching) that http://stackoverflow.com/questions/18087355/r-coda-the-leading-minor-of-order-3-is-not-positive-definite gives me a list of matrices which have columns as multivariate output of individual samples, here is an example of it in action: > A = matrix(1, ncol = 3) > b = 1 > ## gives me solutions of Ax = b (a.k.a x + y + z = 1) > h = hitandrun(A,b, n=10, chains = 2) > h [[1]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 0.1804431 0.3340590 0.4195820 0.2061222 0.3591085 0.09984353 0.6707110 0.3926639 0.1283919 [2,] 0.6135745 0.4256909 0.3619727 0.2918238 0.5057426 0.81919629 0.2368842 0.1178713 0.2666737 [3,] 0.2059824 0.2402501 0.2184453 0.5020541 0.1351489 0.08096018 0.0924048 0.4894647 0.6049344 [,10] [1,] 0.1322112 [2,] 0.4736057 [3,] 0.3941831 [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 0.32883534 0.1284182 0.1735151 0.2005726 0.94511422 0.61653717 0.5130324 0.33228224 0.2088865 [2,] 0.65868549 0.3066952 0.5182009 0.3065610 0.01214334 0.07007548 0.1191157 0.01137002 0.3311197 [3,] 0.01247917 0.5648866 0.3082840 0.4928664 0.04274244 0.31338735 0.3678519 0.65634774 0.4599938 [,10] [1,] 0.61412223 [2,] 0.32289039 [3,] 0.06298738 I wanted to see the Gelman-Rubin diagnostic of this data, to
[ date ] [ thread ] [ subject ] [ author ] see inline! On Mon, Jun 18, 2012 at 12:38 AM,
applies to real symmetric, positive-definite matrices ... > x x [,1] [,2] [1,] 8 1 [2,] 1 4 > y y [,1] [,2] [1,] 2.828427 0.3535534 [2,] 0.000000 1.9685020 > x x [,1] [,2] [1,] 1 3 [2,] 2 4 > y <- chol(x) Error in chol.default(x) : the leading minor of order 2 is not positive definite R Tutorials R Data Types Loop, Condition Statements Plotting and Graphics String Manipulations Math Functions Matrix Manipulations Read & Write Data Statistical Analysis All Functions List :: Popular :: » R PCH Symbols » R Color Names » R Regular Expression » R tapply Function » R String Functions » R Plot Function » R Builtin Datasets List Python Tutorials HTML Tutorials JavaScript Tutorials Statistics News, Events Worldwide Unit Conversions Top Visited Websites Directory endmemo.com © 2016 Terms of Use