This page contains a guide to doing Analysis of Variance (ANOVA) with Analysis
Lab. Analysis Lab was designed to allow the most common types of designs to
be analyzed with a minimum of effort.
Sections on this page:
One Between-Subjects Variable
One Within-Subjects Variable
Two or More Between-Subject Variables
One or More Between-Subject Variables and one Within-Subject Variable
One or More Between-Subjects Variables and Two more More Within-Subjects Variables
One Between-Subjects Variable
This analysis is used when there are two or more independent groups of subjects
and one score per subject.
- The data should be arranged so that there is one variable that indicates
group membership and a second variable that contains the dependent variable.
The variable indicating group membership must use consecutive integers (e.g.,
1, 2, 3) as group indicators. The data below have two variables; G for group
membership and Y for the dependent variable. There are three groups and four
observations (subjects) per group.
G |
Y |
1 |
5 |
1 |
7 |
1 |
8 |
1 |
6 |
2 |
3 |
2 |
4 |
2 |
5 |
2 |
2 |
3 |
11 |
3 |
13 |
3 |
12 |
3 |
9 |
- Paste the data into analysis lab.
- Copy your data.
- Click the Enter/Edit data button.
- Paste the data using keyboard shortcuts (Control-V for Windows, CMD-V
for Macs). Then click "Accept Data."
Choose Y as the dependent variable and G as the grouping variable as shown. Then
click the ANOVA button. Note that the description says what analysis will
be done. "IV" stands for "Independent Variable" and DV stands for
"Dependent Variable."
- The ANOVA summary table will be presented.
One Within-Subjects Variable
Use this design when you have one group of observations (subjects) with two
or more scores per observation.
- Format your data so that each row contains all the data for one observation.
Each score is a separate variable. For the following example, there are
five observations with three scores per observation. The variable names are
T1, T2, and T3.
T1 |
T2 |
T3 |
2 |
3 |
4 |
3 |
5 |
4 |
2 |
4 |
6 |
1 |
3 |
3 |
6 |
7 |
9 |
- Paste the data into analysis lab (see the instructions for One-Way
Between-Subjects).
- Click the "Advanced" button next to the ANOVA" button.
- Select the dependent variables you want to analyze. and click the "Do Anova"
button. Here the variables T1, and T2, and T3 are chosen.
- The Summary Table is presented. The effect "DV" stands for "Dependent Variable."
It is a test of the within-subjects variable.
Two or More Between-Subject Variables
Use this design when you have more than one between-subject variable and only
one score per subject. In the following example, the variables are A and B.
The variable A has two levels and the variable B has three levels. There are
3 scores per "cell." A cell is a combination of one level of A and one level
of B.
Note that Analysis Lab uses unweighted means analysis rather than the general
linear model. This will give slightly different results from most other programs
when there are unequal sample sizes and the degrees of freedom are greater
than one.
- Format the data so that there is one variable indicating the level of
each independent variable. The variable must use consecutive integer variables. There
is also a dependent variable. In the example, the variable A indicates the
level of the variable A, B indicates the level of the variable B, and Y is
the dependent variable.
A |
B |
Y |
1 |
1 |
3 |
1 |
1 |
5 |
1 |
1 |
4 |
1 |
2 |
7 |
1 |
2 |
6 |
1 |
2 |
8 |
1 |
3 |
4 |
1 |
3 |
9 |
1 |
3 |
6 |
2 |
1 |
9 |
2 |
1 |
9 |
2 |
1 |
10 |
2 |
2 |
13 |
2 |
2 |
11 |
2 |
2 |
14 |
2 |
3 |
6 |
2 |
3 |
7 |
2 |
3 |
9 |
- Paste the data into analysis lab (see the instructions for One-Way
Between-Subjects).
- Click the "Advanced" button next to the ANOVA" button.
- Choose the dependent variable and the independent variables. The independent
variables are called "group variables." Then click the "Do Anova"
button.
- The Summary table is shown below.
One or More Between-Subject Variables and one Within-Subject Variable
-
Format the data so that a variable indicates each level of each between-subject
variable. Include more than one dependent variable. For this example, there
is one between-subjects variable (A) with two levels and one within-subjects
variable (T) with four levels.
A |
T1 |
T2 |
T3 |
T4 |
1 |
5 |
4 |
3 |
6 |
1 |
7 |
6 |
2 |
9 |
1 |
6 |
5 |
7 |
5 |
2 |
8 |
9 |
12 |
14 |
2 |
6 |
7 |
9 |
11 |
2 |
2 |
4 |
3 |
6 |
- Paste the data into analysis lab (see the instructions for One-Way
Between-Subjects).
- Click the "Advanced" button next to the ANOVA" button.
- Choose the dependent variables and the independent variables. The independent
variables are called "group variables." In this example there is
one independent variable (A) and four dependent variables (T1, T2, T3, and
T4). Then click the "Do
Anova" button.
- The Summary table is shown. "DV" stands for dependent variable and is the
effect of the within-subjects factor. A x DV is the interaction of the between-subjects
variable and the within-subjects variable.
One or More Between-Subjects Variables and Two more More Within-Subjects Variables
- Format the data so that a variable indicates each level of each between-subject
variable. Include more than one dependent variable. For this example, there
are two between-subjects variable (Age and Gender) and two within-subjects
variable (Day and Trial ). There are four groups of subjects (the combination
of two levels of Age and two levels of Gender). Each subject is given two
trials a day for two days. For convenience A is used as an abbreviation for
age, G for Gender, D for Day, and T for Trial. The variable D1T1 is the score
for Day 1 Trial 1, D1T2 for Day 1, Trial 2, etc.
A |
B |
D1T1 |
D1T2 |
D2T1 |
D2T2 |
1 |
1 |
5 |
7 |
4 |
8 |
1 |
1 |
4 |
7 |
5 |
9 |
1 |
1 |
5 |
5 |
8 |
9 |
1 |
2 |
5 |
4 |
5 |
7 |
1 |
2 |
4 |
8 |
11 |
12 |
1 |
2 |
8 |
7 |
6 |
5 |
2 |
1 |
12 |
13 |
12 |
15 |
2 |
1 |
10 |
9 |
11 |
13 |
2 |
1 |
8 |
8 |
7 |
15 |
2 |
2 |
13 |
14 |
11 |
12 |
2 |
2 |
7 |
5 |
8 |
7 |
2 |
2 |
9 |
11 |
11 |
10 |
- Paste the data into analysis lab (see the instructions for One-Way
Between-Subjects).
- Click the "Advanced" button next to the ANOVA" button.
- Choose the dependent variables and the independent variables. The independent
variables are called "group variables." In this example there are
two independent variable (A and B) and four dependent variables (D1T1, D1T2,
D2T1, and D2T2). Then click the "Do Complex Anova" at the bottom
of the window.
- Next you name the within-subject variables and specify the number of levels
of each. Since there are two days and two trials per day, both of the values
are two. Analysis Lab allows up to four. In this example there are two (
D and T). Also
indicate that A and B are the between-subjects (group) variables.
- Next you will be asked to associate the variable names to the levels of
the variables. The way the variables were named in this example makes this
a trivial exercise. However, if you used other variable names, it would take
a little effort. Click the "Do ANOVA" button when finished.
- The Summary Table is presented.