balanced.hazard.ratio {survcomp} | R Documentation |
Function to compute the balanced hazard ratio for a risk group prediction.
balanced.hazard.ratio(x, surv.time, surv.event, alpha = 0.05, method.test = c("logrank", "likelihood.ratio", "wald"), ties = c("efron", "breslow", "exact"), weights, strat, ...)
x |
a vector of risk group predictions. |
surv.time |
a vector of event times. |
surv.event |
a vector of event occurrence indicators. |
alpha |
alpha level to compute confidence interval. |
method.test |
... |
ties |
... |
weights |
... |
strat |
... |
... |
additional parameters to be passed to the |
The balanced hazard ratio is computed using the Cox model.
balanced.hazard.ratio |
balanced hazard ratio estimate. |
coef |
coefficient (beta) estimated in the cox regression model. |
se |
standard error of the coefficient (beta) estimate. |
lower |
lower bound for the confidence interval. |
upper |
upper bound for the confidence interval. |
p.value |
p-value computed using the score (logrank) test whether the balanced hazard ratio is different from 1. |
n |
number of samples used for the estimation. |
coxm |
|
data |
list of data used to compute the balanced hazard ratio ( |
Samuel Branders
Branders, S. and Dupont, P. (2015) "A balanced hazard ratio for risk group evaluation from survival data", Statistics in Medicine, 34(17), pages 2528–2543.
hazard.ratio
, coxph
, coxph.object
set.seed(12345) age <- rnorm(100, 50, 10) stime <- rexp(100) cens <- runif(100,.5,2) sevent <- as.numeric(stime <= cens) stime <- pmin(stime, cens) strat <- sample(1:3, 100, replace=TRUE) weight <- runif(100, min=0, max=1) balanced.hazard.ratio(x=age, surv.time=stime, surv.event=sevent, weights=weight, strat=strat)