Exemplo n.º 1
0
def print_comparative_outcomes(multi_trees_P, multi_trees_N):
    """ prints average increase in discounted cost, and discounted utility
    under combination therapy compared to mono therapy
    :param multi_trees_P: outcomes of a multi-trees simulated under Palivizumab
    :param multi_trees_N: outcomes of a multi-trees simulated under no prophylaxis
    """

    # increase in mean discounted cost under combination therapy with respect to mono therapy
    increase_mean_discounted_cost = Stat.DifferenceStatPaired(
        name='Increase in mean discounted cost',
        x=multi_trees_P.PCosts,
        y_ref=multi_trees_N.NCosts)

    # estimate and PI
    estimate_PI = increase_mean_discounted_cost.get_formatted_mean_and_interval(interval_type='p',
                                                                                alpha=D.ALPHA,
                                                                                deci=2,
                                                                                form=',')
    print("Increase in mean discounted cost and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean discounted QALY under combination therapy with respect to mono therapy
    increase_mean_discounted_qaly = Stat.DifferenceStatPaired(
        name='Increase in mean discounted QALY',
        x=multi_trees_P.PQALYs,
        y_ref=multi_trees_N.NQALYs)

    # estimate and PI
    estimate_PI = increase_mean_discounted_qaly.get_formatted_mean_and_interval(interval_type='p',
                                                                                alpha=D.ALPHA,
                                                                                deci=2)
    print("Increase in mean discounted utility and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)
Exemplo n.º 2
0
def print_comparative_outcomes(multi_cohort_outcomes_no, multi_cohort_outcomes_asp):
    """ prints average increase in survival time, discounted cost, and discounted utility
    under combination therapy compared to mono therapy
    :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
    """

    # increase in mean survival time under combination therapy with respect to mono therapy
    increase_mean_survival_time = Stat.DifferenceStatPaired(
        name='Increase in mean survival time',
        x=multi_cohort_outcomes_asp.meanSurvivalTimes,
        y_ref=multi_cohort_outcomes_no.meanSurvivalTimes)

    # estimate and PI
    estimate_PI = increase_mean_survival_time.get_formatted_mean_and_interval(interval_type='p',
                                                                              alpha=D.ALPHA,
                                                                              deci=2)
    print("Increase in mean survival time and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean discounted cost under combination therapy with respect to mono therapy
    increase_mean_discounted_cost = Stat.DifferenceStatPaired(
        name='Increase in mean discounted cost',
        x=multi_cohort_outcomes_asp.meanCosts,
        y_ref=multi_cohort_outcomes_no.meanCosts)

    # estimate and PI
    estimate_PI = increase_mean_discounted_cost.get_formatted_mean_and_interval(interval_type='p',
                                                                                alpha=D.ALPHA,
                                                                                deci=2,
                                                                                form=',')
    print("Increase in mean discounted cost and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean discounted QALY under combination therapy with respect to mono therapy
    increase_mean_discounted_qaly = Stat.DifferenceStatPaired(
        name='Increase in mean discounted QALY',
        x=multi_cohort_outcomes_asp.meanQALYs,
        y_ref=multi_cohort_outcomes_no.meanQALYs)

    # estimate and PI
    estimate_PI = increase_mean_discounted_qaly.get_formatted_mean_and_interval(interval_type='p',
                                                                                alpha=D.ALPHA,
                                                                                deci=2)
    print("Increase in mean discounted utility and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)
Exemplo n.º 3
0
def mytest_diff_stat_paired(x, y):
    # define
    stat = Stat.DifferenceStatPaired('Test DifferenceStatPaired', x, y)
    print('Testing DifferenceStatPaired:')
    print_results(stat)
Exemplo n.º 4
0
def print_comparative_outcomes(multi_cohort_outcomes_SOC, multi_cohort_outcomes_NSB):
    """ prints average increase in survival time, discounted cost, and discounted utility
    under combination therapy compared to mono therapy
    :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
    """

    # increase in mean survival time under combination therapy with respect to mono therapy
    increase_mean_survival_time = Stat.DifferenceStatPaired(
        name='Increase in mean survival time',
        x=multi_cohort_outcomes_NSB.meanSurvivalTimes,
        y_ref=multi_cohort_outcomes_SOC.meanSurvivalTimes)

    # estimate and PI
    estimate_PI = increase_mean_survival_time.get_formatted_mean_and_interval(interval_type='p',
                                                                              alpha=D.ALPHA,
                                                                              deci=2)
    print("Increase in mean survival time and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean number of hospitalizations
    increase_mean_nHosp = Stat.DifferenceStatPaired(
        name='Increase in mean number of kids hospitalized',
        x=multi_cohort_outcomes_NSB.nHospitalized,
        y_ref=multi_cohort_outcomes_SOC.nHospitalized)

    # estimate and PI
    estimate_PI = increase_mean_nHosp.get_formatted_mean_and_interval(interval_type='p',
                                                                              alpha=D.ALPHA,
                                                                              deci=2)
    print("Increase in mean number of hospitalizations and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean number of YLLs
    increase_mean_YLLs = Stat.DifferenceStatPaired(
        name='Increase in mean number of Years of Life Lost',
        x=multi_cohort_outcomes_NSB.totalYLL,
        y_ref=multi_cohort_outcomes_SOC.totalYLL)

    # estimate and PI
    estimate_PI = increase_mean_YLLs.get_formatted_mean_and_interval(interval_type='p',
                                                                              alpha=D.ALPHA,
                                                                              deci=2)
    print("Increase in mean number of Years of Life Lost and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean number of patients w/ TBM
    increase_mean_TBM = Stat.DifferenceStatPaired(
        name='Increase in mean number of cases of TB meningitis',
        x=multi_cohort_outcomes_NSB.nTBM,
        y_ref=multi_cohort_outcomes_SOC.nTBM)

    # estimate and PI
    estimate_PI = increase_mean_TBM.get_formatted_mean_and_interval(interval_type='p',
                                                                              alpha=D.ALPHA,
                                                                              deci=2)
    print("Increase in mean number of cases of TB meningitis and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean 2-month mortality
    increase_mean_mortality2Month = Stat.DifferenceStatPaired(
        name='Increase in mean 2-month mortality',
        x=multi_cohort_outcomes_NSB.mortality2Month,
        y_ref=multi_cohort_outcomes_SOC.mortality2Month)

    # estimate and PI
    estimate_PI = increase_mean_mortality2Month.get_formatted_mean_and_interval(interval_type='p',
                                                                              alpha=D.ALPHA,
                                                                              deci=2)
    print("Increase in mean 2-month mortality and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean 2-year mortality
    increase_mean_mortality2Year = Stat.DifferenceStatPaired(
        name='Increase in mean 2-year mortality',
        x=multi_cohort_outcomes_NSB.mortality2Years,
        y_ref=multi_cohort_outcomes_SOC.mortality2Years)

    # estimate and PI
    estimate_PI = increase_mean_mortality2Year.get_formatted_mean_and_interval(interval_type='p',
                                                                              alpha=D.ALPHA,
                                                                              deci=2)
    print("Increase in mean 2-year mortality and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean 5-year mortality
    increase_mean_mortality5Year = Stat.DifferenceStatPaired(
        name='Increase in mean 5-year mortality',
        x=multi_cohort_outcomes_NSB.mortality5Years,
        y_ref=multi_cohort_outcomes_SOC.mortality5Years)

    # estimate and PI
    estimate_PI = increase_mean_mortality5Year.get_formatted_mean_and_interval(interval_type='p',
                                                                              alpha=D.ALPHA,
                                                                              deci=2)
    print("Increase in mean 5-year mortality and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)

    # increase in mean discounted cost under combination therapy with respect to mono therapy
    increase_mean_discounted_cost = Stat.DifferenceStatPaired(
        name='Increase in mean discounted cost',
        x=multi_cohort_outcomes_NSB.meanCosts,
        y_ref=multi_cohort_outcomes_SOC.meanCosts)

    # estimate and PI
    estimate_PI = increase_mean_discounted_cost.get_formatted_mean_and_interval(interval_type='p',
                                                                                alpha=D.ALPHA,
                                                                                deci=2,
                                                                                form=',')
    print("Increase in mean discounted cost and {:.{prec}%} uncertainty interval:"
          .format(1 - D.ALPHA, prec=0),
          estimate_PI)