plot.survomatic: Plot Survomatic Object

Description Usage Arguments Details Value See Also Examples

Description

Plot a survomatic object.

Usage

1
plot.survomatic(xx, what = c("srv", "haz", "den"), col = c("black", "black", "darkred", "darkred"), lwd = c(2, 2, 2, 2), lty = c(1, 2, 1, 2), xlim = NULL)

Arguments

xx

A survomatic object (as produced by the survwrapper function).

what

"srv" will plot a survival curve, "haz" will plot a hazard function, and "den" will plot a density function.

col

Line colors for the first group data, the first group predicted values, the second group data, and the second group predicted values, respectively.

lwd

Line widths for the first group data, the first group predicted values, the second group data, and the second group predicted values, respectively.

lty

Line types for the first group data, the first group predicted values, the second group data, and the second group predicted values, respectively.

xlim

Range for x-axis, passed to plot.

Details

For what="surv" plots ordinary survival curves. For what="haz" and what="den" also plots predicted values. To suppress one or the other, set the first and third or the second and fourth values of the col argument to NA.

Value

NULL

See Also

survwrapper

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Generate two sets of survival times.
population1 <- simsurv(250,type='g',p=c(7.33e-4,0.1227,0,0));
population2 <-
simsurv(200,type='lm',p=c(5.4818e-5,0.1543,0.0023,0.6018));
     
## Fit models to the populations and compare the parameters.
models1vs2 <- survwrapper(population1,population2);

## Plot the resulting survomatic object
plot(models1vs2)

bokov/powertrip documentation built on May 12, 2019, 11:33 p.m.