Skip to content

Commit

Permalink
Update for X5 results
Browse files Browse the repository at this point in the history
  • Loading branch information
tseyanglim committed Aug 11, 2021
1 parent 5d062a2 commit 56e15b5
Show file tree
Hide file tree
Showing 391 changed files with 146,115 additions and 87,006 deletions.
33 changes: 30 additions & 3 deletions Analysis & Graphing/OIC-OO v6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
"scrolled": false
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -972,6 +972,32 @@
"print(\"Ready and waiting!\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"##### TEMPORARY #####\n",
"### Sensitivity tests for impacts of Rx practices assumptions on projections ###\n",
"\n",
"os.chdir(basedir)\n",
"os.chdir('Scenarios')\n",
"\n",
"for cin in basescens[0:2]: # Limit to just main two base scenarios\n",
" for proj in ['RxPrac']:\n",
" scen = f'{cin[:-4]}{proj}'\n",
" chglist = [('main', 'full'), f'{scen}.cin']\n",
" write_log(f\"Running scenario {scen}!\", logfile)\n",
" compile_script(cf, ScenRunScript, 'final', scen, {}, logfile, chglist=chglist)\n",
" compile_script(cf, ScenSensScript, 'sens', scen, {}, logfile, chglist=chglist)\n",
" time.sleep(2)\n",
" clean_sens_raw(f'{baserunname}_sens_{scen}.tab', '../Results')\n",
" copy(f'./{baserunname}_final_{scen}.tab', '../Results')\n",
"\n",
"os.chdir(\"..\")"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -1159,14 +1185,15 @@
" logfile, chglist=[('test', cin[:-4]), basescens[0]]) # Run baseline projection\n",
"\n",
" time.sleep(2)\n",
" cf['simsettings']['changes'].pop() # Remember to remove assumption CIN file!\n"
" cf['simsettings']['changes'].pop() # Remember to remove assumption CIN file!\n",
" "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
"scrolled": false
},
"outputs": [],
"source": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
"baserunname": "X3",
"baserunname": "X5",
"simsettings": {
"model": "OSM_Master_CURRENT.mdl",
"model": "OSM_Master_CURRENT_SRP-UR.mdl",
"data": [
"inputtimeseries.vdf",
"validationtimeseries.vdf",
"yearsubs.vdf"
],
"payoff": "OIC0203.vpd",
"sensitivity": "",
"optparm": "OIC0413.voc",
"changes": ["CalWts0317.cin", "ProjEndVals.cin"],
"optparm": "OIC0806.voc",
"changes": ["CalWts0806.cin", "ProjEndVals.cin"],
"savelist": "",
"senssavelist": "OIC_sens.lst"
},
"vensimpath": "C:/Users/Public/CovidProject/Toolbox/Vengine20210415/Vensim - vengine.exe",
"vensimpath": "C:/Users/Public/CovidProject/Toolbox/Vengine20210727/Vensim - vengine.exe",
"vensim7path": "C:/Program Files (x86)/Vensim7/vensimdp.exe",
"graphs": "OSM_Master.vgd",
"fractolfactor": 300,
"samplefrac": 0.005,
"threshold": 20,
"iterlimit": 0,
"iterlimit": 3,
"twostep": 0,
"timelimit": 600,
"leversensrange": [0.2, 0.99],
"odlinekey": ["Fentanyl", " OD", "Overdose", "Nx"],
"basescens": ["Base.cin", "Cnst.cin", "FentH.cin", "FentL.cin"],
"scenariolist": ["NoFentHist.cin"],
"policylist": [
"None.cin", "BupProv.cin", "BupProvBarriers.cin", "DevOUD.cin", "DivRxInit.cin", "FentODRisk.cin", "HInit.cin", "MMTCapInc.cin", "NxKits.cin", "OwnRxInit.cin", "Package.cin", "Package_noFent.cin", "PeerRecovery.cin", "ReturntoOUD.cin", "RxRate.cin", "XRNTXCap.cin", "BupProv10.cin", "BupProvBarriers10.cin", "DevOUD10.cin", "DivRxInit10.cin", "FentODRisk10.cin", "HInit10.cin", "MMTCapInc10.cin", "NxKits10.cin", "OwnRxInit10.cin", "Package10.cin", "Package_noFent10.cin", "PeerRecovery10.cin", "ReturntoOUD10.cin", "RxRate10.cin", "XRNTXCap10.cin", "BupProv50.cin", "BupProvBarriers50.cin", "DevOUD50.cin", "DivRxInit50.cin", "FentODRisk50.cin", "HInit50.cin", "MMTCapInc50.cin", "NxKits50.cin", "OwnRxInit50.cin", "Package50.cin", "Package_noFent50.cin", "PeerRecovery50.cin", "ReturntoOUD50.cin", "RxRate50.cin", "XRNTXCap50.cin"
"None.cin", "BupProvBarriers.cin", "BupProv.cin", "DevOUD.cin", "DivRxInit.cin", "FentODRisk.cin", "HInit.cin", "NxKits.cin", "OwnRxInit.cin", "Package.cin", "Package_noFent.cin", "PeerRecovery.cin", "RxRate.cin", "ReturntoOUD.cin", "BupProvBarriers10.cin", "BupProv10.cin", "DevOUD10.cin", "DivRxInit10.cin", "FentODRisk10.cin", "HInit10.cin", "NxKits10.cin", "OwnRxInit10.cin", "Package10.cin", "Package_noFent10.cin", "PeerRecovery10.cin", "RxRate10.cin", "ReturntoOUD10.cin", "BupProvBarriers50.cin", "BupProv50.cin", "DevOUD50.cin", "DivRxInit50.cin", "FentODRisk50.cin", "HInit50.cin", "NxKits50.cin", "OwnRxInit50.cin", "Package50.cin", "Package_noFent50.cin", "PeerRecovery50.cin", "RxRate50.cin", "ReturntoOUD50.cin"
],
"testlist": ["HUDAlt.cin"],
"mccores": 0,
"mccores": 1,
"mcsettings": {
"OPTIMIZER": "MCMC",
"SENSITIVITY": "Off",
Expand All @@ -55,15 +55,16 @@
["TxVi", "MOUD Tx (Vivitrol)"], ["InRM", "Rx misuse initiation (own Rx)"],
["InRD", "Rx misuse initiation (diverted)"], ["InHT", "Total heroin initiation"],
["InHD", "Heroin initiation (direct)"], ["InHR", "Heroin initiation (Rx misuse)"],
["InHO", "Heroin initiation (Rx OUD)"], ["ODRB", "Overdose deaths (Rx)"],
["InHO", "Heroin initiation (Rx OUD)"], ["ODRB", "Overdose deaths (Rx opioids only)"],
["ODHC", "Overdose deaths (heroin & illicit synthetics)"],
["ODSB", "Overdose deaths (synthetics base)"], ["ODTo", "Total overdose deaths"]
],
"priorlist": [
["NFRR", "2013", "Nonfatal OD ratio Rx"], ["NFRH", "2013", "Nonfatal OD ratio heroin"],
["DFRB", "2018", "Bup demand fulfilment ratio"], ["PNxH", "2019", "Probability Nx bystander heroin"],
["NxHF", "2013", "Nx utilization events H user fraction"], ["RemO", "2013", "Rx OUD in remission total"],
["RemH", "2013", "HUD in remission total"]
["RemH", "2013", "HUD in remission total"], ["ReSO", "2013", "Rx OUD in stable remission total"],
["ReSH", "2013", "HUD in stable remission total"]
],
"param_percs": [0.05, 0.5, 0.95],
"mainfits": ["InRT", "InHT", "ROUT", "HUD", "ODRB", "ODHC"],
Expand All @@ -81,6 +82,9 @@
"compperc": 50.0,
"projyear": 2031,
"polvars": ["Total overdose deaths", "Total with UD"],
"annvars": ["Projected total overdose deaths", "Projected total with UD"],
"polstart": 2021,
"polquants": [0.025, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.975],
"polsavelist": "Pol_sens.lst",
"polnames": {
"None": "None", "BupProv": "Bup Providers", "BupProvBarriers": "Bup Prov Capacity", "DevOUD": "Developing OUD", "Diversion": "Diversion", "DivRxInit": "Diverted Rx Init", "FentH": "High Fentanyl", "FentL": "Low Fentanyl", "FentODRisk": "Fent OD Risk", "HInit": "Heroin Init", "MMEperRx": "MME per Rx", "MMTCapInc": "MMT Capacity", "NxKits": "Nx Kits", "OwnRxInit": "Own Rx Init", "Package": "Package", "Package_noFent": "Package (Alternate)", "PeerRecovery": "Peer Recovery", "ReturntoOUD": "Return to OUD", "RxDuration": "Rx Duration", "RxRate": "People with Rx", "XRNTXCap": "XR-NTX Capacity", "BupProv10": "Bup Providers 10", "BupProvBarriers10": "Bup Prov Capacity 10", "DevOUD10": "Developing OUD 10", "Diversion10": "Diversion 10", "DivRxInit10": "Diverted Rx Init 10", "FentH10": "High Fentanyl 10", "FentL10": "Low Fentanyl 10", "FentODRisk10": "Fent OD Risk 10", "HInit10": "Heroin Init 10", "MMEperRx10": "MME per Rx 10", "MMTCapInc10": "MMT Capacity 10", "NxKits10": "Nx Kits 10", "OwnRxInit10": "Own Rx Init 10", "Package10": "Package 10", "Package_noFent10": "Package (Alternate) 10", "PeerRecovery10": "Peer Recovery 10", "ReturntoOUD10": "Return to OUD 10", "RxDuration10": "Rx Duration 10", "RxRate10": "People with Rx 10", "XRNTXCap10": "XR-NTX Capacity 10", "BupProv50": "Bup Providers 50", "BupProvBarriers50": "Bup Prov Capacity 50", "DevOUD50": "Developing OUD 50", "Diversion50": "Diversion 50", "DivRxInit50": "Diverted Rx Init 50", "FentH50": "High Fentanyl 50", "FentL50": "Low Fentanyl 50", "FentODRisk50": "Fent OD Risk 50", "HInit50": "Heroin Init 50", "MMEperRx50": "MME per Rx 50", "MMTCapInc50": "MMT Capacity 50", "NxKits50": "Nx Kits 50", "OwnRxInit50": "Own Rx Init 50", "Package50": "Package 50", "Package_noFent50": "Package (Alternate) 50", "PeerRecovery50": "Peer Recovery 50", "ReturntoOUD50": "Return to OUD 50", "RxDuration50": "Rx Duration 50", "RxRate50": "People with Rx 50", "XRNTXCap50": "XR-NTX Capacity 50"
Expand All @@ -106,7 +110,7 @@
]
},
"sensvars": [
"ADF substitutability factor", "Average prescription duration", "Effect of MOUD Tx on OD death rate[Bup]", "Effect of MOUD Tx on OD death rate[MMT]", "Effect of MOUD Tx on OD death rate[Viv]", "OxyContin withdrawal magnitude", "Perceived risk decrease time", "Perceived risk increase time", "Perceived risk weight NFOD", "Probability OD witnessed", "Probability of calling emergency services", "Rx demand HUD with Rx OUD or misuse", "Rx demand Rx OUD no H", "Sensitivity of Rx supply to MME per Rx", "Sensitivity of Rx supply to patients receiving prescription", "Sensitivity of Rx supply to Rx per person", "Time to readjust Rx street supply", "Tx average duration Bup", "Tx average duration MMT", "Tx average duration Viv", "Tx seeking fraction Bup HUD", "Tx seeking fraction Bup Rx OUD", "Tx seeking fraction MMT HUD relative", "Tx seeking fraction MMT Rx OUD relative", "Tx seeking rate HUD relative to Rx OUD no H", "Tx success fraction inflection"
"ADF substitutability factor", "Average prescription duration", "Effect of MOUD Tx on OD death rate[Bup]", "Effect of MOUD Tx on OD death rate[MMT]", "Effect of MOUD Tx on OD death rate[Viv]", "OxyContin withdrawal magnitude", "Perceived risk decrease time", "Perceived risk increase time", "Perceived risk weight NFOD", "Probability OD witnessed", "Probability of calling emergency services", "Remission rate HUD no MOUD Tx", "Rx demand HUD with Rx OUD or misuse", "Rx demand Rx OUD no H", "Sensitivity of Rx supply to MME per Rx", "Sensitivity of Rx supply to patients receiving prescription", "Sensitivity of Rx supply to Rx per person", "Time to readjust Rx street supply", "Tx average duration Bup", "Tx average duration MMT", "Tx average duration Viv", "Tx seeking fraction Bup HUD", "Tx seeking fraction Bup Rx OUD", "Tx seeking fraction MMT HUD relative", "Tx seeking fraction MMT Rx OUD relative", "Tx seeking rate HUD relative to Rx OUD no H", "Tx success fraction inflection"
],
"policyleverlist": [
"Policy change ADF fraction of prescribed Rx opioids", "Policy change average MME per Rx", "Policy change Bup capacity effective fraction", "Policy change Bup total theoretical capacity", "Policy change initiating NDHU no Rx", "Policy change initiating Rx misuse diverted", "Policy change initiation rate heroin with Rx misuse", "Policy change initiation rate Rx misuse own Rx", "Policy change MMT capacity", "Policy change patients with opioid prescription", "Policy change Nx kits distributed H user", "Policy change Nx kits distributed H user", "Policy change probability of calling emergency services", "Policy change probability Nx LEO", "Policy change probability OD witnessed", "Policy change relapse rate", "Policy change remission fraction in Tx", "Policy change Rx street supply shocks", "Policy change Rx supply relative", "Policy change Tx average duration", "Policy change Tx demand fulfilment curve steepness", "Policy change Tx intake delay", "Policy change Tx seeking rate Rx OUD no H total", "Policy change Viv capacity"
Expand Down
125 changes: 108 additions & 17 deletions Analysis & Graphing/OSM Graphing - Main Paper.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 56e15b5

Please sign in to comment.