This document explores another possible way to use prior data, as an extension to the opioid_bayes2.Rmd
document.
Here we use the same prior on branching, but opt for log normal prior on \(Z\) again, but which is instead only informed by the cohort bound of 34113 and the highest upper bound of 85283. We will aim at placing 80% certainty within these bounds. A \(Normal(59698, 20000)\) distribution achieves this; a \(LogNormal(log(54000), 0.35)\) distribution corresponds closely to these restraints.
## [1] 57290.88
## [1] 20988.78
Next, we’ll run the model again with this updated (less weak than uniform) prior on \(Z\), but the PHAC prior bounds on \(p\):
## 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_lognormalZ.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] 26721.332 9336.104 12789.975 20054.750 25190.500 31707.250 48898.075
## AB[2] 42307.885 3614.911 37179.925 39706.750 41654.000 44177.000 51127.100
## C 24006.598 9331.853 10096.950 17307.000 22459.500 29053.500 46202.300
## D 2714.734 283.773 2457.000 2522.000 2626.000 2807.250 3482.025
## 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] 16755.451 382.174 16110.000 16484.000 16715.000 16993.000 17602.000
## EFGHI[5] 6767.434 3594.039 1723.975 4188.000 6090.500 8628.750 15441.350
## 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] 262.734 283.773 5.000 70.000 174.000 355.250 1030.025
## 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.159 100.078 2444.000 2519.000 2574.000 2647.000 2826.025
## MNOPQR[6] 1212.292 367.022 606.000 944.000 1170.000 1444.000 2026.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.159 100.078 68.000 143.000 198.000 271.000 450.025
## Z 69029.217 10336.092 53174.475 61556.750 67485.000 74725.250 93336.075
## p 0.378 0.079 0.231 0.322 0.375 0.429 0.537
## q 0.114 0.041 0.054 0.084 0.107 0.136 0.214
## r[1] 0.403 0.032 0.331 0.383 0.406 0.426 0.455
## r[2] 0.033 0.003 0.027 0.031 0.033 0.035 0.038
## r[3] 0.011 0.001 0.009 0.011 0.011 0.012 0.013
## r[4] 0.399 0.032 0.327 0.378 0.402 0.422 0.451
## r[5] 0.154 0.067 0.047 0.106 0.147 0.195 0.304
## s[1] 0.066 0.007 0.049 0.061 0.066 0.071 0.079
## s[2] 0.845 0.074 0.654 0.810 0.866 0.902 0.927
## s[3] 0.089 0.080 0.002 0.028 0.066 0.127 0.295
## t[1] 0.692 0.016 0.659 0.682 0.693 0.704 0.720
## 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.150 0.155 0.159 0.169
## t[6] 0.072 0.020 0.038 0.058 0.070 0.085 0.115
## u[1] 0.867 0.032 0.794 0.847 0.871 0.890 0.918
## u[2] 0.051 0.005 0.043 0.048 0.051 0.054 0.061
## u[3] 0.082 0.034 0.028 0.057 0.077 0.102 0.159
## deviance 120.813 10.444 102.853 113.320 119.815 127.338 143.870
## Rhat n.eff
## AB[1] 1.002 3500
## AB[2] 1.001 5100
## C 1.002 3500
## 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.002 2900
## 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.002 2900
## p 1.001 4400
## q 1.001 3600
## r[1] 1.001 4900
## r[2] 1.001 5700
## r[3] 1.001 6000
## r[4] 1.001 4500
## r[5] 1.002 2700
## s[1] 1.001 6000
## s[2] 1.001 6000
## s[3] 1.001 6000
## t[1] 1.001 6000
## t[2] 1.001 6000
## t[3] 1.001 3700
## 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.6 and DIC = 175.4
## DIC is an estimate of expected predictive error (lower deviance is better).