zstatRiskDiff: Miettinen-Nurminen Score Test Statistic for Two-Sample Risk...

View source: R/RcppExports.R

zstatRiskDiffR Documentation

Miettinen-Nurminen Score Test Statistic for Two-Sample Risk difference

Description

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

Usage

zstatRiskDiff(
  riskDiffH0 = 0,
  n1 = NA_real_,
  y1 = NA_real_,
  n2 = NA_real_,
  y2 = NA_real_
)

Arguments

riskDiffH0

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

n1

The sample size for the active treatment group.

y1

The number of responses for the active treatment group.

n2

The sample size for the control group.

y2

The number of responses for the control group.

Details

The Mantel-Haenszel sample size weights are used for stratified samples.

Value

The value of the score test statistic.

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


zstatRiskDiff(riskDiffH0 = 0, n1 = c(10,10), y1 = c(4,3),
              n2 = c(20,10), y2 = c(2,0))


lrstat documentation built on Oct. 18, 2024, 9:06 a.m.