Tests, if there are differences between groups for survival curves estimating for all risks separately (treating other events as censoring).

testSurvival(time, risk, group, cens = 0, rho = 0)

Arguments

time

vector with times of the first event or follow-up, must be numeric.

risk

vector with type of event, can be numeric or factor/character.

group

vector with group variable, can be numeric or factor/character.

cens

value of 'risk' indicating censored observation (default 0).

rho

rho parameter from Fleming-Harrington Test.

Value

a data.frame containing p-values of Fleming-Harrington Test for each risk.

See also

survdiff

Examples

testSurvival(time = LUAD$time, risk = LUAD$event, group = LUAD$gender, cens = "alive", rho = 0)
#> death new_tumor #> Fleming-Harrington test 0.76 0.99