getHazard {PRIMEplus} | R Documentation |
Calls the coxph function to compute initial estimates for the baseline hazard
getHazard(time, treatment, event_status, t.fail.o=NULL)
time |
Vector of times. |
treatment |
Binary vector of treatments (1=subject received treatment). |
event_status |
Binary vector of event status (1=subject experienced an event). |
t.fail.o |
NULL or vector of event times. |
List containing the baseline hazards ordered by the event times.
Zhenzhen Xu <Zhenzhen.Xu@fda.hhs.gov> and Bin Zhu <bin.zhu@nih.gov>
data(data, package="PRIMEplus")
lambda0 <- getHazard(data[, "X"], data[, "trt"], data[, "event_status"])$hazard
lambda0[1:10]