# Pairwise comparisons for a nested effects

This is basically a theoretical question which is based on the following R output. I have the following R output which contains both crossed and nested effects.

The group(3 levels) and phase(2 levels) are crossed factors. The rat_id(8 levels) is nested under group. I need to find the all pairwise comparisons for main effects with family-wise confidence level of 95%.

Since the interaction effect between group and phase is not significant , i can use the Tukey procedure to find all pairwise comparisons for those 2 factors.

My question is , when there is a nested effect(like rat_id) , can i use the Tukey procedure ?

My thinking is that i can use it irrespective of the factor is crossed or nested. But i dont know whether my intuition is correct or not. it is really appreciated if someone help me to figure it out.

• You have 26 regression coefficients. Image if you know their true values, for example, $\beta_0 =1.8, \beta_2 = 3.4 ...$, what is your main effects? – user158565 Nov 13 '18 at 4:31
• @a_statistician the main effects are the each regression coefficients. isn’t it? – Sam88 Nov 13 '18 at 5:14
• @a_statistician So those regression coefficients are the values of main effects isnt it ? so that means irrespective of whether they are nested or crossed factors , then those effect will be a main effect. Am i correct ? – student_R123 Nov 14 '18 at 3:56
• It depends on you coding methods or design matrix. But generally the main effect is the linear combination of the regression coefficients, not just linear coefficient itself. – user158565 Nov 14 '18 at 4:05