Performs pairwise comparisons of proportions to theoretical values.
wald.ptheo.multinom.test(x, p, p.method = "fdr")
either a factor or a matrix with K columns giving the counts for each of the K classes.
theoretical proportions.
method for p-values correction. See help of p.adjust
.
name of the test.
a character string giving the name(s) of the data.
observed proportions.
theoretical proportions.
method for p-values correction.
statistics of each test.
corrected p-values.
data frame of results.
The function builds K logistic regressions (in each case considering one class vs. the sum of all others) and uses wald.ptheo.test
to test the hypothesis that the proportion of this class is equal to p[K]
.
# NOT RUN {
response <- factor(rep(LETTERS[1:4],c(20,40,42,13)))
wald.ptheo.multinom.test(response,p=c(0.15,0.25,0.3,0.3))
# }
Run the code above in your browser using DataLab