PlotTabForestMulti: Generate forest plot and summarization table for 2-arm or...

Description Usage Arguments Author(s) Examples

Description

This function creates a forest plot along with table with summary statistics to infer effect of multiple clinical variables, within a single arm or across two treatment arms. The outcome could be survival, binary or continuous. This function can be used to summarize a group of variables. This function may be used to compare effect of these variables in full population vs biomarker evaluable population. Or compare effect of these variables in different biomarker subgroups

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
PlotTabForestMulti(data, outcome.class = c("survival", "binary",
  "continuous"), outcome.var, trt = NULL, var, var.class = NULL,
  var.name = NULL, percentile.cutoff = 0.5, greater = TRUE, less = TRUE,
  within.bin = FALSE, compare.bep.itt = TRUE, compare.subgroup = FALSE,
  show.itt = FALSE, show.bep = FALSE, subgroup = NULL, bep = NULL,
  bep.name = "BEP", itt.name = "All", bep.indicator = 1,
  covariate = NULL, strata = NULL, rsp.cat = TRUE,
  rsp.response = c("CR", "PR"), rsp.nonresponse = c("SD", "PD", "NON CR/PD",
  "NE", NA), quantile.type = 2, placebo.code = NULL, active.code = NULL,
  var.code = NULL, tabforest = FALSE, alpha = 0.05,
  surv.conf.type = "plain", ties = "efron", main = NULL, sub = NULL,
  clip = NULL, xlab = NULL, cex.headings = 1.1, cex.note = 1,
  cols = "darkgreen", only.stat = FALSE, pdf.name = NULL,
  pdf.param = list(width = 6, height = 4.5), par.param = list(cex = 1.2,
  cex.main = 1.5, cex.sub = 1, cex.axis = 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.

outcome.class

type of the outcome variable. Default is c("survival", "binary", "continuous"). Continuous is not available now

outcome.var

name of the outcome varible. If the outcome.class is binary or coutinuous, only one value should be provided. If the outcome.class is survival, two values should be provided - name of the 'time to event' variable and 'censorship' variable For the censoring variable, 1 indicates event and 0 indicates censoring. In all cases but when outcome.class=binary and rsp.cat=TRUE, patients with missing outcome variable (NA) will be excluded from BEP.

trt

name of the treatment variable. If this is NULL, within-arm analysis will be performed

var

name of the biomarker variable. only one variable should be specified.

var.class

class of the variable. valid categories are "numeric", "categorical". If the class is continuous, user needs to specify percentile.cutoff or numerical.cutoff to dichotomize the continuous measure into subgroups

var.name

display name for the biomarker variable

percentile.cutoff

percentile to dichotomize continuous biomarker measure. This could be a vector with multiple elements. Values should be between 0 and 1

greater

whether calculate summary statistics within the subgroup whose biomarker value is greater than or equal to cutoff value. If this is TRUE, in 2-arm study, across-arm HR within biomarker high group will be calculated. In single arm study HR of biomarker high vs low will be calculated.

less

whether calculate summary statistics within the subgroup whose biomarker value is less than the cutoff value. greater and less can both be TRUE

within.bin

whether calculate summary statistics within bin (e.g. > cutoff1 and <= cutoff2). If within.bin is TRUE, greater and less will be set as FALSE.

compare.bep.itt

whether want to compare BEP vs ITT

compare.subgroup

whether want to compare across multiple subgroups, in each subgroup defined by parameter 'subgroup'. Alternative is to compare BEP vs ITT

show.itt

whether calculate summary statistics using all patients in full population (e.g. ITT). This will be ignored in 1arm case

show.bep

whether calculate summary statistics using all patients in BEP (biomarker evaluable population). This will be ignored in 1arm case

subgroup

The column which defines subgroups. If compare.subgroup is TRUE, the program will generate forest plot of the vars within each subgroup

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

preferred display name of the biomarker evaluable population. If it is NULL, bep will be used.

itt.name

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

bep.indicator

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

covariate

a vector specifying the covariate variables to be adjusted in the model. Default is set to NULL, meaning no adjustment.

strata

name of the stratification variables. Default is set to NULL, meaning no stratification.

rsp.cat

whether the response outcome variable is coded as binary (1 as responder and 0 as non-responder), If rsp.cat is TRUE, responder categories and nonresponder categories should be specified in rsp.response and rsp.nonresponse (all values in the outcome column should be included in rsp.response and rsp.nonresponse) . If rsp.cat is FALSE, the response outcome variable should be coded as binary (0/1). At the same time rsp.response and rsp.nonresponse will be ignored.

rsp.response

categories that should be considered as responder.

rsp.nonresponse

categories that should be considered as non responder.

quantile.type

an integer between 1 and 9 selecting one of the nine quantile algorithms. See quantile. Default is 2.

placebo.code

name of the control arm of the treatment variable. If you want to specify placebo code using this parameter, both placebo.code and active.code need to be provided.

active.code

of the treatment/experimental arm of the treatment variable. If you want to specify active code using this parameter, both placebo.code and active.code need to be provided.

var.code

ordered levels of the biomarker variable. This will be ignored for continuous biomarker. If the biomarker is categorical and this is NULL, biomarker subgroups will be ordered by the order from factor() function

tabforest

Default is FALSE. If it is FALSE, forest plot will be generated using forestplot::forestplot() function. If it is TRUE, a table will be generated with forest plots incorpriated

alpha

type I error rate. Default is 0.05.

surv.conf.type

confidence interval type. Default is "plain". see conf.type in survfit

ties

Default is "efron". To match internal sas results, use "exact". See parameter "ties" in coxph.

main

main title (prefix of title) of the forest plot. Default is "Association of biomarker effect within treatment arms".

sub

sub title under the forest plot. Default is NULL.

clip

range of the x-axis of the forest plot. Default is NULL.

xlab

xlab for forest plot

cex.headings

amount of magnification of headings of the forest plot relative to cex. Default is 1.1.

cex.note

amount of magnification of the note. Default is 1.

cols

Color of the 'effect size' displayed in the forest plot.

only.stat

if it is TRUE, only summary statistics will be generated. No figure will be generated

pdf.name

name of output pdf file. If it's NULL, the plots will be displayed but not saved as pdf. Default is "forestplot::forestplot.pdf".

pdf.param

a list of parameters that define pdf graphics device. See pdf. Default is list(width=6, height=4.5).

par.param

a list of parameters that define graphcial parameters. See par. Default is list(mar=c(4,4,3,2)).

Author(s)

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

Examples

1
2
3
4
5
6
7
data(input)
PlotTabForestMulti(data=input,
                      outcome.class=c("survival"),
                      outcome.var=c("PFS","PFS.event"),
                      trt="Arm",
                      var=c("Sex","Age"),
                      var.class="categorical",bep="BEP")

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