Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.weibreg

Plots output from a Weibull regression


Description

Plot(s) of the hazard, density, cumulative hazards, and/or the survivor function(s) for each stratum.

Usage

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

Arguments

x

A weibreg object

fn

Which functions shoud be plotted! Default is all. They will scroll by, so you have to take care explicitely 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

new.data

At which covariate values?

...

Extra parameters passed to 'plot'

Details

The plot is drawn at the mean values of the covariates.

Value

No return value

Author(s)

Göran Broström

See Also

Examples

y <- rweibull(4, shape = 1, scale = 1)
x <- c(1,1,2,2)
fit <- weibreg(Surv(y, c(1,1,1,1)) ~ x)
plot(fit)

eha

Event History Analysis

v2.10.0
GPL (>= 2)
Authors
Göran Broström [aut, cre], Jianming Jin [ctb]
Initial release
2022-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.