plotMultinom | R Documentation |
This function takes the results of multinomial.test
as input and plots the calculated probability
distribution.
plotMultinom(listMultinom)
listMultinom |
a list created by running the function |
The function plotMultinom
displays a barplot of the probabilities for the individual events.
The probabilities are shown in descending order from the left to the right.
Events contributing to the p-value are marked red.
Plots are only made if the number of different events is lower than or equal to 100 and for low number of trials in Monte Carlo simulations.
The first argument (listMultinom) is returned without modification.
Uwe Menzel <uwemenzel@gmail.com>
The Multinomial Distribution: multinomial.test
## Load the EMT package:
library(EMT)
## input and calculation of p-values:
observed <- c(5,2,1)
prob <- c(0.25, 0.5, 0.25)
out <- multinomial.test(observed, prob) # p.value = 0.0767
## Plot the probability distribution:
plotMultinom(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.