prop.multinom.test: Wald tests for comparison of proportions

View source: R/prop.multinom.test.R

prop.multinom.testR Documentation

Wald tests for comparison of proportions

Description

Performs pairwise comparisons of proportions when the number of classes is >= 2 with corrections for multiple testing.

Usage

prop.multinom.test(x, p.method = "fdr")

Arguments

x

either a factor or a matrix with K columns giving the counts for each of the K classes.

p.method

method for p-values correction. See help of p.adjust.

Details

The function builds multinomial log-linear models (using multinom) and applies Wald tests to compare the intercepts to 0. All necessary models (each time using a different reference level/class) are built to get p-values of all possible comparisons among levels/classes.

Value

method

a character string indicating the name of the test.

data.name

a character string giving the name(s) of the data.

p.adjust.method

method for p-values correction.

p.value

table of results.

z.tab

table of z values.

Author(s)

Maxime HERVE <maxime.herve@univ-rennes1.fr>

See Also

multinom, binom.test

Examples

response <- factor(rep(LETTERS[1:4],c(20,40,42,13)))
table(response)/length(response)
prop.multinom.test(response)

RVAideMemoire documentation built on Nov. 6, 2023, 5:07 p.m.