<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FAQ/lincon</title><revhistory><revision><revnumber>12</revnumber><date>2014-05-07 12:39:09</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>11</revnumber><date>2014-05-07 12:37:33</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>10</revnumber><date>2013-03-08 10:17:35</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>9</revnumber><date>2008-07-14 16:08:09</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>8</revnumber><date>2008-07-14 16:05:33</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>7</revnumber><date>2008-07-14 16:04:55</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>6</revnumber><date>2008-07-14 15:59:30</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>5</revnumber><date>2008-07-14 15:58:58</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>4</revnumber><date>2008-07-14 15:58:01</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>3</revnumber><date>2008-07-14 15:57:35</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>2</revnumber><date>2008-07-14 15:55:24</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>1</revnumber><date>2008-07-14 15:54:40</date><authorinitials>PeterWatson</authorinitials></revision></revhistory></articleinfo><section><title>How do I compare group means in a non-standard post-hoc contrast?</title><para>There may be a specific group comparison you are interested in which is not routinely outputted with an analysis of variance. </para><para>Suppose we have a vector of contrast coefficients, c, with i-th term c(i) being the i-th group contrast coefficient. </para><para>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. </para><para>The difference we are interested in is, therefore, </para><para>control mean - 0.5(memory deficit group mean - delayed recall group mean)  </para><para>which has contrast coefficients c(CO)=1, c(GM)=c(DR)=-0.5. </para><para>The variance of a contrast in group means may be written in general as </para><para>sum(i=1 to k) [(c(i)*c(i))]/[N(i)]MSE </para><para>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. </para><para>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  </para><para>1/[N(CO)] + 1/[4N(GM)] + 1/[4N(DR)] MSE. </para><para>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. </para><para>So we compute </para><para>[control mean - 0.5(memory deficit group mean - delayed recall group mean)]/ Sqrt[1/[N(CO)] + 1/[4N(GM] + 1/[4N(DR)] MSE] </para><para>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). </para></section></article>