1. Home
  2. XOEFFICIENCY procedure


Calculates efficiency of estimating effects in cross-over designs (B. Jones & P.W. Lane).


PRINT = string tokens What reports to produce (summary, efficiency, variance, carryover, contrasts, dummyanalysis, incidence); default summ, effi, cont
NPERIODS = scalar Number of periods in the design; no default
CARRYOVER = string token Whether to included effects of carryover (yes, no); default no
CONTRASTTYPE = string token Type of treatment contrasts if POLYNOMIAL and OWN parameters are unset (pairwise, control); default pair
INCIDENCE = pointer Saves incidence matrices; default *


SEQUENCES = formula Text, variate or factor with sequence of levels of a single treatment; no default
POLYNOMIAL = scalars Order of polynomials to represent each term in the SEQUENCES parameter; default *, i.e. represent effects according to OWN parameter or CONTRASTTYPE option
OWN = matrices Specific contrasts for each term in the sequences parameter; default *, i.e. represent effects according to POLYNOMIAL parameter or CONTRASTTYPE option
EFFICIENCY = symmetric matrices, variates or diagonal matrices Saves efficiencies; default *
VARIANCE = symmetric matrices, variates or diagonal matrices Saves variances; default *


The simplest use of procedure XOEFFICIENCY is for a cross-over design with a single treatment factor. The SEQUENCES parameter should then be set to a factor indicating the treatment level to be applied at each period for each patient: the ordering must be such that the sequence of levels for the first patient come first, then the sequence for the second patient, and so on. The NPERIODS option must be set to specify the number of periods. If preferred, the sequences can be input just as a text or variate structure containing the textual or numeric codes of the treatment, leaving the procedure to form the factor internally.

The procedure calculates the efficiency of estimating the treatment effects. By default, it reports the efficiency of the design for each estimated pairwise difference of treatment levels, together with the mean of these differences. Alternatively, the CONTRAST option can be set to control to request efficiencies of the differences of each level with the reference level of the treatment factor (the first level, by default). Another possibility is to set the POLYNOMIAL parameter to the order of polynomial effects to be estimated for the treatment levels; orthogonal polynomials will be used, based on the marginal replication of the treatment levels. Finally, the OWN parameter can be set to a matrix that specifies comparisons between the treatment levels: the matrix must have one column for each treatment level and one row for each desired contrast. If either of POLYNOMIAL or OWN is set, the CONTRASTTYPE option is ignored.

The PRINT option controls which reports are displayed. By default, a summary of the design is given, and then a symmetric matrix of the efficiencies of each difference between pairs of treatment levels together with the mean pairwise efficiency. In addition, the chosen contrasts are displayed, unless the default pairwise contrasts are required. The variance setting displays the variance of each contrast. The incidence setting displays two tables of the numbers of observations in the design: the first is classified by Subject and Treatment, and the second by Treatment and Period. (There is no point displaying the classification by Subject and Period, since this always consists of a 1 in each cell for the designs dealt with by this procedure.) The aov setting produces a skeleton analysis of variance of the specified design, if the design is generally balanced.

By default, carry-over effects are ignored. If the CARRYOVER option is set to yes, first-order carry-over effects are included in the model, and efficiencies for treatments will be adjusted accordingly. If the carryover setting is included in the PRINT option, the efficiencies and variances of the carry-over contrasts are displayed in the same way as for the treatment contrasts (that is, with regard to the setting of the CONTRASTTYPE option, POLYNOMIAL and OWN parameters, and the efficiency and variance settings of the PRINT option). If the incidence option is included, a further three incidence tables will be displayed: Treatment by Carry-over, Subject by Carry-over, and Carry-over by Period.

The INCIDENCE option allows the incidence information, as printed by PRINT=incidence, to be stored. It should be set to the identifier of a pointer, which will be set up by the procedure with elements labelled to identify the matrices concerned. If there is no carry-over, the pointer will point to two matrices, ordered as for the PRINT option; if there is carry-over, there will be five matrices.

The EFFICIENCY and VARIANCE parameters allow the variances and efficiencies of the treatment effects to be stored in symmetric matrices (for pairwise differences), variates (for differences with control), or diagonal matrices (for polynomial or own contrasts). If the option CARRYOVER is set to yes, the stored results will be for the carry-over effects; to get the results for the treatment effects, the procedure must be invoked again with the CARRYOVER option set to no.




The efficiency of a contrast is calculated as the ratio of its theoretically optimal variance to its variance in the supplied design, expressed as a percentage. The optimal variance may not actually be attainable. It is calculated as the variance for the contrast in a design with the same marginal replication of treatment levels, but where the treatment factor is orthogonal to all other factors in the design. For example, the optimal variance for a contrast between two treatment levels (omitting any estimate of dispersion) is calculated as (1/n1 + 1/n2), where n1 and n2 are the replications of the two levels. The actual variance of the supplied design is calculated by fitting a linear model by linear regression, including terms as specified in the options. The inverse matrix then provides the variance, omitting the estimate of dispersion which would cancel out in the ratio anyway.

Action with RESTRICT

No structures should be restricted.

See also


Commands for: Design of experiments.


" (1) Design with eight patients, four periods, five treatments;
      treatment input as text codes; no carryover effects"
             C,D,B,E, D,E,C,A, E,A,D,B, A,B,E,D)
" (2) Same design with treatment input as a factor with ordinal levels;
      carryover estimated and reported; own contrasts specified"
FACTOR       [LEVELS=5; VALUES=1,5,2,4, 2,1,3,5, 4,3,5,2, 5,4,1,3,\
             3,4,2,5, 4,5,3,1, 5,1,4,2, 1,2,5,4] sequence
MATRIX       [ROWS=4; COLUMNS=5; VALUES=-1,1,0,0,0, -1,0,1,0,0,\
             -1,0,0,1,0, -1,0,0,0,1] contrasts
XOEFFICIENCY [PRINT=summary,efficiency,variance,carryover,contrasts;\
             NPERIODS=4; CARRYOVER=yes] sequence; own=contrasts
Updated on March 4, 2019

Was this article helpful?