plot.nelsonaalen_npdf: Plot Nelson-Aalen estimates of group-specific cumulative...

Description Usage Arguments See Also Examples

View source: R/plot.npdf.R

Description

Plot Nelson-Aalen estimates of group-specific cumulative hazard from a nonparametric discrete frailty model

Usage

1
2
3
## S3 method for class 'nelsonaalen_npdf'
plot(x, xlim = NULL, ylim = NULL,
  xlab = NULL, ylab = NULL, cols = NULL, ...)

Arguments

x

Object returned by nelsonaalen_npdf representing Nelson-Aalen estimates from a nonparametric discrete frailty model

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 plot function

See Also

nelsonaalen_npdf

Examples

1
2
3
4
5
6
7
 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"))

fgaspe04/discfrail documentation built on May 17, 2019, 7:05 p.m.