CoxTab: Summary outputs from cox proportional model

Description Usage Arguments Note Author(s) Examples

Description

This function summarizes outputs from cox proportional model of one or multiple variables.

Usage

1
2
3
4
CoxTab(data = NULL, tte = NULL, cens = NULL, var = NULL,
  var.class = NULL, ordered.factor.levels.list = NULL, strata = NULL,
  form = NULL, fit = NULL, additive = TRUE, digits = 2, bep = NULL,
  bep.indicator = 1)

Arguments

data

Input data frame. Rows are patients and columns are variables (e.g. demographics variables, time to event variables, biomarker variables, treatment indicator, etc.). One patient per row.

tte

column name that indicates the time to event variable

cens

column name that indicates the censoring variable associated to tte. 1 indicates event and 0 indicates censoring

var

a vector that indicates variables of interest. Hazard ratio, CI and pvalue of these variables will be calculated. All elements in var should be also in input data's column names. It will be ignored if fit or form is not null.

var.class

a vector that indicates class of the variables. possible categories are "numeric", "categorical" and "ordered.factor". "ordered.factor" can be used to categorical variable with ordered levels - e.g. IC score 0/1/2/3. If class is ordered.factor , ordered.factor.levels need to be specified. If the user doesn't specify class of all variables (the length of the var.class is less than length of var), The program will try to use the class of the column. "numeric","integer" will be treated as "numeric" "logical""character","factor" will be treated as "categorical". In this case the program request that names of the vector var.class is a subset of the var vector.

ordered.factor.levels.list

a list indicates ordered levels for ordered.factor. Each ordered.factor should have a corresponding element in this list.

strata

a vector that indicates stratification factors. All elements should be in input data's column names strata will be ignored if var is NULL. It will be ignored if form or fit is not NULL

form

a formula that includes variables of interest. It will be ignored if fit is not null. For example, 'Age+Sex' or "Age+Sex*Trt+Country"

fit

a fitted object from coxph() function. If fit is not NULL, all other parameters will be ignored

additive

Whether an additive model should be used. If additive=FALSE, separate cox PH models will be fitted to each elements in var (stratification factor will be incorpriated for each model). If additive = FALSE, User can only use 'var' to speficy variables of interest (cannot specify the model via parameter 'form')

digits

digits for rounding

bep

name of the column which indicates biomarker evaluable population. If it is null, patients who have non NA records in biomarker variable will be used as BEP.

bep.indicator

In the subpopulation column, which value is used to define the biomarker evaluable population.

Note

The function generates a table that contains hazard ratio, CI, wald p value, and number of patients in each sub category. User may input column names (via var and strata), a formula (via form), or a fitted coxph object (via fit) If user chooses to input column names, a additive model will be formed if additive=TRUE. If additive=FALSE, separate cox PH models will be formed for each var. More coplex models may be specified using form (e.g. model with interactions). To calculate log rank test p value across different subgroups, see LogRankTab()

Author(s)

Ning Leng [email protected], Alexey Pronin [email protected], and previous team members (see DESCRIPTION)

Examples

1
2
3
4
data(input)
sample.data <- input
CoxTab(data=sample.data,tte="OS", cens="OS.event",  var=c('Sex',"Country","Age"))
CoxTab(data=sample.data,tte="OS", cens="OS.event",  form="Age+Sex*Arm+Country")

lengning/gClinBiomarker documentation built on May 9, 2019, 2:55 p.m.