TableSubgroupMultiCox: TableSubgroupMultiCox: Multiple sub-group analysis table for...

Description Usage Arguments Details Value See Also Examples

Description

Multiple sub-group analysis table for Cox/svycox model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
TableSubgroupMultiCox(
  formula,
  var_subgroups = NULL,
  var_cov = NULL,
  data,
  time_eventrate = 3 * 365,
  decimal.hr = 2,
  decimal.percent = 1,
  decimal.pvalue = 3,
  line = F
)

Arguments

formula

formula with survival analysis.

var_subgroups

Multiple sub-group variables for analysis, Default: NULL

var_cov

Variables for additional adjust, Default: NULL

data

Data or svydesign in survey package.

time_eventrate

Time for kaplan-meier based event rate calculation, Default = 365 * 3

decimal.hr

Decimal for hazard ratio, Default: 2

decimal.percent

Decimal for percent, Default: 1

decimal.pvalue

Decimal for pvalue, Default: 3

line

Include new-line between sub-group variables, Default: F

Details

This result is used to make forestplot.

Value

Multiple sub-group analysis table.

See Also

map bind

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(survival);library(dplyr)
lung %>% 
  mutate(status = as.integer(status == 1),
         sex = factor(sex),
         kk = factor(as.integer(pat.karno >= 70)),
         kk1 = factor(as.integer(pat.karno >= 60))) -> lung
TableSubgroupMultiCox(Surv(time, status) ~ sex, var_subgroups = c("kk", "kk1"), 
                      data=lung, time_eventrate = 100, line = TRUE)

## survey design
library(survey)
data.design <- svydesign(id = ~1, data = lung)
TableSubgroupMultiCox(Surv(time, status) ~ sex, var_subgroups = c("kk", "kk1"), 
                      data = data.design, time_eventrate = 100)

jstable documentation built on Oct. 19, 2021, 5:07 p.m.