JS.aicu: General survival statistics for univariable analysis (AIC)

Description Usage Arguments Value Examples

Description

JS.aicu output the table with general survival analysis result with HR(95% Confidence Interval),P value and Akaike's An Information Criterion. This function only change the format of the output table.

Usage

1

Arguments

...

arguments will be passed to coxph

Value

A dataframe of coxph output including HR(95% Confidence Interval), P value and AIC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
Model_1 <- JS.aicu (Surv(as.numeric(surdate), scensor) ~ as.factor(isup_m_new) , data = D1)
Model_2 <- JS.aicu (Surv(as.numeric(surdate), scensor) ~ as.factor(FurhmanGrade_new), data = D2)
...
Model_5 <- JS.aicu (Surv(as.numeric(surdate), scensor) ~ as.factor(isup_m_new) + as.factor(Necrosis), data = D1)
output_f <- rbind(Model_1, Model_2, Model_3, Model_4, Model_5)
row.names(output_f) <- c(1:length(row.names(output_f)))

rtf output
rtf<-RTF("Table_survival.doc",width = 8.5, height = 11, font.size = 10, omi = c(1,1,1,1))
addHeader(rtf,title="Table1, Survival Analysis ")
addTable(rtf, output_f, font.size = 10, row.names = F, NA.string="-", col.widths = c(rep(1.5, 4) ) )
done(rtf)

Rmarkdown output
save(out,plot1, file='myfile.Rda')

Then open at markdown file
library(knitr)
output <- load("H:/Projects/myfile.Rda")
kable(output, format = "markdown")

SophiaJia/Jsurvformat documentation built on May 9, 2019, 1:52 p.m.