SummarySingle: Summary a single covariate, test across treatment and/or...

Description Usage Arguments Note Author(s)


This function performs demographics imbalance checking of a single covariate across multiple groups.


SummarySingle(data, var, trt = NULL, = NULL, subgroup = NULL, = NULL, subgroup.indicator = 1, compare.subgroup = FALSE, = "All", var.class = NULL, ordered.factor.levels = NULL, = c("N", "Mean", "Median", "Min-Max", "NA's"), digits = 2,
  trt.order = NULL, test.subgroup = FALSE, na.action = "error")



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.


name of the clinical covariate to test. name should be in the column names of data. entries with empty value (nchar()==0) will be imputed as NA


name of the treatment column. If trt is specified, the analysis will be performed within treatment arm. if it is NULL, the comparison will be performed using all samples.

preferred display name of the treatment variable If it is NULL, trt will be used.


name of the column which indicates subpopulation (e.g. biomarker evaluable population)

preferred display name of the subpopulation (e.g. biomarker evaluable population). If it is NULL, subgroup will be used.


In the subpopulation column, which value is used to define the subpopulation (e.g. biomarker evaluable population). Default is 1. It can also be character or logical. Default is 1. The non-subpopulation enrties is not allowed to be specified as NA.


If it is TRUE, the output will show summary statistics of subgroup and others. Default is FALSE. If it is FALSE, will show summary statistics of subgroup vs. All patients

preferred display name of the full population (e.g. ITT). If it is NULL, "All" will be used.


class of the variable. 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 it is not specified, will try to use the class of the column. "numeric","integer" will be treated as "numeric" "logical""character","factor" will be treated as "categorical".


ordered levels of the ordered factor.

what summary statistics to show for a continuous covariate. Default is c("N" ,"Mean","Median", "Min-Max","NA's"). Possible options are "N" ,"Mean","SEM", "SD","Median", "Min","Max" ,"Min-Max","1st Qrtl.","3rd Qrtl.","IQR" ,"NA's"


digits for rounding


If the user wants to display the treatments in a certain order, it can be defined here. All elements in trt.order should be the same unique values in the treatment column.


whether test across subpopulations within treatment arm. If class is numeric, kruskal wallis rank sum test will be performed. If class is categorical, fisher's exact test will be performed. If class is ordered.factor, cmh test will be performed. The test is always performed between subgroup vs others. P value columns will be included in the output table if it is specified as TRUE. Testing is not recommendated if either subgroup of non-subgroup has small sample size.


defaults to "na.omit". Possible options are "na.omit", "error" When it is specified as "na.omit", entries with missing trt or subgroup will be automatically removed before calculation.


This function provides summary statistics of a single clinical covariate. Using default parameters, the function provides a table to compare summary statistics in All patients vs. in BEP (biomarker evaluable population), within treatment arm

trt allows for more than 2 levels. However, only 2 levels are allowed for subgroup. For more general use, a user can specify trt to get summary statistics for any sub-group defination (and leave subgroup as NULL).


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

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