compHaz {eha}R Documentation

Graphical comparison of cumulative hazards

Description

Comparison of the estimated baseline cumulative hazards functions for two survival models.

Usage

compHaz(
  fit1,
  fit2,
  main = NULL,
  lty = 1:2,
  col = c("red", "blue"),
  printLegend = TRUE
)

Arguments

fit1

An object of type "coxreg", "phreg", or other output from from survival fitters.

fit2

An object of type "coxreg", "phreg", or other output from survival fitters.

main

Header for the plot. Default is NULL.

lty

line types.

col

Line colors. should be NULL (black lines) or of length 2.

printLegend

Should a legend be printed? Default is TRUE.

Value

No return value.

Author(s)

Göran Broström

See Also

hazards, coxreg, and phreg.

Examples


fit.cr <- coxreg(Surv(enter, exit, event) ~ sex, data = oldmort)
fit.w <- phreg(Surv(enter, exit, event) ~ sex, data = oldmort)
compHaz(fit.cr, fit.w)

[Package eha version 2.11.4 Index]