fitSurvival: Estimation of survival curves for each risk separately

Description Usage Arguments Value See Also Examples

View source: R/fitAndTestSurvival.R

Description

Fits survival curves for each risk and group, treating other types of events as censoring.

Usage

1
2
fitSurvival(time, risk, group, cens = NULL, type = "kaplan-meier",
  conf.int = 0.95, conf.type = "log")

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 (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".

Value

List, which elements are survfit.summary objects from the package Survival for each risk separately.

See Also

survfit summary.survfit

Examples

1
2
fitSurvival(time = LUAD$time, risk = LUAD$event, group = LUAD$gender, cens = "alive",
type = "kaplan-meier", conf.int = 0.95, conf.type = "log")

geneticsMiNIng/cr17 documentation built on Sept. 16, 2019, 7:23 a.m.