Performs analyses of categorical data from cross-over trials (D.M. Smith & M.G.Kenward).
|What to print at each fit (
||Whether or not a display of category combination by sequence is required (
||Type of analysis for which factors are required (
||Whether or not models with carryover effects in are to be produced (
||The identifier of the sequence of treatments|
||Pointer containing factors (one for each period) giving the category scores observed|
||Numbers recorded in the sequence/category combinations|
||Saves the factors constructed to do the analysis|
||To reuse factors saved earlier using
||Additional terms to be fitted to model if
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
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;\
OWNLOGLINEAR options together with the
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;\
The data for the procedure are specified by parameters
SEQUENCES supplies a factor with labels indicating the treatment received at each time period. The treatments are labelled by capital letters
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
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.
The methods of analysis follow Kenward & Jones (1991) for
OWNSUBJECT, and Jones & Kenward (1989, pages 124-129) for
OWNLOGLINEAR. The actual model fitting is performed using Genstat directives
SWITCH, with the
The data structure
SAVE has the following form, all factors as Kenward & Jones (1991).
||= The factor
||= The factor
||= The factors
||= The factors
||= The factors
||= The category labels if they exist.|
We wish to thank Dr Byron Jones of the University of Kent, Canterbury UK, for his assistance.
Input structures must not be restricted, and any existing restrictions will be cancelled.
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.
Commands for: Regression analysis.
CAPTION 'XOCATEGORIES example',\ 'Data from Kenward & Jones, Statistics in Medicine, 10, 1991.';\ STYLE=meta,plain FACTOR [LEVELS=3; LABELS=!T(NONE,MODERATE,COMPLETE)] Res[1...3] & [LEVELS=6; LABELS=!T(ABC,ACB,BAC,BCA,CAB,CBA)] Seqid READ [SETNVALUES=Y] Seqid,Res[1...3],Number; FIELDWIDTH=3,3(*),*; FREP=labels ACB NONE NONE NONE 2 CAB NONE NONE NONE 3 CBA NONE NONE NONE 1 ABC NONE NONE MODERATE 1 BCA NONE NONE MODERATE 1 ABC NONE NONE COMPLETE 1 BAC NONE NONE COMPLETE 1 ABC NONE MODERATE NONE 2 ABC NONE MODERATE MODERATE 3 BAC NONE MODERATE MODERATE 1 ABC NONE MODERATE COMPLETE 4 ACB NONE MODERATE COMPLETE 3 BAC NONE MODERATE COMPLETE 1 CAB NONE MODERATE COMPLETE 2 BAC NONE COMPLETE NONE 1 BCA NONE COMPLETE NONE 1 ACB NONE COMPLETE MODERATE 2 ABC NONE COMPLETE COMPLETE 2 ACB NONE COMPLETE COMPLETE 4 BAC NONE COMPLETE COMPLETE 1 CBA NONE COMPLETE COMPLETE 1 ACB MODERATE NONE NONE 1 BAC MODERATE NONE NONE 1 CBA MODERATE NONE NONE 3 BAC MODERATE NONE MODERATE 2 CAB MODERATE NONE MODERATE 1 CBA MODERATE NONE MODERATE 1 BAC MODERATE NONE COMPLETE 1 ABC MODERATE MODERATE NONE 1 BCA MODERATE MODERATE NONE 6 CAB MODERATE MODERATE NONE 1 CBA MODERATE MODERATE NONE 1 ACB MODERATE MODERATE MODERATE 2 BAC MODERATE MODERATE MODERATE 1 ABC MODERATE MODERATE COMPLETE 1 BCA MODERATE COMPLETE NONE 1 CBA MODERATE COMPLETE NONE 2 ACB MODERATE COMPLETE COMPLETE 2 CAB MODERATE COMPLETE COMPLETE 1 BCA COMPLETE NONE NONE 1 CBA COMPLETE NONE NONE 2 BAC COMPLETE NONE MODERATE 2 CAB COMPLETE NONE MODERATE 2 CBA COMPLETE NONE MODERATE 1 BAC COMPLETE NONE COMPLETE 3 CAB COMPLETE NONE COMPLETE 4 CBA COMPLETE NONE COMPLETE 1 BCA COMPLETE MODERATE NONE 1 BCA COMPLETE MODERATE MODERATE 1 CBA COMPLETE COMPLETE NONE 1 : XOCATEGORIES [CARRYOVER=yes] SEQUENCE=Seqid; RESULTS=Res; NUMBER=Number