Пример #1
0
def print_comparative_outcomes(sim_outcomes_none, sim_outcomes_treat):
    """ prints average increase in survival time, discounted cost, and discounted utility
    under combination therapy compared to mono therapy
    :param sim_outcomes_mono: outcomes of a cohort simulated under mono therapy
    :param sim_outcomes_combo: outcomes of a cohort simulated under combination therapy
    """

    # increase in number of strokes
    change_n_cured = Stat.DifferenceStatIndp(
        name='Change in number of patients cured',
        x=sim_outcomes_treat.nTotalCured,
        y_ref=sim_outcomes_none.nTotalCured)

    estimate_CI = change_n_cured.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2)

    print(
        "Change in the number of patients cured:".format(1 - D.ALPHA, prec=0),
        estimate_CI)

    # increase in mean discounted cost under combination therapy with respect to mono therapy
    increase_discounted_cost = Stat.DifferenceStatIndp(
        name='Increase in mean discounted cost',
        x=sim_outcomes_treat.costs,
        y_ref=sim_outcomes_none.costs)

    # estimate and CI
    estimate_CI = increase_discounted_cost.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2, form=',')

    print(
        "Increase in mean discounted cost and {:.{prec}%} confidence interval:"
        .format(1 - D.ALPHA, prec=0), estimate_CI)
Пример #2
0
def print_comparative_outcomes(sim_outcomes_amino, sim_outcomes_immuno):
    """ prints average increase in survival time, discounted cost, and discounted utility
    under immunosuppresive therapy compared to aminosalicylate therapy
    :param sim_outcomes_amino: outcomes of a cohort simulated under mono therapy
    :param sim_outcomes_immuno: outcomes of a cohort simulated under combination therapy
    """

    # increase in mean survival time under immuno therapy with respect to amino therapy
    increase_survival_time = Stat.DifferenceStatIndp(
        name='Increase in mean survival time',
        x=sim_outcomes_immuno.survivalTimes,
        y_ref=sim_outcomes_amino.survivalTimes)

    # estimate and CI
    estimate_CI = increase_survival_time.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2)
    print(
        "Increase in mean survival time and {:.{prec}%} confidence interval:".
        format(1 - D.ALPHA, prec=0), estimate_CI)

    # increase in mean discounted cost under immuno therapy with respect to amino therapy
    increase_discounted_cost = Stat.DifferenceStatIndp(
        name='Increase in mean discounted cost',
        x=sim_outcomes_immuno.costs,
        y_ref=sim_outcomes_amino.costs)

    # estimate and CI
    estimate_CI = increase_discounted_cost.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2, form=',')
    print(
        "Increase in mean discounted cost and {:.{prec}%} confidence interval:"
        .format(1 - D.ALPHA, prec=0), estimate_CI)
    #
    # increase in number of patients alive under immuno therapy with respect to amino therapy
    increase_patients_alive = Stat.DifferenceStatIndp(
        name='Increase in mean number of patients alive',
        x=sim_outcomes_immuno.numPatientsAlive,
        y_ref=sim_outcomes_amino.numPatientsAlive)

    # estimate and CI
    estimate_CI = increase_patients_alive.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2)
    print(
        "Increase in mean number of patients alive and {:.{prec}%} confidence interval:"
        .format(1 - D.ALPHA, prec=0), estimate_CI)
Пример #3
0
def print_comparative_outcomes(sim_outcomes_SOC, sim_outcomes_NSB):
    """
    :param sim_outcomes_SOC: outcomes of a cohort simulated under SOC diagnostics
    :param sim_outcomes_NSB: outcomes of a cohort simulated under NSB diagnostics
    """

    # increase in mean survival time under combination therapy with respect to mono therapy
    increase_survival_time = Stat.DifferenceStatIndp(
        name='Increase in mean survival time',
        x=sim_outcomes_combo.survivalTimes,
        y_ref=sim_outcomes_mono.survivalTimes)

    # estimate and CI
    estimate_CI = increase_survival_time.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2)
    print(
        "Increase in mean survival time and {:.{prec}%} confidence interval:".
        format(1 - D.ALPHA, prec=0), estimate_CI)

    # increase in mean discounted cost under combination therapy with respect to mono therapy
    increase_discounted_cost = Stat.DifferenceStatIndp(
        name='Increase in mean discounted cost',
        x=sim_outcomes_combo.costs,
        y_ref=sim_outcomes_mono.costs)

    # estimate and CI
    estimate_CI = increase_discounted_cost.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2, form=',')
    print(
        "Increase in mean discounted cost and {:.{prec}%} confidence interval:"
        .format(1 - D.ALPHA, prec=0), estimate_CI)

    # increase in mean discounted utility under combination therapy with respect to mono therapy
    increase_discounted_utility = Stat.DifferenceStatIndp(
        name='Increase in mean discounted utility',
        x=sim_outcomes_combo.utilities,
        y_ref=sim_outcomes_mono.utilities)

    # estimate and CI
    estimate_CI = increase_discounted_utility.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2)
    print(
        "Increase in mean discounted utility and {:.{prec}%} confidence interval:"
        .format(1 - D.ALPHA, prec=0), estimate_CI)
Пример #4
0
def print_comparative_outcomes(sim_outcomes_NO, sim_outcomes_ASP):

    # increase in mean survival time under therapy with respect to no therapy
    decrease_survival_time = Stat.DifferenceStatIndp(
        name='Increase in mean survival time',
        x=sim_outcomes_ASP.survivalTimes,
        y_ref=sim_outcomes_NO.survivalTimes)

    # estimate and CI
    estimate_CI = decrease_survival_time.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2)
    print(
        "Increase in mean survival time and {:.{prec}%} confidence interval:".
        format(1 - D.ALPHA, prec=0), estimate_CI)

    # increase in mean discounted cost under therapy with respect to no therapy
    increase_discounted_cost = Stat.DifferenceStatIndp(
        name='Increase in mean discounted cost',
        x=sim_outcomes_ASP.costs,
        y_ref=sim_outcomes_NO.costs)

    # estimate and CI
    estimate_CI = increase_discounted_cost.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2, form=',')
    print(
        "Increase in mean discounted cost and {:.{prec}%} confidence interval:"
        .format(1 - D.ALPHA, prec=0), estimate_CI)

    # increase in mean discounted utility under combination therapy with respect to no therapy
    increase_discounted_utility = Stat.DifferenceStatIndp(
        name='Increase in mean discounted utility',
        x=sim_outcomes_ASP.utilities,
        y_ref=sim_outcomes_NO.utilities)

    # estimate and CI
    estimate_CI = increase_discounted_utility.get_formatted_mean_and_interval(
        interval_type='c', alpha=D.ALPHA, deci=2)
    print(
        "Increase in mean discounted utility and {:.{prec}%} confidence interval:"
        .format(1 - D.ALPHA, prec=0), estimate_CI)
Пример #5
0
def mytest_diff_stat_indp(x, y):
    # define
    stat = Stat.DifferenceStatIndp('Test DifferenceStatIndp', x, y)
    print('Testing DifferenceStatIndp:')
    print_results(stat)