wrong algebra for slice sampler
Once more, and thrice alas!, I became aware of a typo in our “Use R!” book through a question on X validated from a reader unable to reproduce the slice of a basic 2D slice sampler for a logistic regression with coefficients (a,b). Indeed, our slice reads as the incorrect set (missing the i=1,…,n)
when it should have been
which is the version I found in my LaTeX file. So I do not know what happened (unless I corrected the LaTeX file at a later date and cannot remember it, but the latest chance on the file reads October 2011…). Fortunately, the resulting slices in a and b and the following R code remain correct. Unfortunately, both French and Japanese translations reproduce the mistake…
January 28, 2021 at 1:10 am
Isn’t it odd how sometimes mistakes in maths presentation when translated to code still result in the same behavior? At a Wikipedia page on Metropolis-Hastings I thought the presentation of the algorithm was so opaque there was a danger of it being wrong at a corner case. However, after working through it, it gives a correct algorithm, although I recommended that perhaps it should be changed to make it more transparently correct and in the spirit of the Hastings amendment.
January 28, 2021 at 5:50 pm
Is the current version the new one?
January 28, 2021 at 6:18 pm
It isn’t what I proposed, and the original can be seen in my “Talk” comment there. It has been changed.
January 27, 2021 at 8:12 am
[…] article was first published on R – Xi'an's Og, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) […]
January 27, 2021 at 2:33 am
[…] by data_admin [This article was first published on R – Xi’an’s Og, and kindly contributed to R-bloggers]. (You can report issue about the content on this page […]