data { // everything to the right of the | in Bayes' Rule real a0; // expectation for normal prior on VE real b0; // standard deviation for normal prior on VE int n; // number of people with Covid in the RCT int y; // number of them who were vaccinated } parameters { // everything to the left of the | in Bayes' Rule real theta; // = 1 - Pr(covid | vax) / Pr(covid | placebo) } model { // target has been initialized to zero basically target += beta_lpdf(theta | a0, b0); // prior log-kernel target += binomial_lpmf(y | n, theta); // log-likelihood } // model block is like a function that returns target generated quantities { real VE = (1 - 2 * theta) / (1 - theta); }