Generates graphics for sequential exclusion criteria
exReport(
formula,
data = NULL,
subset = NULL,
na.action = na.retain,
ignoreExcl = NULL,
ignoreRand = NULL,
plotExRemain = TRUE,
autoother = FALSE,
sort = TRUE,
whenapp = NULL,
erdata = NULL,
panel = "excl",
subpanel = NULL,
head = NULL,
tail = NULL,
apptail = NULL,
h = 5.5,
w = 6.5,
hc = 4.5,
wc = 5,
adjustwidth = "-0.75in",
append = FALSE,
popts = NULL,
app = TRUE
)
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.
input data frame
subsetting criteria
function for handling NA
s when creating analysis frame
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)
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
set to FALSE
to suppress plotting a 2-panel dot plot showing the number of subjects excluded and the fraction of enrolled subjects remaining
set to TRUE
to add another exclusion Unspecified
that is set to TRUE
for non-pending subjects that have no other exclusions
set to FALSE
to not sort variables by descending exclusion frequency
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
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
panel string
If calling exReport
more than once (e.g., for different values of sort
), specify subpanel
to distinguish the multiple calls. In that case, -subpanel
will be appended to panel
when creating figure labels and cross-references.
character string. Specifies initial text in the figure caption, otherwise a default is used.
a character string to add to end of automatic caption
a character string to add to end of automatic caption for appendix table with listing of subject IDs
height of 2-panel graph
width of 2-panel graph
height of cumulative exclusion 1-panel graph
width of this 1-panel graph
used to allow wide detailed exclusion table to go into left margin in order to be centered on the physical page. The default is '-0.75in'
, which works well when using article document class with default page width. To use the geometry package in LaTeX with margin=.45in specify adjustwidth='+.90in'
.
set to TRUE
if adding to an existing sub-report
a list of options to pass to graphing functions
set to FALSE
to prevent writing appendix information
Frank Harrell
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.
# See test.Rnw in tests directory
Run the code above in your browser using DataLab