inverse_gaussian_mu_one_way {LRTesteR} | R Documentation |
Test the equality of means of inverse gaussian distributions.
Description
Test the equality of means of inverse gaussian distributions.
Usage
inverse_gaussian_mu_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 mus are equal. (mu1 = mu2 ... muk).
Alternative: At least one mu 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)
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_mu_one_way(x, fctr, .95)
# Null is false
set.seed(1)
x <- c(
rinvgauss(n = 50, mean = 1, shape = 2),
rinvgauss(n = 50, mean = 2, shape = 2),
rinvgauss(n = 50, mean = 3, shape = 2)
)
fctr <- c(rep(1, 50), rep(2, 50), rep(3, 50))
fctr <- factor(fctr, levels = c("1", "2", "3"))
inverse_gaussian_mu_one_way(x, fctr, .95)
[Package LRTesteR version 1.1.1 Index]