clust.bin.pair: Statistical test for clustered binary matched pair data

Description Usage Arguments Value References Examples

View source: R/clust.bin.pair.R

Description

A single interface for several adjustments to the mcnemar test for marginal homogeneity that correct for clustered data.

Usage

1
clust.bin.pair(ak, bk, ck, dk, method = "yang")

Arguments

ak

vector containing counts per group of Success/Success results.

bk

vector containing counts per group of Success/Failure results.

ck

vector containing counts per group of Failure/Success results.

dk

vector containing counts per group of Failure/Failure results.

method

a character string specifying the method to calculate the statistic. Must be one of "yang" (default), "durkalski", "obuchowski", "eliasziw". A value of "mcnemar" can also be supplied for comparison.

Value

A list with class "htest" containing the following components:

statistic

the value of the test statistic.

p.value

the p-value for the test.

method

the type of test applied.

data.name

a character string giving the names of the data.

References

McNemar, Q. (1947). Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika, 12(2), 153-157.

Eliasziw, M., & Donner, A. (1991). Application of the McNemar test to non-independent matched pair data. Statistics in medicine, 10(12), 1981-1991.

Obuchowski, N. A. (1998). On the comparison of correlated proportions for clustered data. Statistics in medicine, 17(13), 1495-1507.

Durkalski, V. L., Palesch, Y. Y., Lipsitz, S. R., & Rust, P. F. (2003). Analysis of clustered matched-pair data. Statistics in medicine, 22(15), 2417-2428.

Yang, Z., Sun, X., & Hardin, J. W. (2010). A note on the tests for clustered matched-pair binary data. Biometrical journal, 52(5), 638-652.

Examples

1
2
3
4
5
6
7
8
with(psychiatry, clust.bin.pair(ah, bh, ch, dh, method="eliasziw"))

tc <- nested.to.contingency(thyroids$x.pet, thyroids$x.spect)
clust.bin.pair(tc$ak, tc$bk, tc$ck, tc$dk, method="obuchowski")

oc <- with(obfuscation, paired.to.contingency(group = list(subject, atom),
                                              t1 = control, t2 = treatment))
clust.bin.pair(oc$ak, oc$bk, oc$ck, oc$dk, method="durkalski")

clust.bin.pair documentation built on Feb. 16, 2018, 1:03 a.m.