accrualReport: Accrual Report

Description Usage Arguments Details Examples

View source: R/accrualReport.r

Description

Generate graphics and HTML to analyze subject accrual

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
accrualReport(
  formula,
  data = NULL,
  subset = NULL,
  na.action = na.retain,
  study = " ",
  dateRange = NULL,
  targetN = NULL,
  targetDate = NULL,
  closeDate = NULL,
  enrollmax = NULL,
  studynos = TRUE,
  minrand = 10,
  h = 400,
  w = 650,
  hb = 700,
  wb = 700,
  hdot = 400
)

Arguments

formula

formula object, with time variables on the left (separated by +) and grouping variables on the right. Enrollment date, randomization date, region, country, and site when present must have the variables in parenthesis preceeded by the key words enrollment, randomize, region, country, site.

data

data frame.

subset

a subsetting epression for the entire analysis.

na.action

a NA handling function for data frames, default is na.retain.

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=' '.

dateRange

Date or character 2-vector formatted as yyyy-mm-dd. Provides the range on the x-axis.

targetN

integer vector with target sample sizes over time, same length as targetDate

targetDate

Date or character vector corresponding to targetN

closeDate

Date or characterstring. Used for randomizations per month and per site-month - contains the dataset closing date to be able to compute the number of dates that a group (country, site, etc.) has been online since randomizating its first subject.

enrollmax

numeric specifying the upper y-axis limit for cumulative enrollment

studynos

logical. Set to FALSE to suppress summary study numbers table.

minrand

integer. Minimum number of randomized subjects a country must have before a box plot of time to randomization is included.

h

numeric. Height of ordinary plots, in pixels.

w

numeric. Width of ordinary plots.

hb

numeric. Height of extended box plots in pixels.

wb

numeric. Width of extended box plots.

hdot

numeric. Height of dot charts in pixels.

Details

Typically the left-hand-side variables of the formula, in order, are date of enrollment and date of randomization, with subjects enrolled but not randomized having missing date of randomization. Given such date variables, this function generates cumulative frequencies optionally with target enrollment/randomization numbers. Makes a variety of dot charts by right-hand-side variables: number of subjects, number of sites, number of subjects per site, fraction of enrolled subjects randomized, number per month, number per site-month.

Examples

1
2
3
4
## Not run: 
# See test.Rmd in inst/tests directory

## End(Not run)

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