Learn R Programming

DTComPair (version 1.2.6)

sesp.gen.mcnemar: Generalized McNemar's test

Description

Performs a generalized McNemar's test to jointly compare sensitivity and specificity.

Usage

sesp.gen.mcnemar(tab)

Value

A vector containing the test statistic and the p-value.

Arguments

tab

An object of class `tab.paired`.

References

Lachenbruch P.A., Lynch C.J. (1998). Assessing screening tests: extensions of McNemar's test. Stat Med, 17(19): 2207-17.

See Also

[tab.paired()], [read.tab.paired()] and [sesp.mcnemar()]

Examples

Run this code
# Example 1:
data(Paired1) # Hypothetical study data
ftable(Paired1)
paired.layout1 <- tab.paired(d=d, y1=y1, y2=y2, data=Paired1)
print(paired.layout1)
sesp.gen.mcnemar(paired.layout1)

# Example 2 (from Lachenbruch and Lynch (1998)):
paired.layout2 <- read.tab.paired(
  d.a  = 850, d.b  = 40, d.c  = 60, d.d  =  50, 
  nd.a =  60, nd.b = 25, nd.c = 15, nd.d = 900, 
  testnames = c("T1", "T2")
)
print(paired.layout2)
sesp.gen.mcnemar(paired.layout2)

Run the code above in your browser using DataLab