fits Cox model for every type of an event including occuring of competing risks.

fitReg(time, risk, group, cens = NULL)

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

Value

a list of length n, where n is number of different types of events. Each element of a list is a result of crr function from cmprsk package for given type of event.

See also

crr

Examples

fitReg(time = LUAD$time, risk = LUAD$event, group = LUAD$gender, cens = "alive")
#> 19 cases omitted due to missing values #> 19 cases omitted due to missing values
#> $death #> convergence: TRUE #> coefficients: #> covMatrix1 #> -0.04556 #> standard errors: #> [1] 0.1988 #> two-sided p-values: #> covMatrix1 #> 0.82 #> #> $new_tumor #> convergence: TRUE #> coefficients: #> covMatrix1 #> -0.04065 #> standard errors: #> [1] 0.3604 #> two-sided p-values: #> covMatrix1 #> 0.91 #>