Skip to content

Commit e63ed16

Browse files
committed
2 parents 85cdd5d + 5b4698c commit e63ed16

30 files changed

+5061
-0
lines changed

BPA/Ch.10/js_ms.stan

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ generated quantities {
121121
array[M, n_occasions] int<lower=1, upper=3> z; // Latent state
122122

123123
// Generate z[]
124+
// This code generates the posterior predictive distribution
124125
for (i in 1 : M) {
125126
z[i, 1] = 1;
126127
for (t in 2 : n_occasions) {

BPA/Ch.10/js_rest_occ.stan

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ generated quantities {
212212
array[M, n_occasions] int z; // Latent state
213213

214214
// Generate z[]
215+
// This code generates the posterior predictive distribution
215216
for (i in 1 : M) {
216217
int q = 1;
217218
real mu2;

BPA/Ch.10/js_super.stan

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ generated quantities {
215215
array[M, n_occasions] int<lower=0, upper=1> z; // Deflated latent state
216216

217217
// Generate w[] and z[]
218+
// This code generates the posterior predictive distribution
218219
for (i in 1 : M) {
219220
int q = 1;
220221
if (bernoulli_rng(psi)) {

BPA/Ch.10/js_super_indran.stan

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ generated quantities {
226226
sigma2 = square(sigma);
227227

228228
// Generate w[] and z[]
229+
// This code generates the posterior predictive distribution
229230
for (i in 1 : M) {
230231
int q = 1;
231232
if (bernoulli_rng(psi)) {

BPA/Ch.10/js_tempran.stan

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ generated quantities {
223223
array[M, n_occasions] int z; // Latent state
224224

225225
// Generate z[]
226+
// This code generates the posterior predictive distribution
226227
for (i in 1 : M) {
227228
int q = 1;
228229
real mu2;

jupyter/radon/LICENSE

Lines changed: 354 additions & 0 deletions
Large diffs are not rendered by default.

jupyter/radon/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Notebook based on Gelman and Hill 2007, Radon case study.
2+
Introduces hierarchical models and Python packages `cmdstanpy`, and `plotnine`.
3+
4+
Author: Mitzi Morris
5+
6+

jupyter/sum-to-zero/LICENSE

Lines changed: 354 additions & 0 deletions
Large diffs are not rendered by default.

jupyter/sum-to-zero/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Case study and jupyter notebook which demonstrate the correctness and efficiency of the
2+
`sum_to_zero_vector` constrained parameter type, introduced in Stan 2.36.
3+
4+
5+
- Case study `sum_to_zero_evaluation.qmd` demonstrates use of the `sum_to_zero_vector` for 2 models.
6+
7+
- Jupyter notebook `sum_to_zero_evalutation.ipynb` is a step-by-step explanation of the operations
8+
used to carry out this evaluation.
9+
10+
Included in the GitHub repository for this notebook are several python files of helper functions.
11+
12+
* eval_efficiencies.py - run models repeatedly, get average performance stats.
13+
* utils.py - simulate data for binomial model.
14+
* utils\_html.py - format Stan summaries for this notebook.
15+
* utils\_bym2.py - compute data inputs to the BYM2 model.
16+
* utils\_nyc\_map.py - munge the New York City census tract map.
17+
18+
Author: Mitzi Morris
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"runtime, ave":{"ozs large":2.41,"hard large":3.25,"soft large":17.41},"runtime, std dev":{"ozs large":0.08,"hard large":0.09,"soft large":0.5},"ESS_bulk\/s":{"ozs large":1305.86,"hard large":981.53,"soft large":181.15}}

0 commit comments

Comments
 (0)