Diff for "FAQ/lincon" - CBU statistics Wiki
location: Diff for "FAQ/lincon"
Differences between revisions 8 and 9
Revision 8 as of 2008-07-14 16:05:33
Size: 1831
Editor: PeterWatson
Comment:
Revision 9 as of 2008-07-14 16:08:09
Size: 1871
Editor: PeterWatson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= How do I compare group means in a non-standard post-hoc contrast = = How do I compare group means in a non-standard post-hoc contrast? =
Line 7: Line 7:
Let us suppose we wish to compare the mean performance on a test of a group of controls (CO) with the average performance of a group with general memory deficits (GM) and a group with delayed recall (DR) problems. Let us suppose we wish to compare the mean test performance of a group of controls (CO) with the average performance of a group with general memory deficits (GM) and a group with delayed recall (DR) problems.
Line 9: Line 9:
The difference we are interested in is The difference we are interested in is, therefore,
Line 15: Line 15:
The variance of a three group contrast may be written as The variance of a contrast in group means may be written in general as
Line 21: Line 21:
For example if we are comparing the control mean with the average of the memory deficit and delayed recall groups the variance is For example if we are comparing the control mean with the average of the memory deficit and delayed recall groups the variance of this difference is
Line 23: Line 23:
$$\frac{1}{N(CO)} + \frac{1}{4N(GM)} + \frac{1}{4N(DR)} MSE $$ $$\frac{1}{N(CO)} + \frac{1}{4N(GM)} + \frac{1}{4N(DR)} MSE $$.
Line 25: Line 25:
If the control mean does not differ from the average of the two patient group means this difference in means divided by the square root of its variance approximately follows a t distribution with degrees of freedom equal to the error df from the anova table. If the control mean does not differ from the average of the two patient group means the difference in means divided by the square root of its variance approximately follows a t distribution with degrees of freedom equal to the error df from the anova table.

How do I compare group means in a non-standard post-hoc contrast?

There may be a specific group comparison you are interested in which is not routinely outputted with an analysis of variance.

Suppose we have a vector of contrast coefficients, c, with i-th term c(i) being the i-th group contrast coefficient.

Let us suppose we wish to compare the mean test performance of a group of controls (CO) with the average performance of a group with general memory deficits (GM) and a group with delayed recall (DR) problems.

The difference we are interested in is, therefore,

control mean - 0.5(memory deficit group mean - delayed recall group mean)

which has contrast coefficients c(CO)=1, c(GM)=c(DR)=-0.5.

The variance of a contrast in group means may be written in general as

$$\sum_text{i=1}text{k} \frac{c(i)text{2}}{N(i)}MSE $$

where N(i) is the number in the i-th of k groups and MSE is the mean square of the error term obtained from the full anova table.

For example if we are comparing the control mean with the average of the memory deficit and delayed recall groups the variance of this difference is

$$\frac{1}{N(CO)} + \frac{1}{4N(GM)} + \frac{1}{4N(DR)} MSE $$.

If the control mean does not differ from the average of the two patient group means the difference in means divided by the square root of its variance approximately follows a t distribution with degrees of freedom equal to the error df from the anova table.

So we compute

$$\frac{\mbox{control mean - 0.5(memory deficit group mean - delayed recall group mean)}}{\sqrt{\frac{1}{N(CO)} + \frac{1}{4N(GM)} + \frac{1}{4N(DR)} MSE}}$$

and compare with a t distribution. If the groups are all quite large (e.g. over 30) then we can compare the above test statistic with a z-value such as, for example, +/- 1.96 (for a two-tailed test at the 5% level).

None: FAQ/lincon (last edited 2014-05-07 12:39:09 by PeterWatson)