Content uploaded by James R. Lewis
Author content
All content in this area was uploaded by James R. Lewis on Aug 07, 2014
Content may be subject to copyright.
414
Behavior Research Methods, Instruments, & Computers
1993, 25 (3), 414-415
Pairs of Latin squares that produce
digram-balanced Greco-Latin designs:
A BASIC program
JAMES R. LEWIS
International Business Machines, Inc.,, Boca Raton, Florida
It is possible to create pairs of Latin squares that are
digram balanced (in other words, that counterbalance
immediate sequential effects) in a Greco-Latin design. A
behavioral researcher can use these squares to design an
efficient, well-balanced study without relying on chance.
Researchers can apply these squares to any experiment in
which they must pair conditions with different stimuli in a
within-subject design. For experiments with a large number of
conditions, however, the procedure is very time-consuming if
done manually. A BASIC program is described that generates
the correct pairs of squares for experiments with as many as
80 conditions.
The usual Latin square design ensures that each experi-
mental condition appears an equal number of times in each
row and column of the square (Kirk, 1982; Myers, 1979).
Williams (1949), Bradley (1958), and Wagenaar (1969)
described Latin squares that have the property of counter-
balancing immediate sequential effects. Wagenaar referred to
this property as “digram-balanced.” As Bradley (1958) states,
this is important when:
it may be suspected that reaction to any given experimental
condition will be influenced (a) by the number of experimental
conditions preceding it, i.e., by its ordinal position in the sequence
of presentation, (b) by the particular experimental condition
immediately preceding it. This situation is commonly encountered
in psychological experiments when every subject is run under all
experimental conditions. Such experimental designs reduce
variance at the expense of introducing sequential effects such as
learning, fatigue, and interactions between reactions to various
experimental conditions, particularly those adjacent in order of
presentation. (p. 525)
Bradley (1958) rigorously proved a simple method of
construction that guarantees this counterbalancing in a single
square with an even number of conditions, and Williams
(1949) provided alternative methods for this counterbalancing
in two squares when the number of conditions is odd. With a
variation on these methods of construction, Lewis (1989)
published algorithms for creating pairs of Latin squares that
simultaneously counterbalance both immediate sequential
effects and the pairing of conditions and stimuli for within-
subject experiments.
I would like to acknowledge the helpful comments from Jerome L.
Myers and an anonymous reviewer, which substantially improved this
paper. Correspondence should be addressed to James R. Lewis,
Design Center/Human Factors Department, IBM Corp., P.O. Box
1328, Boca Raton, FL 33429-1328 (jimlewis@us.ibm.com).
Copyright 1993 Psychonornic Society, Inc.
Across these pairs of Latin squares, the stimuli and conditions
form a Greco-Latin design (Kirk, 1982) in which each level of
the condition and each level of the stimulus appear exactly
once in each row and column of each square, and each
combination appears exactly twice over both squares. Across
both squares, each condition immediately precedes and
follows each other condition exactly twice, and each stimulus
immediately precedes and follows each other stimulus exactly
twice, forming a digram-balanced design.
Such experiments are very common in human factors
research. For example, a behavioral researcher could use these
squares to design an experiment to investigate the perceived
legibility of different computer displays. Participants in
the study would read different text samples on the
displays and would rank the displays along the
dimension of perceived legibility. Using Lewis’s (1989)
algorithms, a study with five displays and five text
samples would require a minimum of 10 participants to
complete a digrarn-balanced Greco-Latin design.
The Program
The IBM1 BASIC program LATBUILD uses Lewis’s
(1989) algorithms to create the pairs of squares. The only
program inputs are the number of conditions in the
experiment and a name for the output file. If the user does not
provide a name for the output file, then the program’s default
output file name is PAIRSQUR. (Each time the program
creates an output file, it will overwrite any existing file with
the same name.) The output file contains an ASCII listing of
the pairs of conditions and stimuli in an easy-to-read format.
The user can either print the file or can view it with any
standard editor or word processor. Figure 1 shows the output
for five conditions, and Figure 2 shows the output for six
conditions.
Discussion
After the program generates the squares, the next step is to
randomly assign conditions and stimuli to the numbers in the
squares. The appropriate method of analysis depends on the
nature of the data that the researcher collects in the
experiment. Three potential methods are repeated
measures analysis of variance (Kirk, 1982; Myers,
1979), multivariate analysis of variance (Cliff, 1987), and
the Friedman two-way layout test (Hollander & Wolfe, 1973).
A behavioral researcher can use these squares to design an
efficient, well-balanced study without relying on chance
assignment. Researchers can apply these squares to any
experiment in which they must pair conditions with different
stimuli in a within-subject design. Because the program in this
paper can create the correct pairs of squares easily for
experiments with as many as 80 conditions, this formerly
time-consuming procedure is now easier to apply.
(Manuscript received May 1, 1992,
revision accepted for publication November 23, 1992
PROGRAM FOR DIGRAM-BALANCED GRECO-LATIN DESIGNS 415
Across both squares, the design is simultaneously digram
balanced and Greco-Latin. However, the characteristics of the
individual squares are different depending on whether the
number of experimental conditions is even or odd. When the
number of conditions is odd, each square is Greco-Latin
because the condition-stimulus pairing is balanced within the
square (although a single square is not digram balanced).
When the number of conditions is even, the squares are not
Greco-Latin because the condition-stimulus pairing is not
balanced within a single square (although a single square is
digram balanced).
Researchers can use the program output in a number of
other ways. If a researcher only needs digram-balanced
designs, without considering condition-stimulus pairing, then
he/she can just ignore the stimulus output. For an even number
of conditions only, researchers can use the program to produce
two different Latin squares that are each digram balanced. For
an odd number of conditions only, researchers can use the
program to produce two different Greco-Latin squares.
Program Availability
The source code for this program may be obtained by
sending a DOS-formatted 3.5-in, disk to the author.
Order
Subject 1 2 3 4 5
1 Condition: 1 5 2 4 3
Stimulus: 3 4 2 5 1
2 Condition: 2 1 3 5 4
Stimulus: 4 5 3 1 2
3 Condition: 3 2 4 1 5
Stimulus: 5 1 4 2 3
4 Condition: 4 3 5 2 1
Stimulus: 1 2 5 3 4
5 Condition: 5 4 1 3 2
Stimulus: 2 3 1 4 5
6 Condition: 3 4 2 5 1
Stimulus: 1 5 2 4 3
7 Condition: 4 5 3 1 2
Stimulus: 2 1 3 5 4
8 Condition: 5 1 4 2 3
Stimulus: 3 2 4 1 5
9 Condition: 1 2 5 3 4
Stimulus: 4 3 5 2 1
10 Condition: 2 3 1 4 5
Stimulus: 5 4 1 3 2
Figure 1. LATBUILD program output file for five conditions.
Order
Subject 1 2 3 4 5 6
1 Condition: 1 6 2 5 3 4
Stimulus: 1 2 6 3 5 4
2 Condition: 2 1 3 6 4 5
Stimulus: 2 3 1 4 6 5
3 Condition: 3 2 4 1 5 6
Stimulus: 3 4 2 5 1 6
4 Condition: 4 3 5 2 6 1
Stimulus: 4 5 3 6 2 1
5 Condition: 5 4 6 3 1 2
Stimulus: 5 6 4 1 3 2
6 Condition: 6 5 1 4 2 3
Stimulus: 6 1 5 2 4 3
7 Condition: 6 1 5 2 4 3
Stimulus: 1 6 2 5 3 4
8 Condition: 1 2 6 3 5 4
Stimulus: 2 1 3 6 4 5
9 Condition: 2 3 1 4 6 5
Stimulus: 3 2 4 1 5 6
10 Condition: 3 4 2 5 1 6
Stimulus: 4 3 5 2 6 1
11 Condition: 4 5 3 6 2 1
Stimulus: 5 4 6 3 1 2
12 Condition: 5 6 4 1 3 2
Stimulus: 6 5 1 4 2 3
Figure 2. LATBUILD program output file for six conditions.
REFERENCES
BRADLEY, J. V. (1958). Complete counterbalancing of immediate
sequential effects in a Latin square design. Journal of the American
Statistical Association, 53, 525-528.
CLIFF, N. (1987). Analyzing multivariate data. San Diego, CA: Har-
court Brace Jovanovich.
HOLLANDER, M., & WOLFE, D. A. (1973). Nonparametric
statistical methods. New York: Wiley.
KIRK, R. E. (1982). Experiment design: Procedures for the
behavioral sciences. Monterey, CA: Brooks/Cole.
LEWIS, J. R. (1989). Pairs of Latin squares to counterbalance sequen-
tial effects and pairing of conditions and stimuli. In Proceedings of
the 33rd Annual Meeting of the Human Factors Society (pp. 1223-
1227). Santa Monica, CA: Human Factors Society.
MYERS, J. L. (1979). Fundamentals of experimental design. Boston:
Allyn & Bacon.
WAGENAAR, W. A. (1969). Note on the construction of digram-
balanced Latin squares. Psychological Bulletin, 72, 384-386.
WILLIAMS, E. J. (1949). Experimental designs balanced for the esti-
mation of residual effects of treatments. Australian Journal of
Physical Sciences, A2, 149-168.
NOTE
1.IBM is a registered trademark of the International Business
Machines Corporation.
(Manuscript received May 1, 1992,
revision accepted for publication November 23, 1992