Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

Relative hazard function

g(h_T(t),h_C(t)) = HR(t)

Maps the hazards of an event in a treatment group and a comparator group at the same time t to their ratio. Under proportional hazards the ratio is constant over time, and it can then be applied to a baseline survival curve or a baseline transition probability to obtain absolute outcomes for the treatment group.

  • Hazard ratio from a Cox regression coefficient

    HR = exp(beta)

    Converts the estimated coefficient for a binary treatment covariate in a Cox or other proportional hazards regression into the hazard ratio. The function exp is the exponential function.

  • Treatment survival from a baseline curve under proportional hazards

    S_T = S_C^HR

    Applies a constant hazard ratio to the comparator survival probability at time t to give the treatment survival probability at the same time. It follows because the cumulative hazard of the treatment group is HR times that of the comparator. The comparator curve supplies the absolute level; the ratio alone cannot.

  • Treatment-arm transition probability from a hazard ratio

    p_T = 1 - (1 - p_C)^HR

    Applies a hazard ratio to a comparator transition probability for one model cycle. The comparator probability is converted to a rate, the rate is multiplied by the hazard ratio, and the result is converted back, which reduces to a single power. The conversions are set out on the Transition Probability page.