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