Hiroki ITÔ (pictured) has done everyone a service in translating to Stan the example models [update: only chapters 3–9 so far, not the whole book; the rest are in the works] from Marc Kéry and Michael Schaub (2012) Bayesian Population Analysis using WinBUGS: A Hierarchical Perspective. Academic Press. You can find the code in our […]

**R**

## McElreath’s *Statistical Rethinking: A Bayesian Course with Examples in R and Stan *

We’re not even halfway through with January, but the new year’s already rung in a new book with lots of Stan content: Richard McElreath (2016) Statistical Rethinking: A Bayesian Course with Examples in R and Stan. Chapman & Hall/CRC Press. This one got a thumbs up from the Stan team members who’ve read it, and […]

## R sucks

I’m doing an analysis and one of the objects I’m working on is a multidimensional array called “attitude.” I took a quick look: > dim(attitude) [1] 30 7 Huh? It’s not supposed to be 30 x 7. Whassup? I search through my scripts for a “attitude” but all I find is the three-dimensional array. Where […]

## Stan 2.7 (CRAN, variational inference, and much much more)

Stan 2.7 is now available for all interfaces. As usual, everything you need can be found starting from the Stan home page: http://mc-stan.org/ Highlights RStan is on CRAN!(1) Variational Inference in CmdStan!!(2) Two new Stan developers!!! A whole new logo!!!! Math library with autodiff now available in its own repo!!!!! (1) Just doing install.packages(“rstan”) isn’t […]

## Short course on Bayesian data analysis and Stan 19-21 July in NYC!

Bob Carpenter, Daniel Lee, and I are giving a 3-day short course in two weeks. Before class everyone should install R, RStudio and RStan on their computers. If problems occur please join the stan-users group and post any questions. It’s important that all participants get Stan running and bring their laptops to the course. Class […]

## Stan 2.5, now with MATLAB, Julia, and ODEs

As usual, you can find everything on the Stan Home Page. Drop us a line on the stan-users group if you have problems with installs or questions about Stan or coding particular models. New Interfaces We’d like to welcome two new interfaces: MatlabStan by Brian Lau, and Stan.jl (for Julia) by Rob Goedman. The new […]

## What does CNN have in common with Carmen Reinhart, Kenneth Rogoff, and Richard Tol: They all made foolish, embarrassing errors that would never have happened had they been using R Markdown

Rachel Cunliffe shares this delight: Had the CNN team used an integrated statistical analysis and display system such as R Markdown, nobody would’ve needed to type in the numbers by hand, and the above embarrassment never would’ve occurred. And CNN should be embarrassed about this: it’s much worse than a simple typo, as it indicates […]

## (Py, R, Cmd) Stan 2.3 Released

We’re happy to announce RStan, PyStan and CmdStan 2.3. Instructions on how to install at: http://mc-stan.org/ As always, let us know if you’re having problems or have comments or suggestions. We’re hoping to roll out the next release a bit quicker this time, because we have lots of good new features that are almost ready […]

## Identifying pathways for managing multiple disturbances to limit plant invasions

Andrew Tanentzap, William Lee, Adrian Monks, Kate Ladley, Peter Johnson, Geoffrey Rogers, Joy Comrie, Dean Clarke, and Ella Hayman write: We tested a multivariate hypothesis about the causal mechanisms underlying plant invasions in an ephemeral wetland in South Island, New Zealand to inform management of this biodiverse but globally imperilled habitat. . . . We […]

## Bayesian nonparametric weighted sampling inference

Yajuan Si, Natesh Pillai, and I write: It has historically been a challenge to perform Bayesian inference in a design-based survey context. The present paper develops a Bayesian model for sampling inference using inverse-probability weights. We use a hierarchical approach in which we model the distribution of the weights of the nonsampled units in the […]

## Stan Model of the Week: PK Calculation of IV and Oral Dosing

[Update: Revised given comments from Wingfeet, Andrew and germo. Thanks! I’d mistakenly translated the dlnorm priors in the first version — amazing what a difference the priors make. I also escaped the less-than and greater-than signs in the constraints in the model so they’re visible. I also updated to match the thin=2 output of JAGS.] […]

## Stupid R Tricks: Random Scope

Andrew and I have been discussing how we’re going to define functions in Stan for defining systems of differential equations; see our evolving ode design doc; comments welcome, of course. About Scope I mentioned to Andrew I would prefer pure lexical, static scoping, as found in languages like C++ and Java. If you’re not familiar […]

## R package for effect size calculations for psychology researchers

Dan Gerlanc writes: I read your post the other day [now the other month, as our blog is on a bit of a delay] on helping psychologists do research and thought you might be interested in our R package, “bootES”, for robust effect size calculation and confidence interval estimation using resampling techniques. The package provides […]