What is the distribution used for the tukey's HSD test?

Discuss statistics related things

by jpmaroco » Sun Sep 22, 2019 10:34 am

Hi all,
I am using jamovi to teach ANOVA and post-hoc.
When explaining the HSD test, I tell students that the Tukey test statistic is:

Code: Select all
t=(Mean_i - Mean_j)/sqrt(QME*(1/n_i+1/n_j) with N-k degrees of freedom


I realize that the above statistic is not the Tukey-Cramer Q defined as

Code: Select all
Q=(Mean_i - Mean_j)/sqrt(QME/2*(1/n_i + 1/n_j)


I guess that this would be ok if for t one used the t-distribution to find the p-value. However, I can't figure out what distribution jamovi is using (I also cheked SPSS and some question arise). I do however get the p-value that jamovi produces if I use Q and the qtukey distribution...

Can someone please clarify what formulae jamovi is using for the HSD Tukey's p-value?

Thanks in advance.
João
jpmaroco
 
Posts: 5
Joined: Fri Mar 24, 2017 4:24 pm

by jonathon » Sun Sep 22, 2019 11:56 am

hi joão

i'm not sure how the p-values are arrived at, but they're based on the estimated marginal means. here's the code we use to calculate them:

https://github.com/jamovi/jmv/blob/mast ... #L402-L407

cheers

jonathon
User avatar
jonathon
 
Posts: 965
Joined: Fri Jan 27, 2017 10:04 am

by jpmaroco » Sun Sep 22, 2019 12:29 pm

Hi Jonathon,
Thak you so much for the quick (sunday) repply.

I see that you are using some tukey table to get the p-value:

row[['ptukey']] <- tukey[index,'p.value']

I think there's some type of p*k*(k-1)/2 adustment for multiple corrections.. but I am not sure what the Tukey correction would be,

Warm regards and have a nice Sunday,
jpmaroco
 
Posts: 5
Joined: Fri Mar 24, 2017 4:24 pm

by jonathon » Sun Sep 22, 2019 9:36 pm

hi,

the tukey object here, is produced by the emmeans package. you'll have to take a look at emmeans to see what it does.

cheers

jonathon
User avatar
jonathon
 
Posts: 965
Joined: Fri Jan 27, 2017 10:04 am

by jpmaroco » Tue Sep 24, 2019 9:39 am

Thanks Jonathon, i will do do that
Best regards and thanks for Jamovi!
jpmaroco
 
Posts: 5
Joined: Fri Mar 24, 2017 4:24 pm


Return to Statistics

cron