compare_freqs: Compare the frequencies of levels of a factor

View source: R/compare_freqs.R

compare_freqsR Documentation

Compare the frequencies of levels of a factor

Description

Using stats::mcnemar.test for comparing dependent proportions.

This is function is dubious. Best not to use it.

Usage

compare_freqs(f, adjust = stats::p.adjust.methods, correct = TRUE)

Arguments

f

A factor vector.

adjust

Method for correcting p-values. See stats::p.adjust.

correct

a logical indicating whether to apply continuity correction when computing the test statistic.

Examples

f <- c(
  rep("A", 12),
  rep("B", 45),
  rep("C", 42),
  rep("D", 20)
)

compare_freqs(f)


mattansb/MSBMisc documentation built on March 22, 2023, 6:02 p.m.