When considering the relationship among three or more variables, an interaction may arise. Interactions describe a situation in which the simultaneous influence of two variables on a third is not additive. Most commonly, interactions are considered in the context of regression analyses, but they may also be evaluated using two-way ANOVA.

A simple setting in which interactions can arise is a two-factor experiment analyzed using Analysis of Variance (ANOVA). Suppose we are interested in studying the effects of cocaine on sleep. We might design an experiment to simultaneously test whether both the use of cocaine and the duration of usage affect the number of hours a squirrel will sleep in a night. We might give half of the squirrels we test cocaine, and the other half a placebo substance (the substance variable). And we might vary the duration of usage by administering cocaine or placebo for one of two possible durations before test, 4 weeks or 12 weeks (the duration variable). We can then consider the average treatment response (e.g. number of hours slept) for each squirrel, as a function of the treatment combination that was administered (e.g. substance and duration). The following table shows one possible situation:

4-Week Placebo (Control)

4-Week Cocaine

12-Week Placebo (Control)

12-Week Cocaine

7.5

5.5

8.0

5.0

8.0

3.5

10.0

4.5

6.0

4.5

13.0

4.0

7.0

6.0

9.0

6.0

6.5

5.0

8.5

4.0

There are three null hypotheses to be tested:

We can start by computing the group means (for each cell, row, and column):

Group Means

4-Week

12-Week

All Durations

Placebo

7

9.7

8.35

Cocaine

4.9

4.7

4.8

All Substances

5.95

7.2

6.575

And by calculating the sum of squares (SS) for each group (cell):

Now, we'll calculate the SSB:

Now, we'll calculate the SSW:

Now, we'll calculate the SSR:

Now, we'll calculate the SSC:

Now, we'll calculate the SSRC:

Now, we'll calculate the SST:

Now, we'll calculate the F values:

And, finally, we can organize all of the above into a table, along with the appropriate FCRIT values (looked up in a table like <a href="http://www.medcalc.org/manual/f-table.php">this one</a>) that we'll use for comparison and interpretation of our computations:

ANOVA TABLE

Source

SS

df

s2

Fobt

Fcrit

p

rows

63.0125

1

63.0125

41.06721

4.49

p < 0.05

columns

7.8125

1

7.8125

5.09165

4.49

p < 0.05

r * c

10.5125

1

10.5125

6.851324

4.49

p < 0.05

within

24.55

16

1.534375

--

--

--

total

187.225

19

--

--

--

--

MoinMoin Appliance - Powered by TurnKey Linux