survregraph {RRJ}R Documentation

make a survival graphic from a survreg model

Description

survregraph is a function for make a survival graphic with a survreg model.

Usage

survregraph(model,survtime=NULL,ylab="Mortalidade",
            xlab="Tempo",log=FALSE,fac.names=NULL,
            legx=NULL,legy=NULL,use.color=TRUE,inverse=FALSE)

Arguments

model (Object). The survreg ajusted model.
survtime (Numerical). The last observation survtime, automatically calculated, but can be set manually.
ylab (String). The y-axis label.
xlab (String). The x-axis label.
log (Logical). If TRUE, the y-axis log scale is used.
fac.names (String). The factors names.
legx (Numerical). The x coordinate for the legend location. The default is NULL and locator() function is used
legy (Numerical). The y coordinate for the legend location. The default is NULL and locator() function is used
use.color (Logical). If TRUE (default) graphics is made with different colors, if FALSE different symbols (lines and points) are used instead colors.
inverse (Logical). If TRUE make a inverse of survival graph.

Acknowledgements

I thank all R-help list's contributors for yours, direct or indirect, contributions in this function.

Author(s)

Ronaldo Reis Jr. <chrysopa@insecta.ufv.br>

Examples

data(roaches)
attach(roaches)
library(survival)

model.1 <- survreg(Surv(dtime,censor)~trat)
survregraph(model.1)
rm(roaches)
detach(roaches)

[Package RRJ version 0.6.3 Index]