plotMultinom {EMT}R Documentation

Plot the Probability distribution fot the Exact Multinomial Test

Description

This function takes the results of multinomial.test as input and plots the calculated probability distribution.

Usage

plotMultinom(listMultinom)

Arguments

listMultinom

a list created by running the function multinomial.test.

Details

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.

Value

The first argument (listMultinom) is returned without modification.

Author(s)

Uwe Menzel <uwemenzel@gmail.com>

See Also

The Multinomial Distribution: multinomial.test

Examples


## 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)


[Package EMT version 1.3.1 Index]