View source: R/ard_tabulate_abnormal.R
ard_tabulate_abnormal | R Documentation |
Function counts participants with abnormal analysis range values.
For each abnormality specified via the abnormal
parameter (e.g. Low or High), statistic n
is
calculated as the number of patients with this abnormality recorded, and statistic N
is calculated as
the total number of patients with at least one post-baseline assessment. p
is calculated as
n / N
. If excl_baseline_abn=TRUE
then participants with abnormality at baseline are excluded
from all statistic calculations.
ard_tabulate_abnormal(
data,
postbaseline,
baseline,
id = NULL,
by = NULL,
strata = NULL,
abnormal = list(Low = "LOW", High = "HIGH"),
excl_baseline_abn = TRUE,
quiet = FALSE
)
data |
( |
postbaseline |
( |
baseline |
( |
id |
( |
by , strata |
(
Arguments may be used in conjunction with one another. |
abnormal |
( |
excl_baseline_abn |
( |
quiet |
(scalar |
an ARD data frame of class 'card'
# Load Data -------------------
set.seed(1)
adlb <- cards::ADLB
adlb$BNRIND <- ifelse(
adlb$BNRIND != "N",
sample(c("LOW", "LOW LOW", "HIGH", "HIGH HIGH"), nrow(adlb), replace = TRUE),
"NORMAL"
)
# Example 1 -------------------
adlb |>
ard_tabulate_abnormal(
postbaseline = LBNRIND, baseline = BNRIND, id = USUBJID, by = TRTA,
abnormal = list(Low = c("LOW", "LOW LOW"), High = c("HIGH", "HIGH HIGH"))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.