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

Discuss statistics related things
Post Reply
jpmaroco
Posts: 13
Joined: Fri Mar 24, 2017 4:24 pm

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

Post by jpmaroco »

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
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

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

Post by jonathon »

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
jpmaroco
Posts: 13
Joined: Fri Mar 24, 2017 4:24 pm

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

Post by jpmaroco »

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,
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

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

Post by jonathon »

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
jpmaroco
Posts: 13
Joined: Fri Mar 24, 2017 4:24 pm

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

Post by jpmaroco »

Thanks Jonathon, i will do do that
Best regards and thanks for Jamovi!
Post Reply