multinom_test_cpp {ExactMultinom}R Documentation

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)

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.

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!

See Also

multinom.test


[Package ExactMultinom version 0.1.2 Index]