Title: | The One-Way Heteroscedastic ANOVA Tests |
---|---|
Description: | Contains the heteroscedastic ANOVA tests for normal and two-parameter exponential distributed populations. For normal distributions, Alexander-Govern test by Alexandern and Govern (1994) <doi:10.2307/1165140>, Alvandi et al. Generalized F test by Alvandi et al. (2012) <doi:10.1080/03610926.2011.573160>, Approximate F test by Asiribo and Gurland (1990) <doi:10.1080/03610929008830427>, Box F test by Box (1954) <doi:10.1214/aoms/1177728786>, Brown-Forsythe test by Brown and Forsythe (1974) <do:10.2307/1267501>, B2 test by Ozdemir and Kurt (2006) <http://sjam.selcuk.edu.tr/sjam/article/view/174>, Cochran F test by Cochran (1937) <https://www.jstor.org/stable/pdf/2984123.pdf>, Fiducial Approach test by Li et al. (2011) <doi:10.1016/j.csda.2010.12.009>, Generalized F test by Weerahandi (1995) <doi:10.2307/2532947>, Johansen F test by Johansen (1980) <doi:10.1093/biomet/67.1.85>, Modified Brown-Forsythe test by Mehrotra (1997) <doi:10.1080/03610919708813431>, Modified Welch test by Hartung et al.(2002) <doi:10.1007/s00362-002-0097-8>, One-Stage test by Chen and Chen (1998) <doi:10.1080/03610919808813501>, One-Stage Range test by Chen and Chen (2000) <doi:10.1080/01966324.2000.10737505>, Parametric Bootstrap test by Krishnamoorhty et al.(2007) <doi:10.1016/j.csda.2006.09.039>, Permutation F test by Berry and Mielke (2002) <doi:10.2466/pr0.2002.90.2.495>, Scott-Smith test by Scott and Smith (1971) <doi:10.2307/2346757>, Welch test by Welch(1951) <doi:10.2307/2332579>, and Welch-Aspin test by Aspin (1948) <doi:10.1093/biomet/35.1-2.88>. These tests are used to test the equality of group means under unequal variance. Also, a modified version of Generalized F-test is improved to test the equality of non-normal group means under unequal variances and a revised version of Generalized F-test is given to test the equality of non-normal group means caused by skewness. Furthermore, it consists some procedures for testing equality of several two-parameter exponentially distributed population means under unequal scale parameters such as generalized p-value, parametric bootstrap and fiducial approach test by Malekzadeh and Jafari (2019) <doi:10.1080/03610918.2018.1538452>. There is also Hsieh test by Hsieh (1986) <doi:10.2307/1270452> for testing equality of location parameters of two-parameter exponentially distributed populations under unequal scale parameters. |
Authors: | Mustafa CAVUS, Berna YAZICI |
Maintainer: | Mustafa CAVUS <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.2 |
Built: | 2025-01-27 05:40:12 UTC |
Source: | https://github.com/cran/doex |
This function performs Approximate F-test.
AF(data,group)
AF(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the Approximate F-test |
Mustafa CAVUS
Asiribo, O. and Gurland, J. (1990) Coping with variance heterogeneity, Communications in Statistics: Theory and Methods, 19(11), 4029-4048.
library(doex) AF(hybrid$data,hybrid$species)
library(doex) AF(hybrid$data,hybrid$species)
This function performs Alexander-Govern test.
AG(data,group)
AG(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
test.statistic |
the test statistic of the Alexander-Govern test |
p.value |
the p-value of the Alexander-Govern test |
Mustafa CAVUS
Alexander, R.A., Govern, D.M. (1994) A new and simplier approximation for ANOVA under variance heterogeneity, Journal of Educational Statistics, 19(2), 91-101.
library(doex) AG(hybrid$data,hybrid$species)
library(doex) AG(hybrid$data,hybrid$species)
This function performs Alvandi et al. Generalized F-test.
AGF(data,group,rept)
AGF(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the Alvandi et al. Generalized F-test |
Mustafa CAVUS
Sadooghi-Alvandi, S.M., Jafari, A.A., Mardani-Fard, H.A. (2012) One-way ANOVA with unequal variances, Communications in Statistics: Theory and Methods, 41, 4200-4221.
library(doex) AGF(hybrid$data,hybrid$species,10000)
library(doex) AGF(hybrid$data,hybrid$species,10000)
This function performs B-square test.
B2(alpha,data,group)
B2(alpha,data,group)
alpha |
significance level of the test. |
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
p.value |
the p-value of the B-square test |
Mustafa CAVUS
Özdemir, A.F. and Kurt, S. (2006) One way fixed effect analysis of variance under variance heterogeneity and a solution proposal, Selçuk Journal of Applied Mathematics, 7(2), 81-90.
library(doex) B2(0.05,hybrid$data,hybrid$species)
library(doex) B2(0.05,hybrid$data,hybrid$species)
This function performs Brown-Forsythe test.
BF(data,group)
BF(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the Brown-Forsythe test |
Mustafa CAVUS
Brown, M.B. and Forsythe, A.B. (1974) The small sample behavior of some statistics which test the equality of several means, Technometrics, 16, 129–132.
library(doex) BF(hybrid$data,hybrid$species)
library(doex) BF(hybrid$data,hybrid$species)
This function performs Box F-test.
BX(data,group)
BX(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the Box F-test |
Mustafa CAVUS
Box, G.E.P. (1954) Some theorems on quadratic forms applied in the study of analysis of variance problems, Annals of Mathematical Statistics, 25, 290-302.
library(doex) BX(hybrid$data,hybrid$species)
library(doex) BX(hybrid$data,hybrid$species)
This function performs Cochran F-test.
CF(data,group)
CF(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the Cochran F-test |
Mustafa CAVUS
Cochran, W.G. (1937) Problems arising in the analysis of a series of similar experiments, Journal of the Royal Statistical Society, 4, 102-118.
library(doex) CF(hybrid$data,hybrid$species)
library(doex) CF(hybrid$data,hybrid$species)
Component data is a complete dataset consists lifetimes of a component which is produced by four different suppliers. The lifetimes of the component distribute as the two-parameter exponential distribution.
component
component
lifetime |
A set of data on lifetimes of the components obtained from the different suppliers. |
supplier |
A set of suppliers produce the components. |
Mustafa CAVUS
library(doex) component$supplier; component$lifetime;
library(doex) component$supplier; component$lifetime;
This function performs Fiducial Approach test.
FA(data,group,rept)
FA(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the Fiducial Approach test |
Mustafa CAVUS
Li, X., Wang, J. and Liang, H. (2011) Comparison of several means: a fiducial based approach, Computational Statistics and Data Analysis, 55, 1993-2002.
library(doex) FA(hybrid$data,hybrid$species)
library(doex) FA(hybrid$data,hybrid$species)
This function performs Fiducial Approach test for two-parameter exponential distributed populations.
fa_exp(data,group,rept)
fa_exp(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the Fiducial Approach test for two-parameter exponential distributed populations |
Mustafa CAVUS
Malekzadeh, A. and Jafari, A. A. (2019) Inference on the equality means of several two-parameter exponential distributions under progressively Type II censoring, Communications in Statistics - Simulation and Computation.
library(doex) fa_exp(component$lifetime,component$supplier)
library(doex) fa_exp(component$lifetime,component$supplier)
This function performs Generalized F-test.
GF(data,group,rept)
GF(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the Generalized F-test |
Mustafa CAVUS
Weerahandi, S.(1994) ANOVA under unequal error variances, Biometrics, 51, 589-599.
library(doex) GF(hybrid$data,hybrid$species)
library(doex) GF(hybrid$data,hybrid$species)
This function performs Generalized p-value test for two-parameter exponential distributed populations.
gpv_exp(data,group,rept)
gpv_exp(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the Generalized p-value test for two-parameter exponential distributed populations |
Mustafa CAVUS
Malekzadeh, A. and Jafari, A. A. (2019) Inference on the equality means of several two-parameter exponential distributions under progressively Type II censoring, Communications in Statistics - Simulation and Computation.
library(doex) gpv_exp(component$lifetime,component$supplier)
library(doex) gpv_exp(component$lifetime,component$supplier)
This function performs Hsieh test for two-parameter exponential distributed populations.
HS(data,group)
HS(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the Hsieh test |
Mustafa CAVUS
Hsieh, H.K. (1986) An exact test for comparing location parameters of k exponential distributions with unequal scales based on type II censored data, Technometrics, 28, 157-164.
library(doex) HS(component$lifetime,component$supplier)
library(doex) HS(component$lifetime,component$supplier)
Hybrid data is taken from Weerahandi (1995) where the goal is to compare four means of corn yields by four hybrids: A, B, C, D.
An agricultural research scientist is interested in comparing four hybrids of corn. The four corn hybrids were planted in a random order in 22 plots of equal size and fairly homogeneous soil conditions. A set of data on yield from corn hybrids obtained from the experiment.
The usual P-value based on the assumption of equal population within hybrid variances (F statistic 1.841) is 0.176, thus leading to acceptance of the null hypothesis of equal means. It is however clear from the values of the sample standard deviations that the assumption of equal population variances may not be tenable for this data set.
hybrid
hybrid
data |
A set of data on yield from corn hybrids obtained from the experiment. |
species |
A set of corn hybrids. |
Mustafa CAVUS
Weerahandi, S. (1995) Exact Statistical Methods for Data Analysis. New York: Springer.
library(doex) hybrid$data; hybrid$species;
library(doex) hybrid$data; hybrid$species;
This function performs Johansen F-test.
JF(data,group)
JF(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the Johansen F-test |
Mustafa CAVUS
Johansen, S. (1980) Whe Welch-James approximation to the distribution of the residual sum of squares in a weighted linear regression, Biometrika, 67(1), 58-92.
library(doex) JF(hybrid$data,hybrid$species)
library(doex) JF(hybrid$data,hybrid$species)
This function performs modified Brown-Forsythe test.
MBF(data,group)
MBF(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the modified Brown-Forsythe test |
Mustafa CAVUS
Mehrotra, D.V. (1997) Improving the Brown-Forsythe solution to the generalized Behrens-Fisher problem, 26(3), 1139-1145.
library(doex) MBF(hybrid$data,hybrid$species)
library(doex) MBF(hybrid$data,hybrid$species)
This function performs the modified generalized F-test.
MGF(data,group,rept)
MGF(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the modified generalized F-test |
Mustafa CAVUS
Cavus, M., Yazici, B. and Sezer, A. (2017) Modified tests for comparison of group means under heteroskedasticity and non-normality caused by outlier(s), Hacettepe Journal of Mathematics and Statistics, 46 (3), 492-510.
library(doex) MGF(hybrid$data,hybrid$species)
library(doex) MGF(hybrid$data,hybrid$species)
This function performs adjusted Welch test.
MW(data,group)
MW(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
tstat |
the test statistic of the adjusted Welch test |
pvalue |
the p-value of the adjusted Welch test |
Mustafa CAVUS
Hartung, J., Argaç, D. and Makambi, K. (2002) Small sample properties of tests on homogeneity in one-way ANOVA and meta-analysis, Statistical Papers, 41, 197-235.
library(doex) MW(hybrid$data,hybrid$species)
library(doex) MW(hybrid$data,hybrid$species)
This function performs Chen's one stage test.
OS(data,group,nout,rept)
OS(data,group,nout,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
nout |
an integer |
rept |
The loop size to perform the test. |
pvalue |
the p-value of Chen's one stage test |
Mustafa CAVUS
Chen, S.Y. and Chen, H.J. (1998) Single-stage analysis of variance under heteroscedasticity, Communications in Statistics - Simulation and Computation, 27(3), 641-666.
library(doex) OS(hybrid$data,hybrid$species,1,10000)
library(doex) OS(hybrid$data,hybrid$species,1,10000)
This function performs One Stage Range test.
OSR(data,group,nout,rept)
OSR(data,group,nout,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
nout |
an integer |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the One Stage Range test |
Mustafa CAVUS
Chen, S.Y. and Chen, H.J. (2000) A Range Test for the Equality of Means when Variances are Unequal, American Journal of Mathematical and Management Sciences, 20:1-2, 145-170.
library(doex) OSR(hybrid$data,hybrid$species,1,10000)
library(doex) OSR(hybrid$data,hybrid$species,1,10000)
This function generates the outlier(s) by Interquantile range approach.
outly(ndata,noutlier,meand,vard,dif,alpha,normality.status,skewn.status)
outly(ndata,noutlier,meand,vard,dif,alpha,normality.status,skewn.status)
ndata |
sample size of the data without outlier(s). |
noutlier |
number of outlier(s) in data. |
meand |
mean of the data. |
vard |
variance of the data. |
dif |
distance level of outlier(s) from the whiskers. |
alpha |
significance level for the normality test. |
normality.status |
a logical operator controls the normality of data with outlier. "TRUE" for normal and "FALSE" for non-normal |
skewn.status |
a logical operator controls the skewness of the data with outlier. "0" for symmetric, "1" for right-skewed and "-1" for left-skewed. |
data |
the vector contains the generated data with outlier(s) |
outlier |
the vector contains the generated outlier(s) |
normality.test |
the result of the Shapiro-Wilk normality test for the generated data |
Mustafa CAVUS
Alexander, R.A., Govern, D.M. (1994) A new and simplier approximation for ANOVA under variance heterogeneity, Journal of Educational Statistics, 19(2), 91-101.
library(doex) outly(8,2,2,0.05,FALSE)
library(doex) outly(8,2,2,0.05,FALSE)
This function performs Parametric Bootstrap test.
PB(data,group,rept)
PB(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the Parametric Bootstrap test |
Mustafa CAVUS
Krishnamoorthy, K., Lu, F., Mathew, T. (2007) A parametric bootstrap approach for anova with unequal variances: Fixed and random models, Computational Statistics and Data Analysis, 51, 5731-5742.
library(doex) PB(hybrid$data,hybrid$species)
library(doex) PB(hybrid$data,hybrid$species)
This function performs Parametric Bootstrap test for two-parameter exponential distributed populations.
pb_exp(data,group,rept)
pb_exp(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the Parametric Bootstrap test for two-parameter exponential distributed populations |
Mustafa CAVUS
Malekzadeh, A. and Jafari, A. A. (2019) Inference on the equality means of several two-parameter exponential distributions under progressively Type II censoring, Communications in Statistics - Simulation and Computation.
library(doex) pb_exp(component$lifetime,component$supplier)
library(doex) pb_exp(component$lifetime,component$supplier)
This function performs Permutation F-test.
PF(data,group,rept)
PF(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the Permutation F-test |
Mustafa CAVUS
Berry, K.J. and Mielke, P.W. (2002) The Fisher-Pitman permutation test: an attractive alternative to the f test, Psychological Reports, 90, 495-502.
library(doex) PF(hybrid$data,hybrid$species,1000)
library(doex) PF(hybrid$data,hybrid$species,1000)
This function performs the revised generalized F-test.
RGF(data,group,rept)
RGF(data,group,rept)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
rept |
The loop size to perform the test. |
pvalue |
the p-value of the revised generalized F-test |
Mustafa CAVUS
Cavus, M., Yazici, B. and Sezer, A. (2019) A revised generalized F-test for testing equality of group means under non-normality caused by skewness (under review).
library(doex) RGF(hybrid$data,hybrid$species)
library(doex) RGF(hybrid$data,hybrid$species)
This function performs adjusted Scott-Smith test.
SS(data,group)
SS(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the Scott-Smith test |
Mustafa CAVUS
Scott, A. and Smith, T. (1971) Interval estimates for linear combinations of means, Applied Statistics, 20, 276–285.
library(doex) SS(hybrid$data,hybrid$species)
library(doex) SS(hybrid$data,hybrid$species)
This function performs the Welch-Aspin test.
WA(data,group)
WA(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the Welch-Aspin test |
Mustafa CAVUS
Aspin, A.A. (1948) An examination and further development of a formula arising in the problem of comparing two means, Biometrika, 35, 88-96.
library(doex) WA(hybrid$data,hybrid$species)
library(doex) WA(hybrid$data,hybrid$species)
This function performs Welch F-test.
WE(data,group)
WE(data,group)
data |
A vector containing the observations to which the treatments are randomly assigned. |
group |
A numerical or character vector indicating the treatment/control groups. |
pvalue |
the p-value of the Welch F-test |
Mustafa CAVUS
Welch, B.L. (1951) On the comparison of several mean values, Biometrika, 38, 330-336.
library(doex) WE(hybrid$data,hybrid$species)
library(doex) WE(hybrid$data,hybrid$species)