powered by
Fits survival curves for each risk and group, treating other types of events as censoring.
fitSurvival(time, risk, group, cens = NULL, type = "kaplan-meier", conf.int = 0.95, conf.type = "log")
vector with times of the first event or follow-up, must be numeric.
vector with type of event, can be numeric or factor/character.
vector with group variable, can be numeric or factor/character.
value of 'risk' indicating censored observation (if NULL, the first value of 'risk' vector will be taken).
type of survival curve to be fitted. Possible values are "kaplan-meier" (default), "fleming-harrington" or "fh2".
level of two-sided confidence interval (default = 0.95).
type of confidence interval. Possible values: "none", "plain", "log" (default), "log-log".
List, which elements are survfit.summary objects from the package Survival for each risk separately.
survfit summary.survfit
survfit
summary.survfit
# NOT RUN { fitSurvival(time = LUAD$time, risk = LUAD$event, group = LUAD$gender, cens = "alive", type = "kaplan-meier", conf.int = 0.95, conf.type = "log") # }
Run the code above in your browser using DataLab