<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/random-wake/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://xianblog.wordpress.com/2017/12/27/random-wake/"> 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 rel="nofollow" href="https://i0.wp.com/i.stack.imgur.com/j1TBn.jpg?ssl=1" target="_blank"><img src="https://i0.wp.com/i.stack.imgur.com/j1TBn.jpg?resize=360%2C360&ssl=1" data-recalc-dims="1"></a>J</strong>ust too often on <a rel="nofollow" href="https://stackoverflow.com/q/47574081/1154578" target="_blank">X validated</a>, one sees questions displaying a complete ignorance of the basics that makes one purposelessly wonder what is the point of trying to implement advanced methods when missing the necessary background. And just as often, I reacted to the question by wondering out loud about this… In the current case, <a rel="nofollow" href="https://stackoverflow.com/q/47574081/1154578" target="_blank">the question</a> was about debugging an R code for a mixture of two exponential distributions and the random walk Metropolis algorithm that comes with it. Except that the Normal noise was replaced with a Uniform U(0,1) noise, leading to a most obviously transient Markov chain.<img data-orig-file="https://xianblog.files.wordpress.com/2017/12/rdmwok.png" data-orig-size="1506,411" data-medium-file="https://xianblog.files.wordpress.com/2017/12/rdmwok.png?w=300" data-attachment-id="34925" data-image-meta="{" data-image-description="" src="https://xianblog.files.wordpress.com/2017/12/rdmwok.png?w=450&h=123&fit=450%2C123&resize=450%2C123" data-permalink="https://xianblog.wordpress.com/2017/12/27/random-wake/rdmwok/" data-large-file="https://xianblog.files.wordpress.com/2017/12/rdmwok.png?w=450&amp;h=123&amp;fit=450%2C123&amp;resize=450%2C123" alt="" data-image-title="rdmwok" sizes="(max-width: 450px) 100vw, 450px" data-comments-opened="1" class="wp-image-34925" data-recalc-dims="1">I eventually <a rel="nofollow" href="https://stackoverflow.com/a/47574082/1154578" target="_blank">corrected the R code</a>, which returned a rather nicely label-switching output. And which did not necessarily help with the comprehension of the fundamentals.</p>
<p>Filed under: <a rel="nofollow" href="https://xianblog.wordpress.com/category/books/" target="_blank">Books</a>, <a rel="nofollow" href="https://xianblog.wordpress.com/category/kids/" target="_blank">Kids</a>, <a rel="nofollow" href="https://xianblog.wordpress.com/category/statistics/r-statistics/" target="_blank">R</a>, <a rel="nofollow" href="https://xianblog.wordpress.com/category/statistics/" target="_blank">Statistics</a> Tagged: <a rel="nofollow" href="https://xianblog.wordpress.com/tag/cross-validated/" target="_blank">cross validated</a>, <a rel="nofollow" href="https://xianblog.wordpress.com/tag/fundamentals/" target="_blank">fundamentals</a>, <a rel="nofollow" href="https://xianblog.wordpress.com/tag/gaussian-random-walk/" target="_blank">Gaussian random walk</a>, <a rel="nofollow" href="https://xianblog.wordpress.com/tag/metropolis-hastings-algorithm/" target="_blank">Metropolis-Hastings algorithm</a>, <a rel="nofollow" href="https://xianblog.wordpress.com/tag/monte-carlo-statistical-methods/" target="_blank">Monte Carlo Statistical Methods</a>, <a rel="nofollow" href="https://xianblog.wordpress.com/tag/r/" target="_blank">R</a>, <a rel="nofollow" href="https://xianblog.wordpress.com/tag/simulation/" target="_blank">simulation</a> <a rel="nofollow" href="https://feeds.wordpress.com/1.0/gocomments/xianblog.wordpress.com/34924/" target="_blank"><img border="0" alt="" src="https://feeds.wordpress.com/1.0/comments/xianblog.wordpress.com/34924/"></a> <img border="0" alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" data-recalc-dims="1"></p>
	<p>
<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/2017/12/27/random-wake/"> 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 rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/0K3xCnPEv58" height="1"></a></div>