Learn R Programming

LogicReg (version 1.6.6)

cumhaz: Cumulative hazard transformation

Description

Transforms survival times using the cumulative hazard function.

Usage

cumhaz(y, d)

Value

A vector of transformed survival times.

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.

Author

Ingo Ruczinski ingo@jhu.edu and Charles Kooperberg clk@fredhutch.org.

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
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 DataLab