Learn R Programming

mariposa (version 0.7.3)

print.summary.mcnemar_test: Print summary of McNemar test results (detailed output)

Description

Displays the detailed output for a McNemar test, with sections controlled by the boolean parameters passed to summary.mcnemar_test. Sections include the 2x2 contingency table, the test results table, and the discordant pairs.

Usage

# S3 method for summary.mcnemar_test
print(x, ...)

Value

Invisibly returns the input object x.

Arguments

x

A summary.mcnemar_test object created by summary.mcnemar_test.

...

Additional arguments (not used).

See Also

mcnemar_test for the main analysis, summary.mcnemar_test for summary options.

Examples

Run this code
test_data <- transform(survey_data,
  trust_gov_high = as.integer(trust_government >= 4),
  trust_media_high = as.integer(trust_media >= 4))
result <- mcnemar_test(test_data, var1 = trust_gov_high,
                       var2 = trust_media_high)
summary(result)                            # all sections
summary(result, discordant_pairs = FALSE)  # hide discordant pairs

Run the code above in your browser using DataLab