# Constructing
S1 <- c(4, 2, 2, 14, 6, 9, 4, 0, 1)
S2 <- c(0, 0, 1, 3, 2, 1, 2, 2, 2)
N1 <- rep(148, 9)
N2 <- rep(132, 9)
F1 <- N1 - S1
F2 <- N2 - S2
df <- data.frame(S1, F1, S2, F2)
# Computation of exact p-values and their supports
results_ex <- mcnemar_test_pv(df)
raw_pvalues <- results_ex$get_pvalues()
pCDFlist <- results_ex$get_pvalue_supports()
# Computation of chisquare p-values and their supports
results_cs <- mcnemar_test_pv(df, exact = FALSE)
raw_pvalues <- results_cs$get_pvalues()
pCDFlist <- results_cs$get_pvalue_supports()
Run the code above in your browser using DataLab