Description Usage Arguments Value See Also Examples
View source: R/fitAndTestSurvival.R
Fits survival curves for each risk and group, treating other types of events as censoring.
1 2 | fitSurvival(time, risk, group, cens = NULL, type = "kaplan-meier",
conf.int = 0.95, conf.type = "log")
|
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 (if NULL, the first value of 'risk' vector will be taken). |
type |
type of survival curve to be fitted. Possible values are "kaplan-meier" (default), "fleming-harrington" or "fh2". |
conf.int |
level of two-sided confidence interval (default = 0.95). |
conf.type |
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.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.