Learn R Programming

cr17 (version 0.1.0)

testSurvival: Fleming-Harrington test for differences between groups

Description

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

Usage

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

Run this code
# NOT RUN {
testSurvival(time = LUAD$time, risk = LUAD$event, group = LUAD$gender, cens = "alive", rho = 0)
# }

Run the code above in your browser using DataLab