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

Description Usage Arguments Note Author(s)

Description

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

Usage

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

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.

var

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

trt

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.

trt.name

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

subgroup

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

subgroup.name

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

subgroup.indicator

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.

compare.subgroup

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

itt.name

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

var.class

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.factor.levels

ordered levels of the ordered factor.

cont.show

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

digits for rounding

trt.order

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.

test.subgroup

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.

na.action

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.

Note

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).

Author(s)

Ning Leng leng.ning@gene.com, Alexey Pronin pronin.alexey@gene.com, and previous team members (see DESCRIPTION)


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