plot.coxph: Draw a forestplot to visualize multivariate Cox regression...

Description Usage Arguments Details See Also Examples

View source: R/plot.coxph.R

Description

Draw a forestplot to visualize multivariate Cox regression analysis results.

Usage

1
plot.coxph(coxTable, coxObj=NULL, clip=c(0,8), variable.display=NULL, ...)

Arguments

coxTable

A multivariate Cox regression table in user specified format.

coxObj

A multivariate Cox regression object from coxph.

clip

CI out of which is clipped.

variable.display

Variable names expected to display.

...

More variables passed to forestplot, e.g. xlog.

Details

See examples to check how to prepare a coxTable.

See Also

forestplot,survdiff,survfit,coxph

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data("plot.coxph", package='lxctk')
plot.coxph(coxTable=coxTable)
plot.coxph(coxObj=coxObj)

########Set user specified variable names############
data("crcdat", package='lxctk')
crcdat$MSI <- as.factor(crcdat$MSI>0)
crcdat$Gender <- as.character(crcdat$Gender)
crcdat$Gender <- relevel(as.factor(crcdat$Gender), ref='F')
crcdat$TNM <- relevel(as.factor(crcdat$TNM), ref=1)
crcdat$Tumor.localisation <- relevel(as.factor(crcdat$Tumor.localisation), ref=1)
crcdat$signature <- as.factor(crcdat$signature)
crcdat$Kras_G12_13X <- relevel(as.factor(crcdat$Kras_G12_13X), ref=0)

f <- Surv(Survival.month, status) ~ Age+Gender+MSI+TNM+Tumor.localisation+hypermutated+Kras_G12_13X+signature
r <- coxph(f, crcdat)
plot.coxph(coxObj=r)

########Set user specified variable names############
variable.display <- c('Age', 'Gender (M vs. F)', 'MSI (+ vs. -)', 'TNM (2 vs. 1)', 'TNM (3 vs. 1)', 'TNM (4 vs. 1)', 'Tumor site (2 vs. 1)', 'Hypermutated (True vs. False)', 'Kras_G12_13X (True vs. False)', 'Signature (True vs. False)')
plot.coxph(coxObj=r, variable.display=variable.display)

lixiangchun/lxctk documentation built on May 21, 2019, 6:44 a.m.