Q uite 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

Related

To

leave a comment for the author, please follow the link and comment on their blog:

R – Xi'an's Og .

R-bloggers.com offers

daily e-mail updates about

R news and

tutorials on topics such as:

Data science ,

Big Data, R jobs , visualization (

ggplot2 ,

Boxplots ,

maps ,

animation ), programming (

RStudio ,

Sweave ,

LaTeX ,

SQL ,

Eclipse ,

git ,

hadoop ,

Web Scraping ) statistics (

regression ,

PCA ,

time series ,

trading ) and more...

If you got this far, why not

subscribe for updates from the site? Choose your flavor:

e-mail ,

twitter ,

RSS , or

facebook ...