# Tukey's test on two way ANOVA

So I have done a two way ANOVA, and would like to do a post-hoc Tukey's HSD test. What should I use for the $k$, SE, degrees of freedom and what is my $q$ and HSD? The exp is done in 4 places with three different treatments, each with 7 repeats (so $k=12$?).

This is my two way ANOVA result:

ANOVA

Source
of Variation    SS          df    MS             F          P-value      F crit
Sample           1666          3  555,3333333  6,843562032  0,00040284   2,731807037
Columns         49129,78571    2  24564,89286  302,7215512  8,96496E-36  3,123907449
Interaction     697,9285714    6  116,3214286  1,433468629  0,213821132  2,227403975
Within          5842,571429   72  81,1468254
Total           57336,28571   83


Let $a (sample) = 4, b (columns) = 3,$ and $n (replicates) = 7.$ Assuming you want a 95% confidence level, then $\alpha=0.05.$ Now, your Tukey test statistic needs to be compared against the studentized range distribution percentile corresponding to $q[(1-\alpha), a, (n-1)ab] = q[0.95, 4, (6\times4\times3)] = q[0.95, 4, 72]=3.719468$. For your test statistic denominator, you will use a $SE$ of $\sqrt{(2*MSE\over{bn}}$ = $\sqrt{2*81.1468254\over{28}}=2.40753$