inverse_gaussian_shape_one_way | R Documentation |
Test the equality of shape parameters of inverse gaussian distributions.
inverse_gaussian_shape_one_way(x, fctr, conf.level = 0.95)
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. |
Null: Null: All shapes are equal. (shape_1 = shape_2 ... shape_k).
Alternative: At least one shape is not equal.
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)
library(statmod)
# Null is true
set.seed(1)
x <- rinvgauss(n = 150, mean = 1, shape = 2)
fctr <- c(rep(1, 50), rep(2, 50), rep(3, 50))
fctr <- factor(fctr, levels = c("1", "2", "3"))
inverse_gaussian_shape_one_way(x, fctr, .95)
# Null is false
set.seed(1)
x <- c(
rinvgauss(n = 50, mean = 1, shape = 1),
rinvgauss(n = 50, mean = 1, shape = 3),
rinvgauss(n = 50, mean = 1, shape = 4)
)
fctr <- c(rep(1, 50), rep(2, 50), rep(3, 50))
fctr <- factor(fctr, levels = c("1", "2", "3"))
inverse_gaussian_shape_one_way(x, fctr, .95)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.