Learn R Programming

PRIMEplus (version 1.0.16)

getHazard: Compute initial estimates for the baseline hazard

Description

Calls the coxph function to compute initial estimates for the baseline hazard

Usage

getHazard(time, treatment, event_status, t.fail.o=NULL)

Value

List containing the baseline hazards ordered by the event times.

Arguments

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.

Author

Zhenzhen Xu <Zhenzhen.Xu@fda.hhs.gov> and Bin Zhu <bin.zhu@nih.gov>

See Also

PRIMEplus.EM

Examples

Run this code
  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