<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/stan-roundup-10-november-2017/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://andrewgelman.com/2017/11/10/stan-roundup-10-november-2017/"> R – Statistical Modeling, Causal Inference, and Social Science</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>We’re in the heart of the academic season and there’s a lot going on.</p>
<ul>
<li><b>James Ramsey</b> reported <a rel="nofollow" href="http://discourse.mc-stan.org/t/stan-2-17-running-slower-on-a-model-than-stan-2-15/1950" target="_blank">a critical performance regression bug</a> in Stan 2.17 (this affects the latest CmdStan and PyStan, not the latest RStan). <b>Sean Talts</b> and <b>Daniel Lee</b> diagnosed the underlying problem as being with the change from char* to std::string arguments—you can’t pass char* and rely on the implicit std::string constructor without the penalty of memory allocation and copying. The reversion goes back to how things were before with const char* arguments. <b>Ben Goodrich</b> is working with <b>Sean Talts</b> to cherry-pick the performance regression fix to Stan that led to a very slow 2.17 release for the other interfaces. RStan 2.17 should be out soon, and it will be the last pre-C++11 release. We’ve already opened the C++11 floodgates on our development branches (yoo-hoo!).

<li><b>Quentin F. Gronau</b>, <b>Henrik Singmann</b>, <b>E. J. Wagenmakers</b> released the bridgesampling package in R. Check out the <a rel="nofollow" href="https://arxiv.org/abs/1710.08162" target="_blank">arXiv paper</a>. It runs with output from Stan and JAGS.

<li><b>Andrew Gelman</b> and <b>Bob Carpenter</b>‘s proposal was approved by Coursera for a four-course introductory concentration on Bayesian statistics with Stan: 1. Bayesian Data Analysis (Andrew), 2. Markov Chain Monte Carlo (Bob), 3. Stan (Bob), 4. Multilevel Regression (Andrew). The plan is to finish the first two by late spring and the second two by the end of the summer in time for Fall 2018. <b>Advait Rajagopal</b>, an economics Ph.D. student at the New School is going to be leading the exercise writing, managing the Coursera platform, and will also TA the first few iterations. We’ve left open the option for us or others to add a prequel and sequel, 0. Probability Theory, and 5. Advanced Modeling in Stan.

<li><b>Dan Simpson</b> is in town and dropped a casual hint that order statistics would clean up the discretization and binning issues that <b>Sean Talts</b> and crew were having with the simulation-based algorithm testing framework (aka the Cook-Gelman-Rubin diagnostics). Lo-and-behold, it works. <b>Michael Betancourt</b> worked through all the math on our (chalk!) board and I think they are now ready to proceed with the paper and recommendations for coding in Stan. As I’ve commented before, one of my favorite parts of working on Stan is watching the progress on this kind of thing from the next desk.

<li><b>Michael Betancourt</b> tweeted about using <b>Andrei Kascha</b>‘s javascript-based vector field visualization tool for visualizing Hamiltonian trajectories and with multiple trajectories, the Hamiltonian flow. <b>Richard McElreath</b> provides a link to visualizations of the <a rel="nofollow" href="https://twitter.com/rlmcelreath/status/926736976031596545" target="_blank">fields for light, normal, and heavy-tailed distributions</a>. The Cauchy’s particularly hypnotic, especially with many fewer particles and velocity highlighting.

<li><b>Krzysztof Sakrejda</b> finished the fixes for standalone function generation in C++. This lets you generate a double- and int-only version of a Stan function for inclusion in R (or elsewhere). This will go into RStan 2.18.

<li><b>Sebastian Weber</b> reports that the <i>Annals of Applied Statistics</i> paper, Bayesian aggregation of average data: An application in drug development, was finally formally accepted after two years in process. I think Michael Betancourt, Aki Vehtari, Daniel Lee, and Andrew Gelman are co-authors.

<li><b>Aki Vehtari</b> posted a case study for review on <a rel="nofollow" href="http://discourse.mc-stan.org/t/case-study-extreme-value-analysis-and-user-defined-probability-functions-in-stan/2464/2" target="_blank">extreme-value analysis and user-defined functions in Stan</a> [forum link — please comment there].

<li><b>Aki Vehtari</b>, <b>Andrew Gelman</b> and <b>Jonah Gabry</b> have made a major revision of <a rel="nofollow" href="https://arxiv.org/abs/1507.02646" target="_blank">Pareto smoothed importance sampling</a> paper with improved algorithm, new Monte Carlo error and convergence rate results, new experiments with varying sample size and different functions. The next loo package release will use the new version.

<li><b>Bob Carpenter</b> (it’s weird writing about myself in the third person) posted a case study for review on <a rel="nofollow" href="http://discourse.mc-stan.org/t/lotka-volterra-population-dynamics-case-study/2457" target="_blank">Lotka-Volterra predator-prey population dynamics</a> [forum link — please comment there].

<li><b>Sebastian</b> and <b>Sean Talts</b> led us through the MPI design decisions about whether to go with our own MPI map-reduce abstraction or just build the parallel map function we’re going to implement in the Stan language. Pending further review from someone with more MPI experience, the plan’s to implememt the function directly, then worry about generalizing when we have more than one function to implement.

<li><b>Matt Hoffman</b> (inventor of the original NUTS algorithm and co-founder of Stan) dropped in on the Stan meeting this week and let us know he’s got an upcoming paper generalizing Hamiltonian Monte Carlo sampling and that his team at Google’s working on probabilistic modeling for Tensorflow.

<li><b>Mitzi Morris</b>, <b>Ben Goodrich</b>, <b>Sean Talts</b> and I sat down and hammered out the services spec for running the generated quantities block of a Stan program over the draws from a previous sample. This will decouple the model fitting process and the posterior predictive inference process (because the generated quantities block generates a ỹ according to p(ỹ | θ) where ỹ is a vector of predictive quantities and θ is the vector of model parameters. Mitzi then finished the coding and testing and it should be merged soon. She and <b>Ben Bales</b> are working on getting it into CmdStan and <b>Ben Goodrich</b> doesn’t think it’ll be hard to add to RStan.

<li><b>Mitzi Morris</b> extended the spatial case study with leave-one-out cross-validation and WAIC comparisons of the simple Poisson model, a heterogeneous random effects model, a spatial random effects model, and a combined heterogeneous and spatial model with two different prior configurations. I’m not sure if she posted the updated version yet (no, because Aki is also in town and suggested checking Pareto khats, which said no).

<li><b>Sean Talts</b> split out some of the longer tests for less frequent application to get distribution testing time down to 1.5 hours to improve flow of pull requests.

<li><b>Sean Talts</b> is taking another one for the team by leading the charge to auto-format the C++ code base and then proceed with pre-commit autoformat hooks. I think we’re almost there after a spirited discussion of readability and our ability to assess it.

<li><b>Sean Talts</b> also added precompiled headers to our unit and integration tests. This is a worthwhile speedup when running lots of tests and part of the order of magnitude speedup Sean’s eked out.

</ul>
<p>ps. some edits made by Aki</p>
<p>The post <a rel="nofollow" href="http://andrewgelman.com/2017/11/10/stan-roundup-10-november-2017/" target="_blank">Stan Roundup, 10 November 2017</a> appeared first on <a rel="nofollow" href="http://andrewgelman.com/" target="_blank">Statistical Modeling, Causal Inference, and Social Science</a>.</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="http://andrewgelman.com/2017/11/10/stan-roundup-10-november-2017/"> R – Statistical Modeling, Causal Inference, and Social Science</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 width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/dyi0dZ7etNw" height="1"></a></div>