stat_rethinking_2023 icon indicating copy to clipboard operation
stat_rethinking_2023 copied to clipboard

Possible error in the variance-covariance matrix in the r chunks 3.17 and 3.19

Open franfrutos opened this issue 2 years ago • 1 comments

I am following the code of the third chapter of the third draft (I am a little late), and I have found a discrepancy. In the m3.1 model, using quap, the estimators calculated by running the code match perfectly with those in the draft. However, when I try to display the variance-covariance matrix, the values do not match.

I think the problem is that the matrix that appears in the draft is not the correct one, because if I square the sd of the estimators, they match the variance that I get using vcov(m3.1).

I report it here in case it is worth checking!

franfrutos avatar Jan 18 '23 12:01 franfrutos

Thanks for the report. I guess the vcov in the draft is from a different seed than the precis output.

rmcelreath avatar Jan 18 '23 14:01 rmcelreath