This document explores another possible way to use prior data, as an extension to the opioid_bayes.Rmd
document.
The opioid modelling ultimately used a \(LogNormal(log(49363), 0.9)\) distribution for the prior on the root node. This was based on Margot’s estimation of bounds on the root between 46107 and 52619, with approximately 60% certainty. These bounds, in fact, were derived from data on the percentage of individuals calling 911 calls, which was then extrapolated backwards to the number of total overdoses. A more purist approach, therefore, might be to instead revert these back to percentages of individuals calling 911 and use this information to inform a prior on \(p\), leaving the prior on \(Z\) quite uninformative.
For the aforementioned bounds on \(Z\), this corresponds to assuming roughly 26-35% of the total overdoses were counted through the cohort. If we still assume we have roughly 60% certainty in this value, we seek a Beta distribution with approximately 60% of it’s mass between 0.26 and 0.35. This results in a \(Beta(25, 57)\) distribution, which we can visualize by sampling as follows:
Next, we’ll run the model again with a weak prior on \(Z\), using only the information in the cohort data to inform the lower bound, and choosing a high upper bound signaling our lack on knowledge on the true value of this parameter (instead, we’ve transferred this knowledge to the Beta distribution on \(p\)). In particular \(Z \sim Unif(34113, 100000)\).
## Compiling data graph
## Resolving undeclared variables
## Allocating nodes
## Initializing
## Reading data back into data table
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 11
## Unobserved stochastic nodes: 11
## Total graph size: 145
##
## Initializing model
## Inference for Bugs model at "fullopioidJAGS_contuniformZ.mod", fit using jags,
## 6 chains, each with 1e+07 iterations (first 5e+06 discarded), n.thin = 5000
## n.sims = 6000 iterations saved
## mu.vect sd.vect 2.5% 25% 50% 75% 97.5%
## AB[1] 30358.054 9943.986 13860.250 22675.000 29417.000 36765.500 52035.875
## AB[2] 42975.465 4095.250 37411.875 40067.750 42165.000 45065.250 53298.650
## C 27630.055 9939.332 11137.975 20014.750 26643.500 34005.500 49158.325
## D 2727.998 304.768 2458.000 2525.000 2632.500 2823.250 3538.175
## EFGHI[1] 16922.000 0.000 16922.000 16922.000 16922.000 16922.000 16922.000
## EFGHI[2] 1390.000 0.000 1390.000 1390.000 1390.000 1390.000 1390.000
## EFGHI[3] 473.000 0.000 473.000 473.000 473.000 473.000 473.000
## EFGHI[4] 16758.964 385.040 16103.000 16486.000 16724.500 16994.000 17641.050
## EFGHI[5] 7431.501 4076.239 1970.925 4501.000 6585.000 9506.250 17542.550
## JKL[1] 173.000 0.000 173.000 173.000 173.000 173.000 173.000
## JKL[2] 2279.000 0.000 2279.000 2279.000 2279.000 2279.000 2279.000
## JKL[3] 275.998 304.768 6.000 73.000 180.500 371.250 1086.175
## MNOPQR[1] 11678.000 0.000 11678.000 11678.000 11678.000 11678.000 11678.000
## MNOPQR[2] 199.000 0.000 199.000 199.000 199.000 199.000 199.000
## MNOPQR[3] 1030.000 0.000 1030.000 1030.000 1030.000 1030.000 1030.000
## MNOPQR[4] 45.000 0.000 45.000 45.000 45.000 45.000 45.000
## MNOPQR[5] 2591.756 101.376 2441.975 2516.000 2576.000 2646.000 2839.000
## MNOPQR[6] 1215.208 368.545 608.975 954.000 1180.000 1438.000 2073.000
## STU[1] 2270.000 0.000 2270.000 2270.000 2270.000 2270.000 2270.000
## STU[2] 106.000 0.000 106.000 106.000 106.000 106.000 106.000
## STU[3] 215.756 101.376 65.975 140.000 200.000 270.000 463.000
## Z 73333.519 11028.495 54742.800 64914.250 72441.500 80801.250 96542.025
## p 0.404 0.081 0.247 0.347 0.406 0.462 0.556
## q 0.101 0.039 0.051 0.073 0.093 0.120 0.199
## r[1] 0.397 0.035 0.317 0.375 0.401 0.422 0.452
## r[2] 0.033 0.003 0.026 0.031 0.033 0.035 0.038
## r[3] 0.011 0.001 0.009 0.010 0.011 0.012 0.013
## r[4] 0.393 0.035 0.314 0.371 0.398 0.419 0.448
## r[5] 0.166 0.073 0.052 0.112 0.156 0.211 0.331
## s[1] 0.066 0.008 0.049 0.061 0.066 0.071 0.079
## s[2] 0.842 0.077 0.641 0.805 0.864 0.901 0.927
## s[3] 0.092 0.083 0.003 0.029 0.069 0.131 0.309
## t[1] 0.692 0.016 0.657 0.682 0.693 0.703 0.721
## t[2] 0.014 0.001 0.012 0.013 0.014 0.014 0.015
## t[3] 0.063 0.002 0.058 0.061 0.063 0.064 0.067
## t[4] 0.004 0.001 0.003 0.004 0.004 0.005 0.006
## t[5] 0.155 0.007 0.143 0.151 0.154 0.159 0.169
## t[6] 0.072 0.020 0.038 0.058 0.071 0.085 0.118
## u[1] 0.867 0.033 0.791 0.848 0.871 0.891 0.919
## u[2] 0.051 0.005 0.042 0.048 0.051 0.054 0.061
## u[3] 0.082 0.034 0.027 0.056 0.078 0.102 0.161
## deviance 120.798 10.428 103.118 113.305 119.840 127.473 143.767
## Rhat n.eff
## AB[1] 1.002 2000
## AB[2] 1.011 370
## C 1.002 2000
## D 1.001 6000
## EFGHI[1] 1.000 1
## EFGHI[2] 1.000 1
## EFGHI[3] 1.000 1
## EFGHI[4] 1.001 6000
## EFGHI[5] 1.010 370
## JKL[1] 1.000 1
## JKL[2] 1.000 1
## JKL[3] 1.001 6000
## MNOPQR[1] 1.000 1
## MNOPQR[2] 1.000 1
## MNOPQR[3] 1.000 1
## MNOPQR[4] 1.000 1
## MNOPQR[5] 1.001 6000
## MNOPQR[6] 1.001 6000
## STU[1] 1.000 1
## STU[2] 1.000 1
## STU[3] 1.001 6000
## Z 1.006 680
## p 1.001 6000
## q 1.002 1900
## r[1] 1.011 380
## r[2] 1.011 370
## r[3] 1.009 420
## r[4] 1.011 360
## r[5] 1.011 370
## s[1] 1.001 5300
## s[2] 1.001 6000
## s[3] 1.001 4900
## t[1] 1.001 6000
## t[2] 1.001 6000
## t[3] 1.001 6000
## t[4] 1.001 6000
## t[5] 1.001 6000
## t[6] 1.001 6000
## u[1] 1.001 6000
## u[2] 1.001 6000
## u[3] 1.001 6000
## deviance 1.001 6000
##
## For each parameter, n.eff is a crude measure of effective sample size,
## and Rhat is the potential scale reduction factor (at convergence, Rhat=1).
##
## DIC info (using the rule, pD = var(deviance)/2)
## pD = 54.4 and DIC = 175.2
## DIC is an estimate of expected predictive error (lower deviance is better).