Many statistical routines in R use R formulas as a flexible way to specify the terms of a model. With a little setup, we can use formulas to build inputs to Stan and avoid hard-coding any variables in the model.
For example, say you are writing a Stan model for linear regression. You would like to regress a response variable $y$ on two predictors, $x_1$ and $y_1$:
One of the themes that I worked on at Silent Spring Institute was on how to report complex personal data to our study participants. In the PROTECT study, mothers in Puerto Rico were tested for a host of environmental chemicals. Our job was to design a tool to report-back individual results to the participants.
While I was on the project, I designed and implemented a novel smartphone interface for communicating personal results to study participants. One aspect was designing a visualization that allowed participants to compare their results to other women in the study. Our approach uses a SinaPlot where the participant’s personal results are represented by an avatar that they chose when they enter their report.
Last May I left Silent Spring Institute to pursue graduate school, and I was happy to see that the tool was launched in October! To learn more, check out the article the PROTECT team wrote about the launch of the reports.