<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/example-7-3-what-a-mess/"></div></div><div><a data-url="https://www.r-bloggers.com/example-7-3-what-a-mess/" data-counturl="https://www.r-bloggers.com/example-7-3-what-a-mess/" data-count="horizontal" data-text="Example 7.3: what a mess!" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://xianblog.wordpress.com/2016/11/13/example-7-3-what-a-mess/"> R – Xi'an's Og</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><strong><a target="_blank" rel="nofollow" href="http://amzn.to/2eC0LLE"><img sizes="(max-width: 100px) 100vw, 100px" alt="Robert_Casella_RBook" class="wp-image-3353" src="https://i1.wp.com/xianblog.files.wordpress.com/2009/11/robert_casella_rbook.jpg?resize=100%2C139&ssl=1" data-recalc-dims="1"></a>A</strong> rather <a target="_blank" rel="nofollow" href="http://stats.stackexchange.com/q/243828/7224">obscure question</a> on Metropolis-Hastings algorithms on X Validated ended up being about our first illustration in <a target="_blank" rel="nofollow" href="http://amzn.to/2eC0LLE">Introducing Monte Carlo methods with R</a>. And exposing some inconsistencies in the following example… Example 7.2 is based on a [toy] joint Beta x Binomial target, which leads to a basic Gibbs sampler. We thought this was straightforward, but it may confuse readers who think of using Gibbs sampling for posterior simulation as, in this case, there is neither observation nor posterior, but simply a (joint) target in (x,θ).</p>
<p><a target="_blank" rel="nofollow" href="http://amzn.to/2eC0LLE"><img sizes="(max-width: 450px) 100vw, 450px" alt="Example 7.3" class="wp-image-31967" src="https://i0.wp.com/xianblog.files.wordpress.com/2016/11/example73.jpg?resize=450%2C131&ssl=1" data-recalc-dims="1"></a>And then it indeed came out that we had incorrectly written Example 7.3 on the [toy] Normal posterior, using at times a Normal mean prior with a [prior] variance scaled by the sampling variance and at times a Normal mean prior with a [prior] variance unscaled by the sampling variance. I am rather amazed that this did not show up earlier. Although there were already <a target="_blank" rel="nofollow" href="https://www.ceremade.dauphine.fr/~xian/typosIMCR.pdf">typos listed</a> about that example.<a target="_blank" rel="nofollow" href="http://amzn.to/2eC0LLE"><img sizes="(max-width: 450px) 100vw, 450px" alt="Example 7.3 (7.4)" class="wp-image-31969" src="https://i0.wp.com/xianblog.files.wordpress.com/2016/11/example74.jpg?resize=450%2C157&ssl=1" data-recalc-dims="1"></a></p>
<p>Filed under: <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/category/books/">Books</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/category/kids/">Kids</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/category/statistics/r-statistics/">R</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/category/statistics/">Statistics</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/category/university-life/">University life</a> Tagged: <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/beta-distribution/">beta distribution</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/cross-validated/">cross validated</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/george-casella/">George Casella</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/gibbs-sampling/">Gibbs sampling</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/introducing-monte-carlo-methods-with-r/">Introducing Monte Carlo Methods with R</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/metropolis-hastings-algorithm/">Metropolis-Hastings algorithm</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/typos/">typos</a> <a target="_blank" rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/xianblog.wordpress.com/31962/"><img alt="" src="http://feeds.wordpress.com/1.0/comments/xianblog.wordpress.com/31962/" border="0"></a> <img alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" border="0" data-recalc-dims="1"></p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="https://www.r-bloggers.com/example-7-3-what-a-mess/"></div></div><div><a data-url="https://www.r-bloggers.com/example-7-3-what-a-mess/" data-counturl="https://www.r-bloggers.com/example-7-3-what-a-mess/" data-count="vertical" data-text="Example 7.3: what a mess!" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://xianblog.wordpress.com/2016/11/13/example-7-3-what-a-mess/"> R – Xi'an's Og</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/5xAOVqTXGvA"></a></div>