
ig.test(x, method = "transf")
"transf"
and "ratio"
."htest"
containing the following components.
"transf"
performs two tests based on data transformations. One test
transforms the observations to approximately normally distributed observations and then uses Shapiro-Wilk test for asssessing univariate normality (Ochoa, 2015).
The other test is based on a transformation of data to gamma variables with shape parameter equal to 1/2 and uses Anderson-Darling test for testing the gamma distribution (Villasenor and Gonzalez-Estrada, 2015).
The right-hand side tail of the null distribution for Anderson-Darling test statistic is approximated by an inverse Gaussian distribution in order to get approximated p-values. Option "ratio"
performs a test based on the ratio of two variance estimators. It is based on the asymptotic distribution of the test statistic. The use of this test is appropriate for large sample sizes (Villasenor and Gonzalez-Estrada, 2015).
Ochoa, A. (2015). Pruebas para la distribucion Gaussiana inversa. Master's Thesis. Colegio de Postgraduados, Mexico.
# Example 1: testing the inverse Gaussian distribution hypothesis using "transf"
# option on the compressive strength variable of the strength data set.
data("strength")
y <- strength$cstrength # compressive strength
ig.test(y, method = "transf")
# Getting the p-value of the test based on a transformation to gamma variables
ig.test(y)[[2]]$p.value
# Example 2: testing the inverse Gaussian distribution hypothesis using "ratio"
# option on a simulated data set.
x <- rlnorm(500) # simulating a random sample from the lognormal distribution
ig.test(x, method = "ratio")
Run the code above in your browser using DataLab