farrington_manning_z: Farrington & Manning test statistic

View source: R/farrington-manning.R

farrington_manning_zR Documentation

Farrington & Manning test statistic

Description

Farrington & Manning test statistic

Usage

farrington_manning_z(
  x1,
  x2,
  n1,
  n2,
  delta = NULL,
  r0 = NULL,
  metric = "riskdiff"
)

Arguments

x1

the number of events in treatment

x2

the nubmer of events in control

n1

total number of events in treatment

n2

total number of events in control

delta

non-inferiority margin for ⁠risk difference⁠

r0

non-inferiority margin for ⁠relative risk⁠

metric

specifying the metric used to construct the test statistic, riskdiff for testing of risk difference (p1-p2) and relriks for testing relative risk (R = p1/p2)

Details

test statistics by equation 1 of Farrington and Manning, 1990 this statistic is calculated based on the hypothesis that H0: p1-p2 >= delta vs H1: p1 - p2 < delta for the cases of (x1, x2) taking value of (0, 0), (0, 1), (1, 0), or (1, 1) the boundary z values are handled based on Chan's 1999 paper

Value

the estimated p1_tilt, p2_tilt and test statistic

References

\insertRef

farrington1990testr4ct \insertRefchan1999testr4ct

Examples

 farrington_manning_z(x1 = 10, x2 = 15, n1 = 40, n2 = 40, delta = 0.2)
 farrington_manning_z(x1 = 10, x2 = 15, n1 = 40, n2 = 40, r0 = 0.15, metric = "relrisk")

zhuob/R4ClinicalTrial documentation built on Feb. 4, 2025, 1:15 a.m.