Stan models and associated R code