plot.cumahaz {ahaz}R Documentation

Plot a cumahaz object

Description

Plots the Breslow estimate of cumulative hazard function, as obtained from the predict.ahaz

Usage

## S3 method for class 'cumahaz'
plot(x, ...)  

Arguments

x

Result of a call to the predict.ahaz function with option type="cumhaz".

...

Additional graphical arguments passed to the plot function.

See Also

predict.ahaz, predict.ahazpen

Examples

data(sorlie)

# Break ties
set.seed(10101)
time <- sorlie$time+runif(nrow(sorlie))*1e-2

# Survival data + covariates
surv <- Surv(time,sorlie$status)
X <- as.matrix(sorlie[,15:24])

# Fit additive hazards regression model
fit <- ahaz(surv, X)

# Cumulative hazard
cumhaz <- predict(fit, type="cumhaz")
plot(cumhaz)

[Package ahaz version 1.15 Index]