gp.test | R Documentation |
gp.test
tests whether two or more samples from normal distributions have the same means when the variances are not necessarily equal.
gp.test(formula, data, method = c("gtb","gtf"), alpha = 0.05,
na.rm = TRUE, verbose = TRUE)
formula |
a formula of the form |
data |
a tibble or data frame containing the variables in |
method |
a character string to select the method. "gtb": Generalized Test Equivalent to Parametric Bootstrap Test (size close to intended), "gtf": Generalized Test Equivalent to Fiducial Test (size assured). |
alpha |
the level of significance to assess the statistical difference. Default is set to alpha = 0.05. |
na.rm |
a logical value indicating whether NA values should be stripped before the computation proceeds. |
verbose |
a logical for printing output to R console. |
A list with class "owt" containing the following components:
p.value |
the p-value of the corresponding test. |
alpha |
the level of significance to assess the statistical difference. |
method |
the selected method used in generalized test. |
data |
a data frame containing the variables in which NA values (if exist) are removed. |
formula |
a formula of the form |
The methods underlying Generalized Tests are summarized in Weerahandi and Krishnamoorthy (2019), which shows that both the Fiducial and the Parametric Bootstrap tests are generalized tests based on an exact probability statement on alternative test variables. Greater details of them can be found in Krishnamoorthy et al. (2007) and Li et al. (2011). For greater details about Generalized Inference, the reader is referred to Weerahandi (2004), which can be freely read at Generalized Inference.
For additional information about the methods and the code, the reader can contact the authors of this code, Sam Weerahandi or Malwane Ananda.
Sam Weerahandi, Malwane Ananda
Daniel, W.W., Cross, C.L. (2013). Biostatistics: A Foundation for Analysis in the Health Sciences. (10th ed.). John Wiley and Sons, Inc.
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:12, 5731-5742.
Li, X., Wang J., Liang H. (2011). Comparison of several means: a fiducial based approach. Computational Statistics and Data Analysis, 55:5, 1993-2002.
Weerahandi, S. (2004). Generalized Inference in Repeated Measures: Exact Methods in MANOVA and Mixed Models, Series in Probability and Statistics. John Wiley and Sons, Inc.
Weerahandi, S., Krishnamoorthy, K. (2019). A note reconciling ANOVA tests under unequal error variances. Communications in Statistics-Theory and Methods, 48:3, 689-693.
library(onewaytests)
out <- gp.test(Sepal.Length ~ Species, data = iris, method = "gtb")
paircomp(out)
out <- gp.test(Sepal.Length ~ Species, data = iris, method = "gtf")
paircomp(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.