negative_binomial_p_one_way | R Documentation |
Test the equality of p parameters of negative binomial distributions.
negative_binomial_p_one_way(
num_failures,
num_successes,
fctr,
conf.level = 0.95
)
num_failures |
a numeric vector indicating number of failures per group. |
num_successes |
a numeric vector indicating number of successes per group. |
fctr |
a factor vector indicating groups. |
conf.level |
overall confidence level of the likelihood intervals. Uses Bonferroni correction. |
An S3 class containing the test statistic, p value, list of likelihood based confidence intervals, overall confidence level, individual confidence level of each interval and alternative hypothesis.
Yudi Pawitan. In All Likelihood. Oxford University Press.
Hodd, McKean, and Craig. Introduction to Mathematical Statistics. Pearson.
library(LRTesteR)
# Null is true.
set.seed(1)
num_failures <- rnbinom(3, 50, .5)
num_successes <- rep(50, length(num_failures))
fctr <- factor(1:length(num_failures))
negative_binomial_p_one_way(num_failures, num_successes, fctr, .95)
# Null is false
set.seed(1)
num_failures <- rnbinom(3, 50, c(.25, .50, .75))
num_successes <- rep(50, length(num_failures))
fctr <- factor(1:length(num_failures))
negative_binomial_p_one_way(num_failures, num_successes, fctr, .95)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.