binomial_p_one_way {LRTesteR} | R Documentation |
Test the equality of p parameters of binomial distributions.
Description
Test the equality of p parameters of binomial distributions.
Usage
binomial_p_one_way(x, n, fctr, conf.level = 0.95)
Arguments
x |
a numeric vector indicating number of successes per group. |
n |
a numeric vector indicating number of attempts 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)
x <- rbinom(3, 50, .5)
n <- rep(50, length(x))
fctr <- factor(1:length(x))
binomial_p_one_way(x, n, fctr, .95)
# Null is false
set.seed(1)
x <- rbinom(3, 50, c(.25, .50, .75))
n <- rep(50, length(x))
fctr <- factor(1:length(x))
binomial_p_one_way(x, n, fctr, .95)
[Package LRTesteR version 1.1.1 Index]