Learn R Programming

RVAideMemoire (version 0.9-45-2)

multinomial.theo.multcomp: Pairwise comparisons after an exact multinomial test for given probabilities

Description

Performs pairwise comparisons after a global exact multinomial test for given probabilities. These comparisons are performed using exact binomial tests.

Usage

multinomial.theo.multcomp(x, p = rep(1/length(x), length(x)), p.method = "fdr")

Arguments

x
numeric vector (counts).
p
theoretical proportions.
p.method
method for p-values correction. See help of p.adjust.

Value

  • methodname of the test.
  • data.namea character string giving the name(s) of the data.
  • observedobserved counts.
  • expectedexpected counts.
  • p.adjust.methodmethod for p-values correction.
  • p.value2corrected p-values.
  • p.valuedata frame of results.

Details

Since chi-squared and G tests are approximate tests, exact tests are preferable when the number of individuals is small (200 is a reasonable minimum). An exact multinomial test with two groups is strictly the same than an exact binomial test.

See Also

multinomial.test, binom.test

Examples

Run this code
counts <- c(5,15,23)
p.theo <- c(0.2,0.5,0.3)
multinomial.test(counts,p=p.theo)
multinomial.theo.multcomp(counts,p=p.theo)

Run the code above in your browser using DataLab