Learn R Programming

eha (version 1.2-18)

plot.phreg: Plots output from a Weibull regression

Description

Just a simple plot of the hazard functions for each stratum.

Usage

plot.phreg(x, fn = c("haz", "cum", "den", "sur"), main = NULL,
xlim = NULL, ylim = NULL, xlab = "Duration", ylab = "",
new.data = x$means, ...)

Arguments

x
A phreg 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'

Value

  • No return value.

Details

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

See Also

phreg

Examples

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

Run the code above in your browser using DataLab