plot.nelsonaalen_npdf {discfrail}R Documentation

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

Description

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

Usage

## 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


 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"))


[Package discfrail version 0.1 Index]