Description Usage Arguments Value Author(s) Examples
getCoxTable help get a model result of univariate and multivariate Cox regression Models.
1 2 3 4 5 6 7 | getCoxTable(data,
time.col,
status.col,
stepwise=F,direction="both",
cluster,control,
dig=2,
names = "test1")
|
data |
a data frame containing cluster,time and status value. |
time.col |
colnames of time value |
status.col |
colnames of status value |
stepwise |
Whether use stepwise strategy to simple multiple cox model |
direction |
method of stepwise.See MASS::stepAIC. |
cluster |
the cluster values like age and sex. |
dig |
2.the decimal place of output numeric value. |
names |
part of file name. |
a list containing results of univariate and multivariate models.
Weibin Huang
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(survival)
data(lung)
cluster = c("age","sex","ph.ecog","ph.karno","pat.karno")
## Not use stepwise
l1 <- getCoxTable(data=lung,
time.col="time",
status.col = "status",
cluster=cluster,
dig=2,
names = "a1")
## Use stepwise
l1 <- getCoxTable(data=lung,
time.col="time",
status.col = "status",
cluster=cluster,
stepwise=T,
dig=2,
names = "a2")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.