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

Discuss statistics related things

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

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?

João
jpmaroco

Posts: 5
Joined: Fri Mar 24, 2017 4:24 pm

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

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

jonathon

Posts: 1286
Joined: Fri Jan 27, 2017 10:04 am

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

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

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

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

jonathon

Posts: 1286
Joined: Fri Jan 27, 2017 10:04 am

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

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

Posts: 5
Joined: Fri Mar 24, 2017 4:24 pm