exReport: Exclusion Report

Description Usage Arguments Details Author(s) Examples

View source: R/exReport.r

Description

Generates graphics for sequential exclusion criteria

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
exReport(
  formula,
  data = NULL,
  subset = NULL,
  na.action = na.retain,
  study = " ",
  ignoreExcl = NULL,
  ignoreRand = NULL,
  plotExRemain = TRUE,
  autoother = FALSE,
  sort = TRUE,
  whenapp = NULL,
  erdata = NULL,
  head = NULL,
  tail = NULL,
  detailTail = NULL,
  details = TRUE
)

Arguments

formula

a formula with only a right-hand side, possibly containing a term of the form pending(x) to inform the function of which subjects have incomplete randomization ("randomization pending"). The pending variable is ignored if a subject has an exclusion marked. A randomized variable is an optional logical vector specifying which subjects are considered to have been randomized. The presence of this variable causes consistency checking against exclusions. One or more cond variables provide binary/logical vectors used to define subsets of subjects for which denominators are used to compute additional fractions of exclusions that are reported in a detailed table. The arguments of the cond function are the name of the original variable (assumed to be provided as a regular variable in formula, a single character string giving the label for the condition, and the vector of essentially binary values that specify the condition.

data

input data frame

subset

subsetting criteria

na.action

function for handling NAs when creating analysis frame

study

character string identifying the study; used in multi-study reports or where distinct patient strata are analyzed separately. Used to fetch the study-specific metadata stored by sethreportOption. Single study reports just use study=' '.

ignoreExcl

a formula with only a right-hand side, specifying the names of exclusion variable names that are to be ignored when counting exclusions (screen failures)

ignoreRand

a formula with only a right-hand side, specifying the names of exclusion variable names that are to be ignored when counting randomized subjects marked as exclusions

plotExRemain

set to FALSE to suppress plotting a 2-panel dot plot showing the number of subjects excluded and the fraction of enrolled subjects remaining

autoother

set to TRUE to add another exclusion Unspecified that is set to TRUE for non-pending subjects that have no other exclusions

sort

set to FALSE to not sort variables by descending exclusion frequency

whenapp

a named character vector (with names equal to names of variables in formula). For each variable that is only assessed (i.e., is not NA) under certain conditions, add an element to this vector naming the condition

erdata

a data frame that is subsetted on the combination of id variables when randomized is present, to print auxiliary information about randomized subjects who have exclusion criteria

head

character string. Specifies initial text in the figure caption, otherwise a default is used.

tail

a character string to add to end of automatic caption

detailTail

a character string to add to end of automatic caption for appendix table with listing of subject IDs

details

set to FALSE to prevent writing details about exclusions (IDs, etc.)

Details

With input being a series of essentially binary variables with positive indicating that a subject is excluded for a specific reason, orders the reasons so that the first excludes the highest number of subjects, the second excludes the highest number of remaining subjects, and so on. If a randomization status variable is present, actually randomized (properly or not) subjects are excluded from counts of exclusions. First draws a single vertical axis graph showing cumulative exclusions, then creates a 2-panel dot chart with the first panel showing that information, along with the marginal frequencies of exclusions and the second showing the number of subjects remaining in the study after the sequential exclusions. A pop-up table is created showing those quantities plus fractions. There is an option to not sort by descending exclusion frequencies but instead to use the original variable order. Assumes that any factor variable exclusions that have only one level and that level indicates a positive finding, that variable has a denominator equal to the overall number of subjects.

An attribute dot chart is also drawn using the Hmisc package combplotp function, showing frequencies of all combinations of exclusions that occurred in the data.

Author(s)

Frank Harrell

Examples

1
# See test.Rnw in tests directory

harrelfe/hreport documentation built on July 26, 2021, 9:09 a.m.