LogicReg (version 1.5.12)

cumhaz: Cumulative hazard transformation

Description

Transforms survival times using the cumulative hazard function.

Usage

cumhaz(y, d)

Arguments

y

vector of nonnegative survival times

d

vector of censoring indicators, should be the same length as y. If d is missing the data is assumed to be uncensored.

Value

A vector of transformed survival times.

References

Ruczinski I, Kooperberg C, LeBlanc ML (2003). Logic Regression, Journal of Computational and Graphical Statistics, 12, 475-511.

See Also

logreg

Examples

Run this code
# NOT RUN {
data(logreg.testdat)
#
# this is not survival data, but it shows the functionality
yy <- cumhaz(exp(logreg.testdat[,1]), logreg.testdat[, 2])
# then we would use
# logreg(resp=yy, cens=logreg.testdat[,2], type=5, ...
# insted of
# logreg(resp=logreg.testdat[,1], cens=logreg.testdat[,2], type=4, ...
# }

Run the code above in your browser using DataCamp Workspace