This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Games-howell test in R and implementing a function

How do I implement this code to find a significant difference between groups in my data set using Games -Howell test? This is the link to the code for the Games-Howell test: http://aoki2.si.gunma-u.ac.jp/R/src/tukey.R I would like to know how do I implement this code in R? Which arguments do I need to feed to the function to give me the result?

r gameshowell nonparametrictest

Hi,

How is this related to bioinformatics?

Because I would like to analyse a patient dataset to look for statistically significant difference between 2 groups of patients. So it is a bioinformatic analysis of metabolomes and hence I would like to execute this code to see for a difference.

Please edit your question and add this information in there. This connection makes the post relevant to the website, as without it, you could be asking this on Cross Validated (the statistics Stack Exchange).

My data set does not have an equal sample size, that is why I preferred to do the Games-Howell. But when I performed the Games-Howell from the "userfriendlyscience" package, it was a post-hoc analysis for the ANOVA but I wanted to do a non-parametric test from the beginning as my data is not normally distributed.

GH test function from rstatix which i linked above is not a post-hoc test (as far as I know). It seems it can handle imbalanced data sets. However, requires more (>6) samples per group.

Yea. I just ran the test using the rstatix package and it gave me the same result as the Post-hoc Games-Howel test of the User-friendly package. That is why I was trying to figure out how to execute the code I mentioned above to check if it give me a different result.

you don't need to implement it in R. It's already in R code. Source the file and use the function tukey as defined in the source code.

Example code using the code furnished in OP:

> source("http://aoki2.si.gunma-u.ac.jp/R/src/tukey.R")

> tukey(ToothGrowth$len,ToothGrowth$supp,method="Games-Howell")

$result1
        n     Mean Variance
Group1 30 20.66333 43.63344
Group2 30 16.96333 68.32723

$Games.Howell
           t       df          p
1:2 1.915268 55.30943 0.06063451

> tukey(ToothGrowth$len,ToothGrowth$supp,method="Tukey")
$result1
        n     Mean Variance
Group1 30 20.66333 43.63344
Group2 30 16.96333 68.32723

$Tukey
           t          p
1:2 1.915268 0.06039337

$phi
[1] 58

$v
[1] 55.98033

Thanks a lot for your help. I ran the code, and it gave me the same result. So, I guess it is the correct output. Have a nice day :)

0 answers

No answers yet.

Log in to answer this question.