Valentim Rodrigues Alferes, University of Coimbra (Portugal), 2009




Last Modified: NOV-09-2009

SCRAED is a package of 37 self-contained SPSS syntax files that performs simple and complex random assignment in experimental designs.

For between-subjects designs, SCRAED includes simple random assignment (no restrictions, forced equal sizes, forced unequal sizes, and unequal probabilities), block random assignment (simple and generalized blocks), and stratified random assignment (no restrictions, forced equal sizes, forced unequal sizes, and unequal probabilities).

For within-subjects or repeated measures designs, SCRAED includes complete counterbalancing, partial counterbalancing (Latin squares), carryover designs (single and double), truncated counterbalancing, and random ordering of treatments.

SCRAED also includes complete documentation and several “randomization tools” (e.g., syntaxes for generating tables of random numbers or random permutations of n integers), namely ChooseRMD.sps, an SPSS syntax file for choosing a convenient repeated measures design and the correspondent SCRAED subprogram.

You can run the syntaxes from this web site, provided you have SPSS installed in your computer. Alternatively, you can download a compressed file containing all programs and documentation.







Simple Random Assignment


SimpleRand1.sps – Equal probabilities


SimpleRand2.sps – Forced equal sizes


SimpleRand3.sps – Forced unequal sizes


SimpleRand4.sps – Unequal probabilities


Block Random Assignment


BlockRand.sps – Simple and generalized block designs


Stratified Random Assignment


StrataRand1.sps – No restrictions


StrataRand2.sps – Forced equal sizes


StrataRand3.sps – Forced unequal sizes


StrataRand4.sps – Unequal probabilities






See User Specifications




WITHIN-SUBJECTS DESIGNS (Repeated Measures Designs)


ChooseRMD.sps – Choosing a convenient repeated measures design and an SCRAED program
(see Illustrative Output; see also General Recommendations)


Complete Counterbalancing


CC2.sps – 2 treatments /2 sequences


CC3.sps – 3 treatments /6 sequences


CC4.sps – 4 treatments /24 sequences


CC5.sps – 5 treatments /120 sequences


CC6.sps – 6 treatments /720 sequences


Partial Counterbalancing (Latin Squares) See Standard Latin Squares

LS2.sps – 2 treatments /2 sequences (Identical to CC2 [n per seq.=1] )

LS3.sps – 3 treatments /3 sequences

LS4.sps – 4 treatments /4 sequences

LS5.sps – 5 treatments /5 sequences

LS6.sps – 6 treatments /6 sequences

LS7.sps – 7 treatments /7 sequences

LS8.sps – 8 treatments /8 sequences

LS9.sps – 9 treatments /9 sequences

LS10.sps – 10 treatments /10 sequences

LS11.sps – 11 treatments /11 sequences

LS12.sps – 12 treatments /12 sequences

Carryover Designs

CO2.sps – 2 treatments /2 sequences (Single carryover design: Identical to CC2 [n per seq.=1] and LS2)

CO3.sps – 3 treatments /6 sequences (Double carryover design: Identical to CC3 [n per seq.=1])

CO4.sps – 4 treatments /4 sequences (Single carryover design)

CO5.sps – 5 treatments /10 sequences (Double carryover design)

CO6.sps – 6 treatments /6 sequences (Single carryover design)

CO7.sps – 7 treatments /14 sequences (Double carryover design)

CO8.sps – 8 treatments /8 sequences (Single carryover design)

CO9.sps – 9 treatments /18 sequences (Double carryover design)

CO10.sps – 10 treatments /10 sequences (Single carryover design)

CO11.sps – 11 treatments /22 sequences (Double carryover design)

CO12.sps – 12 treatments /12 sequences (Single carryover design)

Truncated Counterbalancing and Random Ordering of Treatments

Examples of Truncated Counterbalancing

IndRO.sps – Random Ordering of Treatments





See User Specifications







TableRN.sps – Generating a table of random numbers


PerInt.sps – Generating a random permutation of n integers


PerObj.sps – Generating a random permutation of n objects


Buzz phrase generators: BuzzClassic.sps   BuzzEconomy.sps   BuzzHealth.sps











Alferes, V. R. (1997). Investigaηγo cientνfica em psicologia: Teoria e prαtica [Scientific research in psychology: Theory and practice]. Coimbra: Almedina.

APA Publications and Communications Board Working Group on Journal Article Reporting Standards. (2008). Reporting standards for research in psychology: Why do we need them? What might they be? American Psychologist, 63, 839-851. doi: 10.1037/0003-066X.63.9.839

Cochran, W. G., & Cox, G. M. (1957). Experimental designs (2nd ed.). New York: Wiley.

Kiess, H. O., & Bloomquist, D. W. (1985). Psychological research methods: A conceptual approach. Boston: Allyn and Bacon.

Kirk, R. E. (1995). Experimental design: Procedures for the behavioral sciences (3rd ed.). New York: Brooks/Cole.

Maxweel, S. E., & Delaney, H. D. (2004). Designing experiments and analysing data (2nd ed.). Mahwah, NJ: Lawrence Erbaum.

Neter, J., Wasserman, W., & Kutner, M. H. (1985). Applied linear statistical models: Regression, analysis of variance and experimental designs (2nd ed.). Homewood, IL: Irwin.

Shadish, W. R., CooK, T. D., & Campbell, D. T. (2002). Experimental and quasi-experimental designs for generalized causal inference. Boston: Houghton Mifflin.

Winer, B. J., Brown, D. R., & Michels, K. M. (1991). Statistical principles in experimental design (3rd ed.). New York: McGraw-Hill.





Suggested Citation


Alferes, V. R. (2009). SCRAED: Simple and complex random assignment in experimental designs [SPSS Syntax Files]. Retrieved from /niips/spss_prc/scra/scra.htm

Specific program (example: StrataRand2.sps – Forced equal sizes)

Alferes, V. R. (2009). Simple and complex random assignment in experimental designs:  StrataRand2.sps – Stratified random assignment [SPSS Syntax File]. Retrieved from /niips/spss_prc/scra/scra.htm





SPSS Syntax Files