October 2017
Beginner to intermediate
572 pages
26h 1m
English
Using the basehaz function will compute the hazard estimator for the Cox model using the Breslow estimator, which will be the same as the Nelson-Aalen estimator. It can also be computed using the cumsum function, which returns cumulative sums. The hazard function is simply an event divided by risk and can be computed using the following:
> nm = cumsum(ss$n.event/ss$n.risk)
If we compare the value of the nm variable with the n variable, they will be same.
Read now
Unlock full access