JS.g3subout: Subset survival analysis

Description Usage Arguments Value Examples

Description

JS.g3subout output an html table with general multivariable survival analysis result with HR (95% Confidence Interval),P value

Usage

1
JS.g3subout(Data, Event, Stime, Svar, Group, cutoff = NA, nocut = T)

Arguments

Event

Name of event varaible :the status indicator, normally 0=alive, 1=dead

Stime

Name of the follow up time variable

Svar

Name of the comparing group variable

Group

Name of the subset group variable

cutoff

value of the cut off

nocut

logical, if a cutoff is defined or not

D

A data.frame in which to interpret the variables

Value

A dataframe of coxph output including HRs (95% Confidence Intervals), P values

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
Event <- c("pd_censor")
Stime <- c("pd_surv")
Svar  <- c("tr_group")
Group <- c("age_m")

T_age <- JS.g3sub(D, Event, Stime, Svar, "age_m", cutoff = 60, nocut = F)
T_BMI <- JS.g3sub(D, Event, Stime, Svar, Group)
save(T_age,T_BMI, file='myfile.Rda')

Then write this in Rmarkdown 
```{r, echo=FALSE,results = 'asis'}
load("H:/Projects/p_Smith, Mitchell/Rituxan/Rituxan/myfile.Rda")
knitr::kable(T_age, format = "markdown", row.names = F)
```

the second table 
```{r, echo=FALSE,results = 'asis'}
knitr::kable(T_BMI, format = "markdown", row.names = F)
```

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