ard_stats_poisson_test {cardx} | R Documentation |
ARD Poisson Test
Description
Analysis results data for exact tests of a simple null hypothesis about the rate parameter in Poisson distribution, or the comparison of two rate parameters.
Usage
ard_stats_poisson_test(
data,
variables,
na.rm = TRUE,
by = NULL,
conf.level = 0.95,
...
)
Arguments
data |
( |
variables |
( |
na.rm |
(scalar |
by |
( |
conf.level |
(scalar |
... |
arguments passed to |
Details
For the
ard_stats_poisson_test()
function, the data is expected to be one row per subject.If
by
is not specified, an exact Poisson test of the rate parameter will be performed. Otherwise, a Poisson comparison of two rate parameters will be performed on the levels ofby
. Ifby
has more than 2 levels, an error will occur.
Value
an ARD data frame of class 'card'
Examples
# Exact test of rate parameter against null hypothesis
cards::ADTTE |>
ard_stats_poisson_test(variables = c(CNSR, AVAL))
# Comparison test of ratio of 2 rate parameters against null hypothesis
cards::ADTTE |>
dplyr::filter(TRTA %in% c("Placebo", "Xanomeline High Dose")) |>
ard_stats_poisson_test(by = TRTA, variables = c(CNSR, AVAL))