def report_CEA_CBA(multi_cohort_outcomes_SOC, multi_cohort_outcomes_NSB): """ performs cost-effectiveness and cost-benefit analyses :param multi_cohort_outcomes_SOC: outcomes of a multi-cohort simulated under SOC diagnostic :param multi_cohort_outcomes_NSB: outcomes of a multi-cohort simulated under NSB diagnostic """ # define two strategies SOC_diagnostic_strategy = Econ.Strategy( name='SOC Diagnostic', cost_obs=multi_cohort_outcomes_SOC.meanCosts, effect_obs=multi_cohort_outcomes_SOC.totalYLL, color='green' ) NSB_diagnostic_strategy = Econ.Strategy( name='NSB Diagnostic', cost_obs=multi_cohort_outcomes_NSB.meanCosts, effect_obs=multi_cohort_outcomes_NSB.totalYLL, color='blue' ) # do CEA CEA = Econ.CEA( strategies=[SOC_diagnostic_strategy, NSB_diagnostic_strategy], if_paired=True, health_measure='d' ) # show the cost-effectiveness plane show_ce_figure(CEA=CEA) # report the CE table CEA.build_CE_table( interval_type='p', # prediction intervals alpha=D.ALPHA, cost_digits=0, effect_digits=2, icer_digits=2) # CBA NBA = Econ.CBA( strategies=[SOC_diagnostic_strategy, NSB_diagnostic_strategy], if_paired=True, health_measure='d' ) # show the net monetary benefit figure NBA.graph_incremental_NMBs( min_wtp=0, max_wtp=50000, title='Cost-Benefit Analysis', x_label='Willingness-To-Pay for One Additional QALY ($)', y_label='Incremental Net Monetary Benefit ($)', interval_type='p', show_legend=True, figure_size=(6, 5) )
def report_CEA_CBA(multi_trees_P, multi_trees_N): """ performs cost-effectiveness and cost-benefit analyses :param multi_cohort_outcomes_mono: outcomes of a multi-cohort simulated under mono therapy :param multi_cohort_outcomes_combo: outcomes of a multi-cohort simulated under combination therapy """ # define two strategies Palivizumab_therapy_strategy = Econ.Strategy( name='Palivizumab Therapy', cost_obs=multi_trees_P.PCosts, effect_obs=multi_trees_P.PQALYs, color='green' ) No_prophylaxis_strategy = Econ.Strategy( name='No Prophylaxis', cost_obs=multi_trees_N.NCosts, effect_obs=multi_trees_N.NQALYs, color='blue' ) # do CEA CEA = Econ.CEA( strategies=[Palivizumab_therapy_strategy, No_prophylaxis_strategy], if_paired=True ) # show the cost-effectiveness plane show_ce_figure(CEA=CEA) # report the CE table CEA.build_CE_table( interval_type='p', # prediction intervals alpha=D.ALPHA, cost_digits=0, effect_digits=2, icer_digits=2) # CBA NBA = Econ.CBA( strategies=[Palivizumab_therapy_strategy, No_prophylaxis_strategy], if_paired=True ) # show the net monetary benefit figure NBA.graph_incremental_NMBs( min_wtp=0, max_wtp=5000000, title='Cost-Benefit Analysis', x_label='Willingness-To-Pay for One Additional QALY ($)', y_label='Incremental Net Monetary Benefit ($)', interval_type='p', show_legend=True, figure_size=(6, 5) )
def report_CEA_CBA(multi_cohort_outcomes_no, multi_cohort_outcomes_asp): # define two strategies no_therapy_strategy = Econ.Strategy( name='Mono Therapy', cost_obs=multi_cohort_outcomes_no.meanCosts, effect_obs=multi_cohort_outcomes_asp.meanQALYs, color='green' ) asp_therapy_strategy = Econ.Strategy( name='Combination Therapy', cost_obs=multi_cohort_outcomes_asp.meanCosts, effect_obs=multi_cohort_outcomes_no.meanQALYs, color='blue' ) # do CEA CEA = Econ.CEA( strategies=[no_therapy_strategy, asp_therapy_strategy], if_paired=True ) # show the cost-effectiveness plane show_ce_figure(CEA=CEA) # report the CE table CEA.build_CE_table( interval_type='p', # prediction intervals alpha=D.ALPHA, cost_digits=0, effect_digits=2, icer_digits=2) # CBA NBA = Econ.CBA( strategies=[no_therapy_strategy, asp_therapy_strategy], if_paired=True ) # show the net monetary benefit figure NBA.graph_incremental_NMBs( min_wtp=0, max_wtp=50000, title='Cost-Benefit Analysis', x_label='Willingness-To-Pay for One Additional QALY ($)', y_label='Incremental Net Monetary Benefit ($)', interval_type='p', show_legend=True, figure_size=(6, 5) )
def report_CEA_CBA(sim_outcomes_amino, sim_outcomes_immuno): """ performs cost-effectiveness and cost-benefit analyses :param sim_outcomes_amino: outcomes of a cohort simulated under aminosalicylate therapy :param sim_outcomes_immuno: outcomes of a cohort simulated under immunosuppresive therapy """ # define two strategies amino_therapy_strategy = Econ.Strategy( name='Aminosalicylate Therapy', cost_obs=sim_outcomes_amino.costs, effect_obs=sim_outcomes_amino.numPatientsAlive, color='green') immuno_therapy_strategy = Econ.Strategy( name='Immunosuppresive Therapy', cost_obs=sim_outcomes_immuno.costs, effect_obs=sim_outcomes_immuno.numPatientsAlive, color='blue') # do CEA CEA = Econ.CEA( strategies=[amino_therapy_strategy, immuno_therapy_strategy], if_paired=False) # show the cost-effectiveness plane show_ce_figure(CEA=CEA) # report the CE table CEA.build_CE_table(interval_type='c', alpha=D.ALPHA, cost_digits=0, effect_digits=2, icer_digits=2) # CBA NBA = Econ.CBA( strategies=[amino_therapy_strategy, immuno_therapy_strategy], if_paired=False) # show the net monetary benefit figure NBA.graph_incremental_NMBs( min_wtp=0, max_wtp=50000, title='Cost-Benefit Analysis', x_label='Willingness-to-pay for one additional QALY ($)', y_label='Incremental Net Monetary Benefit ($)', interval_type='c', show_legend=True, figure_size=(6, 5))
def report_CEA_CBA(sim_outcomes_SOC, sim_outcomes_NSB): """ performs cost-effectiveness and cost-benefit analyses :param sim_outcomes_mono: outcomes of a cohort simulated under mono therapy :param sim_outcomes_combo: outcomes of a cohort simulated under combination therapy """ # define two strategies SOC_diagnostic_strategy = Econ.Strategy( name='SOC Diagnostic', cost_obs=sim_outcomes_SOC.costsPresenting, effect_obs=sim_outcomes_SOC.listYLLPresenting, color='green') sim_outcomes_NSB = Econ.Strategy( name='NSB Diagnostic', cost_obs=sim_outcomes_NSB.costsPresenting, effect_obs=sim_outcomes_NSB.listYLLPresenting, color='blue') # do CEA CEA = Econ.CEA(strategies=[SOC_diagnostic_strategy, sim_outcomes_NSB], if_paired=False, health_measure='d') # show the cost-effectiveness plane show_ce_figure(CEA=CEA) # report the CE table CEA.build_CE_table(interval_type='c', alpha=D.ALPHA, cost_digits=0, effect_digits=2, icer_digits=2) # CBA NBA = Econ.CBA(strategies=[SOC_diagnostic_strategy, sim_outcomes_NSB], if_paired=False) # show the net monetary benefit figure NBA.graph_incremental_NMBs( min_wtp=0, max_wtp=50000, title='Cost-Benefit Analysis', x_label='Willingness-to-pay for one additional YLL ($)', y_label='Incremental Net Monetary Benefit ($)', interval_type='c', show_legend=True, figure_size=(6, 5))
def report_CEA_CBA(sim_outcomes_none, sim_outcomes_treat): """ performs cost-effectiveness and cost-benefit analyses :param sim_outcomes_mono: outcomes of a cohort simulated under mono therapy :param sim_outcomes_combo: outcomes of a cohort simulated under combination therapy """ # define two strategies none_therapy_strategy = Econ.Strategy( name='No Therapy', cost_obs=sim_outcomes_none.costs, effect_obs=sim_outcomes_none.nTotalCured, color='green') treat_therapy_strategy = Econ.Strategy( name='Intervention to Increase Adherence', cost_obs=sim_outcomes_treat.costs, effect_obs=sim_outcomes_treat.nTotalCured, color='blue') # do CEA CEA = Econ.CEA(strategies=[none_therapy_strategy, treat_therapy_strategy], if_paired=False) # show the cost-effectiveness plane show_ce_figure(CEA=CEA) # report the CE table CEA.build_CE_table(interval_type='c', alpha=D.ALPHA, cost_digits=0, effect_digits=2, icer_digits=2) # CBA NBA = Econ.CBA(strategies=[none_therapy_strategy, treat_therapy_strategy], if_paired=False) # show the net monetary benefit figure NBA.graph_incremental_NMBs( min_wtp=0, max_wtp=1000, title='Cost-Benefit Analysis', x_label='Willingness-to-pay for one additional patient cured ($)', y_label='Incremental Net Monetary Benefit ($)', interval_type='c', show_legend=True, figure_size=(6, 5))
def report_CEA_CBA(sim_outcomes_NO, sim_outcomes_ASP): # define two strategies NO_therapy_strategy = Econ.Strategy(name='No Therapy', cost_obs=sim_outcomes_NO.costs, effect_obs=sim_outcomes_NO.utilities, color='green') ASP_therapy_strategy = Econ.Strategy(name='Aspirin Therapy', cost_obs=sim_outcomes_ASP.costs, effect_obs=sim_outcomes_ASP.utilities, color='blue') # do CEA CEA = Econ.CEA(strategies=[NO_therapy_strategy, ASP_therapy_strategy], if_paired=False) # show the cost-effectiveness plane show_ce_figure(CEA=CEA) # report the CE table CEA.build_CE_table(interval_type='c', alpha=D.ALPHA, cost_digits=0, effect_digits=2, icer_digits=2) # CBA NBA = Econ.CBA(strategies=[NO_therapy_strategy, ASP_therapy_strategy], if_paired=False) # show the net monetary benefit figure NBA.graph_incremental_NMBs( min_wtp=0, max_wtp=100000, title='Cost-Benefit Analysis', x_label='Willingness-to-pay for one additional QALY ($)', y_label='Incremental Net Monetary Benefit ($)', interval_type='c', show_legend=True, figure_size=(6, 5))
from SimPy import EconEvalClasses as ce import numpy as np np.random.seed(573) s_center = np.array([[10000, 0.2], [20000, 0.3], [50000, 0.35]]) s0 = ce.Strategy("s1", s_center[0, 0] + np.random.normal(0, 1000, 10), s_center[0, 1] + np.random.normal(0, 0.01, 10)) s1 = ce.Strategy("s1", s_center[1, 0] + np.random.normal(0, 1000, 10), s_center[1, 1] + np.random.normal(0, 0.01, 10)) s2 = ce.Strategy("s2", s_center[2, 0] + np.random.normal(0, 1000, 10), s_center[2, 1] + np.random.normal(0, 0.05, 10)) nmb_paired = ce.CBA([s0, s1, s2], if_paired=True) # list of frontier strategies as input nmb_indp = ce.CBA([s0, s1, s2], if_paired=False) # list of frontier strategies as input # Try NMB_Lines figure - paired CI nmb_paired.graph_deltaNMB_lines(0, 50000, "deltaNMB lines for paired CI", "wtp values", "NMB values", interval_type=ce.Interval.CONFIDENCE, show_legend=True, figure_size=6) # Try NMB_Lines figure - paired PI nmb_paired.graph_deltaNMB_lines(0, 50000,