inverse_gaussian_dispersion_one_sample {LRTesteR} | R Documentation |
Test the dispersion parameter of an inverse gaussian distribution.
Description
Test the dispersion parameter of an inverse gaussian distribution.
Usage
inverse_gaussian_dispersion_one_sample(
x,
dispersion,
alternative = "two.sided",
conf.level = 0.95
)
Arguments
x |
a numeric vector of at least 50 data values. |
dispersion |
a number indicating the tested value of the dispersion parameter. |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". |
conf.level |
confidence level of the likelihood interval. |
Value
An S3 class containing the test statistic, p value, likelihood based confidence 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 = 100, mean = 1, dispersion = 2)
inverse_gaussian_dispersion_one_sample(x, 2, "two.sided")
# Null is false
set.seed(1)
x <- rinvgauss(n = 100, mean = 1, dispersion = 2)
inverse_gaussian_dispersion_one_sample(x, 1, "greater")
[Package LRTesteR version 1.1.1 Index]