plot.aftreg: Plots output from an AFT regression

View source: R/plot.aftreg.R

plot.aftregR Documentation

Plots output from an AFT regression

Description

Just a simple plot of the hazard (cumulative hazard, density, survival) functions for each stratum.

Usage

## S3 method for class 'aftreg'
plot(
  x,
  fn = c("haz", "cum", "den", "sur"),
  main = NULL,
  xlim = NULL,
  ylim = NULL,
  xlab = "Duration",
  ylab = "",
  col,
  lty,
  printLegend = TRUE,
  new.data = x$means,
  ...
)

Arguments

x

A aftreg object

fn

Which functions shoud be plotted! Default is all. They will scroll by, so you have to take care of explicitly what you want to be produced. See, eg, par(mfrow = ...)

main

Header for the plot

xlim

x limits

ylim

y limits

xlab

x label

ylab

y label

col

Colors?

lty

Line types?

printLegend

Should legend be printed? Default is yes.

new.data

At which covariate values?

...

Extra parameters passed to 'plot'

Details

The plot is drawn at the mean values of the covariates, by default.

Value

No return value.

Author(s)

Göran Broström

See Also

aftreg

Examples


y <- rllogis(40, shape = 1, scale = 1)
x <- rep(c(1,1,2,2), 10)
fit <- aftreg(Surv(y, rep(1, 40)) ~ x, dist = "loglogistic")
plot(fit)


goranbrostrom/eha documentation built on June 19, 2024, 1:39 a.m.