plot.nelsonaalen_npdf | R Documentation |
Plot Nelson-Aalen estimates of group-specific cumulative hazard from a nonparametric discrete frailty model
## S3 method for class 'nelsonaalen_npdf'
plot(x, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL, cols = NULL, ...)
x |
Object returned by |
xlim |
x-axis limits (vector of 2) |
ylim |
x-axis limits (vector of 2) |
xlab |
x-axis label |
ylab |
y-axis label |
cols |
vector of colour names or numbers, of the same length as the number of groups |
... |
options to pass to the generic |
nelsonaalen_npdf
x = npdf_cox( Surv(time, status) ~ x, groups=family, data=weibdata2030, K = 2,
estK=FALSE, eps_conv=10^-4)
object = nelsonaalen_npdf( x )
plot( object )
plot( object, xlim=c(0,200), ylim=c(0,2),
xlab="Follow-up days", ylab="Nelson-Aalen estimate",
cols=ifelse(x$belonging==2, "purple", "black"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.