Last data update: 2014.03.03

R: Draw a hazard ratio plot
HRplotR Documentation

Draw a hazard ratio plot

Description

Draw a hazard ratio plot

Usage

HRplot(out, type = 1, xlab = "", ylab = "", show.OR = TRUE,
  show.CI = FALSE, sig.level = 1, cex = 1.2, lwd = 2, pch = 18,
  col = NULL, ...)

Arguments

out

an object of class coxph or a resultant data.frame of mycph function

type

an integer indicating the type of plot. Default value is 1

xlab

a title for the x axis

ylab

a title for the y axis

show.OR

a logical vector indicating whether or not show the text indicating the p value

show.CI

a logical vector indicating whether or not show the text indicating the confidence interval

sig.level

a numeric value of upper limit of p value of showing variables

cex

A numerical value giving the amount by which plotting OR/HR symbols should be magnified relative to the default, defaulting 1.2.

lwd

The line width, a positive number, defaulting to 2.

pch

Either an integer specifying a symbol or a single character to be used as the default in plotting OR/HR points.

col

A specification for the default plotting color.

...

arguments to be passed to plot

Value

This function return NULL invisibly and draw graphs

Examples

require(survival)
attach(colon)
colon$TS=Surv(time,status==1)
out=mycph(TS~.,data=colon)
out
HRplot(out,type=1,pch=2,col=c("blue","red"))
HRplot(out,type=2,show.CI=TRUE,pch=2,cex=2,main="Hazard ratios of all individual variables")

Results