simpleCox: Cox model for each type of event separately

Description Usage Arguments Value See Also Examples

Description

fits Cox models for each risk and group, treating other type of events as censoring.

Usage

1
fitCox(time, risk, group, cens = NULL, conf.int = 0.95)

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).

conf.int

conf.int level of two-sided confidence interval (default = 0.95).

Value

a list of length n, where n is number of risks. Each element of a list is a result of summary.coxph function from package survival, where there is only one type of event possible (other are treating as censored).

See Also

coxph summary.coxph

Examples

1
fitCox(time = LUAD$time, risk = LUAD$event, group = LUAD$gender, cens = "alive", conf.int = 0.95)

cr17 documentation built on May 1, 2019, 7:31 p.m.