Data format should be in 'long' format, where each PRO-CTCAE item is a variable/column. AUC calculations will only include subjects with non- missing baseline values (within each PRO-CTCAE item).
toxAUC(
dsn,
id_var,
cycle_var,
baseline_val,
arm_var = NA,
auc = "above",
cycle_limit = NA,
y_limit = 4,
tab_ymin = NA,
tab_ymax = NA,
round_dec = 2,
permute_tests = FALSE,
permute_n = 2000,
bootstrap_ci = FALSE,
bootstrap_ci_alpha = 0.05,
bootstrap_n = 2000,
arm_colors = NA,
x_label = NA,
add_item_title = FALSE,
cycle_label = FALSE,
cycle_vals = NA,
cycle_labs = NA
)A data.frame object with PRO-CTCAE data
A character string. Name of ID variable differentiating each unique patient.
A character string. Name of variable differentiating one longitudinal/repeated. PRO-CTCAE survey from another, within an individual ID.
A number indicating the expected baseline cycle/time point.
A character string. Name of arm variable differentiating
treatment groups. Must be character or factor class. Overall frequencies
will be reported if no arm/grouping variable is provided. Defaults to
NA.
A character string. Specifies the partitioning of area shown.
options include: "above" = accumulated area above the baseline
horizontal can be interpreted as worsening severity from baseline.
"below" = accumulated area below the baseline horizontal can be
interpreted the as the amount of decreased severity from baseline.
"both" = accumulated area above and below the baseline horizontal
are shown. Defaults to "above".
A number. Limit the number of cycles to be use to
calculate the AUC metrics up to and including a given cycle number.
All available cycle time points are used if no cycle number is provided.
Defaults to NA.
A number. Y axis limit for plots. Defaults to 4.
A number. Y axis coordinate for adjusting the vertical
placement of the AUC table within the figure. Defaults to NA.
A number. Y axis coordinate for adjusting the vertical
placement of the AUC table within the figure. Defaults to NA.
A number. Number of decimal places to be shown within
the AUC table. Defaults to 2.
Logical. Calls to calculate p values comparing the
difference in AUC between two arms using a permutation test. Typical two-
sided null hypothesis for a permutation test is applied. That is, assigning
subjects to groups is interchangeable when calculating AUC. Computation
time may be extensive depending on data size, number of PRO-CTCAE items,
and number of permutations called. Consider staring out an open window or
crafting a haiku during this time. Defaults to FALSE.
A number. The number of permutations to be used for
permutation tests. Defaults to 2000.
Logical. Calls to construct alpha-level confidence
intervals for the difference in AUC between arms. Similar considerations
for computation time as permute_tests are recommended here. Defaults
to FALSE.
A number. Specifies the alpha level for bootstrap
confidence intervals. Must be between 0 and 1. Defaults to 0.05.
A number. The number of bootstrap iterations to be used
for bootstrap confidence intervals. Defaults to 2000.
A column vector of valid colors. Allows the user to define the colors of arms shown in the returned figure. Column vector must have length greater than or equal to the number of arms. Default colors provided.
A character string. Label for the x axis of the plot. Defaults
to NA resulting in x axis labeled with cycle_var variable
name.
Logical. Adds the item short label to the title of
each figure. Defaults to FALSE.
Logical. Assign custom labels to cycles/time point. If
TRUE, the cycle_vals and cycle_labs must also be specified.
Numeric column vector. Vector of values seen within the
cycle_var variable. Must be same length of cycle_labs. Defaults
to NA.
Character column vector. Vector of labels to be mapped to
the associated cycle_vals. Must be same length of cycle_vals.
Defaults to NA.
if (FALSE) {
AUC=toxAUC(dsn = ProAE::tox_acute,
id_var = "id",
cycle_var = "Cycle",
baseline_val = 1)
AUC[[1]]
}
Run the code above in your browser using DataLab