negative_binomial_p_one_way {LRTesteR} | R Documentation |
Test the equality of p parameters of negative binomial distributions.
Description
Test the equality of p parameters of negative binomial distributions.
Usage
negative_binomial_p_one_way(
num_failures,
num_successes,
fctr,
conf.level = 0.95
)
Arguments
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. |
Value
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.
Source
Yudi Pawitan. In All Likelihood. Oxford University Press.
Hodd, McKean, and Craig. Introduction to Mathematical Statistics. Pearson.
Examples
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)
[Package LRTesteR version 1.1.1 Index]