plot.cum {eha} | R Documentation |
Nelson-Aalen plots.
plot.cum(x, group=rep(1, length(exit)), main="Cumulative hazards function(s)", xlab="Duration", ylab="", log.scale = FALSE, ...)
x |
A Surv object. |
group |
Defines a partition of the data. One survivor function
for each level of group is drawn. |
main |
Header of the plot. |
xlab |
Label of the x axis. |
ylab |
Label of the y axis. |
log.scale |
If TRUE, plotting is done on a log-log scale. Default is FALSE |
... |
Anything that plot likes... |
Left truncation is allowed. Note, though, that this fact may result in strange estimated curves due to lack of data in certain (low) ages.
No value is returned.
Göran Broström
time0 <- numeric(50) group <- c(rep(0, 25), rep(1, 25)) time1 <- rexp( 50, exp(group) ) event <- rep(1, 50) plot.cum(Surv(time0, time1, event), group) plot.cum(Surv(time0, time1, event), group, log.scale = TRUE)