Learn R Programming

ExactMultinom (version 0.1.3)

multinom_test_cpp: C++ Function for Exact Multinomial Test

Description

C++ function computing exact multinomial p-values. Does not perform any safety checks. Incorrect input may result in unwanted behavior. Use only through multinom.test with method = "exact" is recommended.

Usage

multinom_test_cpp(x, p, theta = 1e-04)

Value

Returns a vector containing three values which are the p-values computed from the probability mass, Pearson's chi-square and the log-likelihood ratio statistic. Values below the threshold theta are upper bounds only and not exact p-values!

Arguments

x

Vector of non-negative integers - number of times each outcome was observed.

p

A vector of positive numbers - the hypothesized probabilities for each outcome. Need to sum to 1!

theta

Parameter - p-values less than theta will not be determined precisely.

Details

The outcomes should be ordered by the hypothesized probabilities from largest to smallest for optimal performance.

See Also

multinom.test