beta_shape2_one_way {LRTesteR} | R Documentation |
Test the equality of shape 2 parameters of beta distributions.
Description
Test the equality of shape 2 parameters of beta distributions.
Usage
beta_shape2_one_way(x, fctr, conf.level = 0.95)
Arguments
x |
a numeric vector of at least 50 data values per group. |
fctr |
a factor vector indicating groups. |
conf.level |
overall confidence level of the likelihood intervals. Uses Bonferroni correction. |
Details
Null: All shape2s are equal. (shape2_1 = shape2_2 ... shape2_k).
Alternative: At least one shape2 is not equal.
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 <- rbeta(150, 2, 2)
fctr <- c(rep(1, 50), rep(2, 50), rep(3, 50))
fctr <- factor(fctr, levels = c("1", "2", "3"))
beta_shape2_one_way(x, fctr, .95)
# Null is false
set.seed(1)
x <- c(rbeta(50, 2, 1), rbeta(50, 2, 2), rbeta(50, 2, 3))
fctr <- c(rep(1, 50), rep(2, 50), rep(3, 50))
fctr <- factor(fctr, levels = c("1", "2", "3"))
beta_shape2_one_way(x, fctr, .95)
[Package LRTesteR version 1.1.1 Index]