The Construction of a Williams Design and Randomization in Cross-Over Clinical Trials Using SAS

A Williams design is a special and useful type of cross-over design. Balance is achieved by using only one particular Latin square if there are even numbers of treatments, and by using only two appropriate squares if there are odd numbers of treatments. PROC PLAN of SAS/STAT is a practical tool, not only for random construction of the Williams square, but also for randomly assigning treatment sequences to the subjects, which makes integration of the two procedures possible. The present paper provides a general SAS program for the random construction of a Williams design and the relevant procedure for randomization. Examples of a three-treatment, three-period (3 × 3) and a four-treatment, four-period (4 × 4) cross-over designs are given to illustrate the function of the SAS program. The results can be regenerated and replicated with the same random number seed. The general SAS program meets the practical needs of researchers in the application of Williams designs.


Introduction
Trials formulated according to cross-over designs are ones in which subjects are given sequences of treatments, with the intent of studying the differences between individual treatments (Senn 2002). Often the subjects are patients and the outcome is a therapeutic or a pharmacodynamic response in medical or pharmaceutical research. As each subject serves as his own matched control, it is possible that cross-over designs yield more efficient treatment comparisons than parallel-group designs. Cross-over designs have attracted a lot of attention in today's medical research and drug development environment because of their unique characteristics (Senn 2006). Such designs are the universal choice for bioequivalence trials. Additionally, cross-over designs may be a preferred option in clinical trials when the disease is chronic and stable, in cases such as asthma, arthritis, hypertension, and diabetes.
The standard and most straightforward AB/BA cross-over design has been widely used in many trials, but it is by no means the only design employed (Senn, D'Angelo, and Potvin 2004). For example, a popular design in bioequivalence is the Williams design (Williams 1949), which consists of three treatments and three periods (3 × 3) in six sequences (such as ABC, ACB, BAC, BCA, CAB, and CBA). Subjects are randomized in equal numbers to six possible sequences of each of the three formulations being studied. The properties of the Williams design will be explained in Section 2. In short, a balanced, uniform cross-over design, such as the Williams design, is an ideal choice when there are more than two treatments in a trial. Pezzullo (2008) provided a list containing Williams designs for experiments ranging from 2 to 26 treatments. These designs were calculated by the williams program in the crossdes package (Sailer 2005), which runs under the R programming system (R Development Core Team 2008). But the Williams designs listed by Pezzullo (2008) provide only one Williams square for a certain number of treatments. For example, when the number of treatments equals four, the list gives only one Williams square, the sequences of which are A B D C, B C A D, C D B A, and D A C B. However, there are six possible Williams squares in the 24 possible Latin squares for the four-treatment, four-period (4 × 4) cross-over design, in which each subject will receive each treatment once (Senn 2002). As Senn points out, there is often no good reason to choose any one Latin square over another; the choice may be made at random. Consequently, the best way to choose a design is to construct a proper Williams square at random and then randomly allocate the appropriate sequences to the subjects. The results can be regenerated and replicated with the same random number seed, which is sometimes required from the expected view of such a trial design by colleagues and regulators. While the williams function in the crossdes does not randomize the design, the get.plan function combined with set.seed can construct randomized Williams designs that are reproducible (Sailer 2005). The goal of the present work is to construct such a Williams design using SAS in one macro, for that SAS is the common statistical software used in the pharmaceutical industry and in medical research.
The aim of this paper is to demonstrate SAS's capacity to construct a proper Williams square at random and then to properly conduct the randomization for the cross-over clinical trial. In Section 2, the properties of the Williams design and its construction are introduced through an example of a 4 × 4 cross-over design. In Section 3, a general SAS program for the construction of a Williams design and the relevant procedures of randomization is provided. In Section 4, Examples of a 3 × 3 and a 4 × 4 cross-over designs are given to illustrate the function of the SAS program. A discussion and some recommendations are provided in Section 5.

Williams designs
The Williams design is a special case of the cross-over and Latin square designs. A Latin square, in which every treatment is represented once, and once only, in each column and in Subject no Sequence no Actual sequence Period 1 2 3 4 each row, yields uniform cross-over designs; it represents uniformity both within periods and within sequences. To achieve the highest possible efficiency, the design must be balanced. In a balanced design, each of the treatments occurs the same number of times in each period and the number of subjects who receive treatment i in one period and treatment j in the next period is the same for all i = j (Jones and Kenward 2003). Chinchilli and Lengerich (2007) give examples of Latin square designs. Some of them have additional properties that other Latin squares do not. For example, in the design listed in Table 1, every treatment follows every other treatment the same number of times. Such a cross-over design, which was introduced by Williams (1949), is said to be balanced with respect to first-order carryover effects. Williams designs require fewer subjects than those based on complete sets of orthogonal Latin squares. If the number of treatments to be tested is even, the design needs only one Latin square, called the Williams single; otherwise it consists of two Latin squares (except in a few special cases), called the Williams pair (Bate and Jones 2006).

Practical construction of a Williams design
Although Williams (1949) describes the steps needed to construct one of his designs, a more easily remembered algorithm is given by Sheehe and Bross (1961). The details of the construction methods of a Williams design are found in Jones and Kenward (2003). An encyclopedia review article on the related subject is found in Bate and Jones (2008).
A Williams design can be generated by re-arranging a "standard" Latin square design, in which the first row and column consists of the letters written in alphabetical order. The practical steps in Sheehe and Bross's algorithm are as follows (Jones and Kenward 2003): 1. Number the treatments from 1 to t (t = the number of treatments to compare).
4. Slice the resulting t × 2t array down the middle to yield two t × t arrays. The columns of each t × t array correspond to the periods, the rows are the treatment sequences, and the numbers within the square are the treatments.
5. If the number of treatments is even, any one of the two t × t arrays are chosen. If the number of treatments is odd, both arrays are used.
The design for t = 4 obtained by using this algorithm and choosing the left-hand square is shown in Table 1.

Randomization in a Williams design
Since the objective is to generate a uniform and balanced square, a Williams design is not merely based on the 'standard' Latin square. To generate a proper Williams design, as in the above steps, based on Sheehe and Bross's algorithm, a simple Latin square is constructed at random, and then re-arranged.
In a cross-over trial, subjects are not randomized to treatment in the same sense as they are in a parallel-group design. In cross-over studies, only the treatment sequences are randomized (Piantadosi 2005;Jones and Kenward 2003). Consequently, after the Williams design is constructed at random, the appropriate sequences are then randomly assigned to the subjects. In addition, equal numbers of subjects may be allocated to all the sequences to ensure balance. Thus, the number of subjects required in the trial is usually a multiple of the number of sequences. In practice, there are usually several patients assigned to each sequence.

General SAS Program
If the objective is simply to find a certain Williams design, SAS/IML or PROC FACTEX of SAS can be used to construct it. As stated above, a Williams design is constructed at random, and the sequences regenerated and replicated if necessary. In addition, a Williams design can be generated by re-arranging a Latin square design. Since the SAS procedure PLAN is convenient for generating the Latin square and for randomization purposes (Deng and Graz 2002;SAS Institute Inc. 2003), the two parts of a Williams cross-over design can be integrated with the capabilities of SAS PROC PLAN.
The main steps of the SAS program are as follows: 1. Use the CYCLIC and RANDOM options in the PROC PLAN for a treatment factor tmts to generate a simple Latin square at random.
2. Obtain a mirror image of the Latin square using some SAS macros in the program.
3. Interlace each column of the Latin square and its mirror image through DATA steps, also using some minor SAS macros.
4. After the final Williams square is constructed, the treatment sequences are randomly allocated to subjects as in permuted block randomization by PROC PLAN. And the treatment sequences are replicated if the number of subjects is a multiple of the number of sequences.
5. Output the Williams square and the desired randomization schedule with PROC REPORT or PROC PRINT.
The general SAS program Williams.sas, provided as a separate text file, constructs suitable Williams designs at random, and then randomly assigns the treatment sequences to subjects as in permuted block randomization. The block size is usually equal to the number of treatment sequences when there are three or more treatments and the sample size is relatively small. The user merely needs to specify the number of treatments and the other parameters detailed in the program's opening comment.

Examples
In the first example, it is assumed that a suitable Williams design needs to be constructed and a randomization schedule for a cross-over trial with three arms (a test drug treatment, an active control treatment, and a placebo group) needs to be generated. Suppose the sample size in the study, which is usually a multiple of the number of treatment sequences, is 18. The Williams.sas program can be used to achieve the goal as follows: %WILLIAMS( TmtsNum=3, TmtNames=TestDrg ActCtrl Placebo, Samplesize=18, OutRtf=D:\WilliamsN18.rtf, SeedNum =); The outputs are listed in Table 2 and Table 3.
The random number seed should be documented so that the sequences of the Williams design and the randomization schedule can be regenerated and replicated, if necessary. For example, the results above can be reproduced by specifying the seed number as 1538941171, i.e., to invoke the macro as:  The random seed number = 1538941171 The seed is generated automatically.
The Randomization Schedule for the Trial The number of treatments in this trial = 4 The random seed number = 1547934360 The seed is generated automatically.

Discussion
The properties of Williams designs have been widely studied in literature (Senn 2002;Jones and Kenward 2003;Senn et al. 2004), reflecting their instinctive appeal. It is observed that the direct treatment effects and the treatment difference in Williams designs are not aliased with sequence or period effects, but are aliased with carry-over effects. The treatment difference, however, is not aliased with carry-over effects when the carry-over effects are equal. It is not known whether such assumptions are correct in practice. It is always much more prudent to address a problem a priori by using a proper design rather than a posteriori by applying a statistical model that may require unreasonable assumptions and/or perform unsatisfactorily (Chinchilli and Lengerich 2007). In actuality, other factors, such as the length of the washout periods between treatment administrations may be the determining factors as to whether carry-over effects should be considered (Senn 2002). For example, in bioequivalence trials when blood concentration levels of the drug or active ingredient are monitored and any residual drug administered from an earlier period could be detected, the adequate length of the washout periods may be known. When carry-over is actively controlled by the design and implementation of the trial, Williams design is a good choice when there are more than two treatments.
To provide additional designs for an odd t, Newcombe (1996) suggests designs for 3t sequences, made up of three ×t Latin squares, such that the sequences form a balanced design. Later, Prescott (1999) gives a systematic method for construction of these designs, which is called the Prescott triple. Bate and Jones (2006) describe an extensive catalog of useful design methods to fulfill the needs of cross-over studies under certain conditions. The above methods fill in the gaps left by Williams designs, when the aim is to construct a balanced design. However, cross-over designs in which subjects each receive more than six treatments are rare in practical clinical trials. As for convenience in practice, such as preparing trial material, a Williams design of a cross-over trial is still the ideal choice to meet practical needs.
Randomization provides a sound statistical basis for the quantitative evaluation of evidence relating to treatment effects, not only for parallel-group designs, but also for cross-over clinical trials. As stated above, when the objective is simply to construct a certain Williams design, SAS/IML or PROC FACTEX can be used to construct it in the SAS environment. The code may be considerably simplified. However, the appropriate Williams design should be generated at random. In addition, ICH E9 (International Conference on Harmonisation of Technical Requirements for Registration of Pharmaceuticals for Human Use 1998) recommends "the randomization schedule should be reproducible (if the need arises)". Using the PROC PLAN available in SAS, randomized Williams designs can be constructed based on the Latin square, and a reproducible randomization schedule can be generated by specifying the seed number. Our general SAS program will fulfill the practical needs of researchers in the application of Williams design.
Often a cross-over design is used in the early phase of an investigation, when the sample size is relatively small. Our SAS program can meet the needs of such a study in one step. If the cross-over trial is large, it may include subjects from a number of different centers. Since subjects may be allocated in equal numbers to the treatment sequences to ensure balance, Senn (2002) does not recommend using sub-center blocks. In multi-center trials, one may invoke the SAS program with a different seed for each clinical center separately. To administer the assignment of randomized treatment sequences for large sample sized trials, consideration may be given to the use of a centralized randomization method, such as telephone or internet-based randomization through a central trial office.