mcNemar: Pair-Matched Analysis Tool

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/mcNemar.R

Description

This function performs elemenentary pair-matched analysis using McNemar's test and computing risk differences.

Usage

1
mcNemar(X, alpha= 0.05, force=FALSE, digits=3)

Arguments

X

A 2x2 matrix, with disease status (Yes/No) for the exposed individual in the columns and disease status (Yes/No) for the control individuals in the rows. Note that for a matched-pair analysis, each entry corresponds to a pair of subjects.

alpha

The desired Type I Error Rate for Hypothesis Tests and Confidence Intervals

force

Logical: McNemar's test is typically valid when the number of discordant pairs exceeds 30. The function may be forced to work, without regards to this concern with FORCE=TRUE.

digits

Number of Digits to round calculations

Details

McNemar's OR is computed as b/c. While standard errors are computed using a transformation. The risk difference is computed as (b-c)/n. Note that this technique can be used for cohort studies as well as matched trials.

Value

X

The original input matrix.

ORMc

McNemar's Odds Ratio

ORMC.CIL

Lower Confidence Limit for McNemar's OR

ORMC.CIU

Upper Confidence Limit for McNemar's OR

rd

Point Estimate of the risk difference

rd.CIL

Lower Confidence Limit for the risk difference

rd.CIU

Upper Confidence Limit for the risk difference

XMc

Value for McNemar's Chi-squared statistic

.

XMc.p.Value

P-value for the hypothesis test of no association.

alpha

The desired Type I Error Rate for Hypothesis Tests and Confidence Intervals

digits

Number of Digits to round calculations

Author(s)

Michael Rotondi, mrotondi@yorku.ca

References

Szklo M and Nieto FJ. Epidemiology: Beyond the Basics, Jones and Bartlett: Boston, 2007.

See Also

epi2x2

Examples

1
2
3
4
5
## Not run: Data for matched-cohort study, comparing smokers to non-smokers for the presence
of lung cancer.
## End(Not run)
X <- cbind(c(15,5), c(19,61));
summary(mcNemar(X, alpha=0.05, force=TRUE));

epibasix documentation built on May 2, 2019, 10:08 a.m.

Related to mcNemar in epibasix...