Learn R Programming

lrstat (version 0.2.13)

zstatRateDiff: Miettinen-Nurminen Score Test Statistic for Two-Sample Rate Difference

Description

Obtains the Miettinen-Nurminen score test statistic for two-sample rate difference possibly with stratification.

Usage

zstatRateDiff(
  rateDiffH0 = 0,
  t1 = NA_real_,
  y1 = NA_real_,
  t2 = NA_real_,
  y2 = NA_real_
)

Value

The value of the score test statistic.

Arguments

rateDiffH0

The rate difference under the null hypothesis. Defaults to 0.

t1

The exposure for the active treatment group.

y1

The number of events for the active treatment group.

t2

The exposure for the control group.

y2

The number of events for the control group.

Author

Kaifeng Lu, kaifenglu@gmail.com

Details

The Mantel-Haenszel weights are used for stratified samples.

Examples

Run this code

zstatRateDiff(rateDiffH0 = 0, t1 = c(10,10), y1 = c(4,3),
              t2 = c(20,10), y2 = c(2,0))

Run the code above in your browser using DataLab