another wrong entry

June 26, 2016
By

(This article was originally published at R – Xi'an's Og, and syndicated at StatsBlogs.)

Quite a coincidence! I just came across another bug in Lynch’s (2007) book, Introduction to Applied Bayesian Statistics and Estimation for Social Scientists. Already discussed here and on X validated. While working with one participant to the post-ISBA softshop, we were looking for efficient approaches to simulating correlation matrices and came [by Google] across the above R code associated with a 3×3 correlation matrix, which misses the additional constraint that the determinant must be positive. As shown e.g. by the example

> eigen(matrix(c(1,-.8,.7,-.8,1,.6,.7,.6,1),ncol=3))
$values
[1] 1.8169834 1.5861960 -0.4031794

having all correlations between -1 and 1 is not enough. Just. Not. Enough.


Filed under: Books, Kids, R, Statistics, University life Tagged: Bayesian Analysis, correlation, cross validated, introductory textbooks, linear algebra, positive definite matrix, Scott Lynch



Please comment on the article here: R – Xi'an's Og

Tags: , , , , , , , , , , ,


Subscribe

Email:

  Subscribe