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

(data.frame)
a data frame. See below for details.

variables

(tidy-select)
names of the event and time variables (in that order) to be used in computations. Must be of length 2.

na.rm

(scalar logical)
whether missing values should be removed before computations. Default is TRUE.

by

(tidy-select)
optional column name to compare by.

conf.level

(scalar numeric)
confidence level for confidence interval. Default is 0.95.

...

arguments passed to poisson.test().

Details

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))


[Package cardx version 0.2.1 Index]