Skip to content

Commit 0fcf587

Browse files
committed
2 parents 37a6599 + 91353d1 commit 0fcf587

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

jupyter/covid-inf-rate/SantaClara_CmdStanPy.ipynb

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"name": "SantaClara_CmdStanPy.ipynb",
77
"provenance": [],
88
"collapsed_sections": [],
9-
"authorship_tag": "ABX9TyMfi5qWhQilw+LVRY7NrH0W",
9+
"authorship_tag": "ABX9TyNh1NuXuIIVzc5g9FQpoq1m",
1010
"include_colab_link": true
1111
},
1212
"kernelspec": {
@@ -382,7 +382,20 @@
382382
},
383383
"source": [
384384
"hier_model = CmdStanModel(stan_file='hier_sens_spec.stan')\n",
385-
"hier_fit = hier_model.sample(data=hier_data)"
385+
"hier_fit = hier_model.sample(data=hier_data, adapt_delta=0.98)"
386+
],
387+
"execution_count": 0,
388+
"outputs": []
389+
},
390+
{
391+
"cell_type": "code",
392+
"metadata": {
393+
"id": "qCOV7poz_nSM",
394+
"colab_type": "code",
395+
"colab": {}
396+
},
397+
"source": [
398+
"hier_fit.diagnose()"
386399
],
387400
"execution_count": 0,
388401
"outputs": []
@@ -456,7 +469,20 @@
456469
},
457470
"source": [
458471
"hier_model_v2 = CmdStanModel(stan_file='hier_sens_spec_offset_mult.stan')\n",
459-
"hier_fit_v2 = hier_model_v2.sample(data=hier_data)\n",
472+
"hier_fit_v2 = hier_model_v2.sample(data=hier_data, adapt_delta=0.98)\n",
473+
"hier_fit_v2.diagnose()"
474+
],
475+
"execution_count": 0,
476+
"outputs": []
477+
},
478+
{
479+
"cell_type": "code",
480+
"metadata": {
481+
"id": "K4pUuA7e_zpl",
482+
"colab_type": "code",
483+
"colab": {}
484+
},
485+
"source": [
460486
"hier_fit_v2.summary().loc[['p', 'mu_logit_spec', 'sigma_logit_spec', 'mu_logit_sens', 'sigma_logit_sens'],].round(decimals=3)"
461487
],
462488
"execution_count": 0,

0 commit comments

Comments
 (0)