XOCATEGORIES procedure
Performs analyses of categorical data from cross-over trials (D.M. Smith & M.G.Kenward).
Options
Parameters
Description
XOCATEGORIES calculates factors, variates and performs various analyses of categorical cross-over data. All analyses conform to one of two different types both utilising a log-linear structure, although only one is derived from an orthodox log-linear model. The first type is based on a latent variable or subject effects model and is described by Kenward & Jones (1991). The subject effects are eliminated through the use of a conditional likelihood and the resultant conditional analysis can be formulated in terms of a conventional log-linear model. In the process of conditioning all between-subject information is lost. This has little consequence for the majority of well-designed cross-over trials in which nearly all information on important comparisons lies in the within-subject stratum. An exception to this is the two-period two-treatment design for which information on the carry-over effect lies in the between-subject stratum. The second type, which uses a multivariate log-linear model, allows between-subject information to be recovered, which in the binary case leads to the Hills-Armitage test for carry-over effect. Details can be found in Jones & Kenward (1989, Section 3.3). If such a test, and other allied tests for the two-period two-treatment design, are required then the log-linear option of the procedure can be used. However, the estimates from this multivariate log-linear model do have the disadvantage of an awkward interpretation. For this reason the latent variable model is to be preferred for higher-order designs and for the two-period two-treatment design when the carry-over test is not required. In the latter case, with binary data, the test for direct treatments reduces to the Mainland-Gart test.
In the latent variable model, effects are defined in terms of generalized logits, reducing to ordinary logits in the binary case. This is not ideal for ordered categorical data because the ordering is ignored. Some account can be taken of the ordering of categories by regressing on category scores in a generalization of Armitage's trend test. This can be done by using the parameter SAVE to obtain the treatment and carryover factors, which are in pointers SAVE[3...(NTRT+2)] and SAVE[(NTRT+3)...(2+2*NTRT)] respectively, NTRT being the number of treatments. From these treatment and carryover factors (NCAT-1) variates corresponding to linear (-1, 0, 1), quadratic (1, -2, 1), etc., contrasts amongst the NCAT categories can be calculated. For example, using the example data where the number of treatments (NTRT) is 3 and the number of categories (NCAT) is 3, the following statements will produce linear and quadratic variates for treatments.
XOCATEGORIES SEQUENCE=Seqid; RESULTS=Res; NUMBER=Number; \
SAVE=Fsave
CALCULATE TLN[1...3]=(Fsave[3...6].eq.3)-(Fsave[3...6].eq.1)
& TQU[1...3]=(Fsave[3...6].eq.3)-2*(Fsave[3...6].eq.2)\
+(Fsave[3...6].eq.1)
The OWNSUBJECT or OWNLOGLINEAR options together with the REUSE and MODEL parameters can then be used to fit models involving these variates and the deviances produced used to compare the models. For example, for the above variates.
XOCATEGORIES [METHOD=OWNSUBJECT] REUSE=Fsave; \
MODEL=TLN[1]+TLN[2]++TLN[3]+TQU[1]+TQU[2]+TQU[3]
The data for the procedure are specified by parameters SEQUENCES, RESULTS and NUMBERS. SEQUENCES supplies a factor with labels indicating the treatment received at each time period. The treatments are labelled by capital letters A, B &c, so (with three periods) BCA indicates treatment B in period 1, C in 2 and A in 1. RESULTS is a pointer containing a factor for each time period, to indicate the corresponding scores recorded in each period. NUMBER then indicates the number of subjects involved. It is not necessary to input data for category combinations in which no subjects were recorded.
XOCATEGORIES processes the data to form the necessary factors to do the analysis using the GenStat facilities for generalized linear models. This information can be saved using the SAVE parameter (see Method) and input again, to save time in later analyses, using the REUSE parameter.
Output of the procedure comprises significance tests of treatment and/or carryover and first order period interactions; together with estimates of log odds ratios and their standard errors.
Options: PRINT, PDATA, METHOD, CARRYOVER.
Parameters: SEQUENCE, RESULTS, NUMBER, SAVE, REUSE, MODEL.
Method
The methods of analysis follow Kenward & Jones (1991) for SUBJECT and OWNSUBJECT, and Jones & Kenward (1989, pages 124-129) for LOGLINEAR and OWNLOGLINEAR. The actual model fitting is performed using GenStat directives FIT, ADD, DROP and SWITCH, with the PRINT options being those of these directives.
The data structure SAVE has the following form, all factors as Kenward & Jones (1991).
We wish to thank Dr Byron Jones of the University of Kent, Canterbury UK, for his assistance.
Action with
RESTRICT
Input structures must not be restricted, and any existing restrictions will be cancelled.
References
Jones, B. & Kenward, M.G. (1989). Design and Analysis of Crossover Trials. Chapman & Hall, London.
Kenward, M.G. & Jones, B. (1991). The analysis of categorical data from cross-over trials using a latent variable model. Statistics in Medicine, 10, 1607-1619.