Performs analyses of categorical data from cross-over trials (D.M. Smith & M.G.Kenward).
Options
PRINT = string token |
What to print at each fit (model , summary , accumulated , estimates , correlations , fittedvalues , monitoring ); default * |
---|---|
PDATA = string token |
Whether or not a display of category combination by sequence is required (yes , no ); default no |
METHOD = string token |
Type of analysis for which factors are required (subject , loglinear , ownsubject , ownloglinear ); default subj |
CARRYOVER = string token |
Whether or not models with carryover effects in are to be produced (yes , no ); default no |
Parameters
SEQUENCE = factors |
The identifier of the sequence of treatments |
---|---|
RESULTS = pointers |
Pointer containing factors (one for each period) giving the category scores observed |
NUMBER = variates |
Numbers recorded in the sequence/category combinations |
SAVE = pointers |
Saves the factors constructed to do the analysis |
REUSE = pointers |
To reuse factors saved earlier using SAVE |
MODEL = formula |
Additional terms to be fitted to model if OWNSUBJECT or OWNLOGLINEAR options used; default * |
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).
SAVE[1] |
= The factor G (sequence). |
---|---|
SAVE[2] |
= The factor S (outcome). |
SAVE[3...(NTRT+2)] |
= The factors T[1...NTRT] (treatment). |
SAVE[(NTRT+3)...(2+2*NTRT)] |
= The factors C[1...NTRT] (carryover). |
SAVE[(3+2*NTRT)...(NPER+2*NTRT)] |
= The factors P[1...NPER] (period). |
SAVE[NPER+2*NTRT+1] |
= The category labels if they exist. |
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.
See also
Procedures: AFCARRYOVER
, AGCROSSOVERLATIN
, XOEFFICIENCY
, XOPOWER
.
Commands for: Regression analysis.
Example
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