## Multcompare after ANOVAN - what does it mean?

### Right Grievous (view profile)

on 5 Dec 2013
Latest activity Commented on by Right Grievous

### Right Grievous (view profile)

on 5 Dec 2013
Hi all,
I'm running an ANOVAN (n-way anova) using the Matlab anovan function on my data and 4 grouping variables (the first of which I'm really interested in, the other ones I just want to check they are not significant).
I have a fairly straight forward question; if I run multcompare on the output of this ANOVAN what is it telling me? Or rather, what is it comparing? It looks like it is comparing four different data levels using my first grouping variable which is what I really want.
However these values are different if I just run a one-way anova and then multcompare, which I wouldn't expect unless the anovan is adjusting or changing the data somehow or the mutlcompare after the anovan is not comparing what I think it's comparing...
The Matlab help info is not very helpful because my question regards multcompare after anovan specifically.
As always, any help is greatly appreciated,
Rod.
i.e
% Create some variables
x = [1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4];
y = [1 2 1 3 1.5 2 3 4.5 3.2 2 1 2 1.5 1.3 2.5 20 20 20 20 20];
z = rand(1,length(x));
v = rand(1,length(x));
q = rand(1,length(x));
% Run anovan then multcompare and output means and bounds etc
[P1 T1 S1 T2] = anovan(y',[x' z' v' q'],'continuous',[2 3 4],'display','off');
[c,m,h,nms] = multcompare(S1,'display','off','ctype','hsd');
c
% Run one way anova then multcompare and output means and bounds etc
[pS,a,s] = anova1(y',x','off');
[c,m,h,nms] = multcompare(s,'display','off','ctype','hsd');
c

Right Grievous

### Right Grievous (view profile)

on 5 Dec 2013
The multcompare help states that:
"...the estimates that are compared are the means for each value of the first grouping variable, adjusted by removing effects of the other grouping variables as if the design were balanced."
Does this mean that a multcompare run on an ANOVAN output is similar to an ANCOVAN, i.e. the means are adjusted to remove effects of covariates?