Document 267802

SAS Macros for Multivariate Two-Sample Tests
in the Case of Incomplete Data
Thomas Bregenzer, Walter Lehmacher
Institut ftir Biometrie und Epidemiologie, Tierarztliche Hochschule Hannover
and
Olaf Gefeller
Abteilung Medizinische Statistik, Universitiit Gottingen
Abstract
Multivariate two-sample tests offer the opportunity to condense the statistical
comparison between two samples containing data on several variables into a single
p-value. This approach is preferable in decision-oriented situations, for example,
in clinical trials when the evaluation of therapeutic superiority of one treatment
over the other is based on more than one endpoint describing treatment efficacy.
In such situations, Hotelling's T2 statistic detects any departure from the global
null hypothesis of no difference between the samples with respect to all variables,
whereas O'Brien's OLS- and GLS-test looks for equidirected alternatives. In the
paper, a SAS macro collection is introduced to address the computational realization of those multivariate two-sample tests within the SAS software. The statistical methods implemented in this collection incorporate the case of incomplete
data using all available information from the observed variables. The statistical
background of the test procedures is briefly summarized, the syntactical requirements for the usage of the macros are delineated, and a worked example of their
application to a data set is presented.
1
Introduction
The evaluation of treatment efficacy in clinical trials often leads to a situation in which
several endpoints are of (equal) importance for the clinical judgement, for example,
\
\..
760
r-""'''''''''''·==''''''''''....
~-'''''''-~>-~~~·~~~~"--~--~~~-"-_C-C--'
I
i
I
i
if repeated measurements are obtained to assess longitudinal differences between two
groups of subjects, one group receiving the treatment, the other a pl~cebo. The separate
statistical analysis of such multiple endpoints in a comparison between two treatments
results, however, in a multitude of p-values, whereas in many cases a single p-value
would be preferable.
When assuming normality of the observed data and homoscedasticity between groups,
the classic Hotellings T2 test or a multivariate analysis of variance (MANOVA) can
be performed to test the equality of the multivariate distributions of two (or more)
groups. An important drawback of these procedures refers, however, to the ordered
(software-) applicability only to complete observations with respect to the information
of the endpoints. When dealing with incomplete data the statistical software packages
(including SAS) fall back upon complete case analysis (meaning that in practice all
observation vectors containing missing values will be excluded from the analysis), which
is an inefficient "solution" to the problem of incomplete measurements loosing a lot
of information. In the SAS software, even the standard form of Hotelling's T2 is not
directly implemented in any of the procedures of the SAS/STAT component.
Moreover, one is often concerned with equidirected treatment differences, where one is
only interested in whether a treatment reveals some improvement upon placebo with
respect to all response variables. Multivariate two-sample tests provide a solution to
the last problem by summarizing the differences between two treatments with respect
to all endpoints in a global test statistic leading to a single p-value. This approach,
originally proposed by O'Brien [5], turned out to be a considerably more powerful test
for detecting restricted alternatives than Hotelling's T2, which, on the other hand, is
optimal for detecting any departure from the null hypothesis "no treatment effect in any
of the endpoints".
SAS/IML macros for O'Brien's test procedures, handling only balanced data sets (i.e.
without missing observations), have been introduced at SEUGI '93 [1]. In this paper, we
present an extension to the case of incomplete data, taking into account each available
observation. Furthermore, an asymptotic version of Hotelling's T2 for incomplete data
is proposed.
The macros are programmed in SAS/IML, using the conventional SAS procedure syntax
as far as possible, and can be used as a profitable supplement to existing SAS procedures
in order to efficiently analyse unbalanced multivariate data.
2
Notation and Theoretical Considerations
Let X ijk , i = 1, 2jj = 1, ... , nij k = 1, ... , K the k-th measurement of subject j in group
i, where some of the Xijk may be missing at random. The vectors Xii' = (XijI , ••. ,XijK )
are assumed to satisfy the following conditions:
1. The independent Xij have cumulative distribution functions (c.d.f.) Fi(x) with
marginal c.d.f. F ik ( Z )
2. E(Xij)
= Pi = (Pi}, ... , PiK)'
761
3. COV(Xij) = Ei (not singular), El = E2 =: E = (Ukl)k.l=l •...• K,
Without loss of generality we can assume Ukk := 1 for k = 1, ... , K, i.e., the data are
expressed in common units by subtracting the overall mean from each observation and
dividing by the pooled within-group sample standard deviation.
Define J := (1, ... ,1)1< and N := nl + n2, let nik be the number of nonmissing observarions in group i for the k-th measurement, and finally let 5 denote the indicator
function 5( z) = l{x observed}. Consequently, nikl := Ej 5ijk5ijl is the number of observations being observed for the k-th and l-th variable together. Define X i .k := Ej X ijk ,
1
Xi.k:= n'" E j 5ijkXijk and Xi:= (Xi.t, ... ,Xi.K)'. In the sequel the 5 are omitted to
simplify the notation.
The following conditions N --+ 00, ndN --+ consti > 0, nik/ni --+ constik > 0 are
assumed to hold whenever the limiting behaviour of test statistics and distributions is
regarded.
Consistent estimators of P.i and Ei can now be obtained by using all available data. By
applying multivariate central limit theory, the limiting distributions of Hotelling's T2
and O'Brien's statistics can be derived.
,-
;.:
.~
,'-
~
~
'"
.;,'
·i·
;:,"
"
!:;
.
.~
.f,
>,
j:
"
'~
;~
2.1
Estimators of Jti and Ei
The covariance matrix Ei can be estimated by
Ei := (Uikl)k.l with
~;
....
Uikl
=
Ej~l(Xijk - Xi.k)(Xijl - Xi.,)
nikl - 2 + l{k=l}
:~.
~.;:
;',
~~
Then the pooled estimator of E ist
~~;
(U.kl)k.l with
I)nikl -
i)
2 )Uikl
i=l
~
i~
U.kl
~;
~-
=
Lnikl- 4
2
L(nik - I)Uik
.~
j:
i=l
~
~
•
, k= I
Let {li denote the covariance matrix of the mean vector Xi:
cov(X·)
= (COV(X'k
X'I»)
with WOkl
= ..!!ib.LUokl
= ni"ni/
n~", cOV*(Xok
XOI)
1
I.,
I.
k.1 =: (W'kl)kl
I.
I
ni"ni/ 1
I.,
••
where cov*(.) denotes the conditional covariance based on the nikl observations which
~,
~
W:
%
~.
;~
~
2
•
have nonmissing data for both variables. The factor n~1tl01 can be regarded as a missing
correction factor with the property of adjusting the conditional covariances in order to
obtain a positive semidefinite covariance matrix. A similar approach can be found in
[7]. Note that the missing correction factor can take values between 0 and 1, where the
value 1 is attained if the data are complete, and 0 if each nonmissing observation in one
variable has a missing counterpart in another variable. In the latter case, the variables
are regarded as conditionally independent.
The main result of this section is that the Xi and Ei constructed in this way are
consistent estimators of P.i and E i , respectively, using all available data.
~
R
I
~.
'.'
,
,
I
.
2
,C
~'
(,
Ii'
E=
,
\
t_
\..
~
~
~
762
l
~
h
-
"
-_._--,-----~. "-'- - "-'-'-'-"',
:: .
2.2
Distribution of the Mean Treatment Difference Vector
The difference vector between the two treatment groups Y := (Yk)k=l, ...,K, Yk := X u X 2.k , is a consistent estimator of the treatment difference 1'1 - 1'2.
Applying a version of the multivariate central limit theorem ([6], p. 127) yields the
asymptotic distribution of Y:
VNY
with
r
=
('Ykl )k,l
~ NK(O, Nr)
and
'Ykk
'Ykl
Finally,
3
3.1
r
can be consistently estimated by
E.
Multivariate Test Statistics for Incomplete Data
Hotelling's T2
By means of the preceding section, we extend the classic T2 statistic to incomplete data
by
where
r is estimated by using all nonmissing data as described above:·
fkk
-
tT.kk
~
(1
fk,
-
tT.kl
~
(nUl
nu
1) ,
+ -n2k
nUnll
k
= 1, ... ,K
n2kl )
+ n2k
,
n 21
k
=1=
I.
Therefore, T2 is asymptotically X2 distributed with K degrees of freedom.
In order to detect any departure from the null hypothesis Ho: 1'1 = 1'2 Hotelling's T2 is
uniformly most powerful (when assuming normally distributed data), but, on the other
hand, is inefficient for investigating directional treatment differences [2,4].
3.2
Tests for Directional Alternatives
O'Brien [5] proposed two parametric multivariate statistics for evaluating Ho : 1'1 = 1'2
vs. HI : 1'1 - 1'2 = cD, where D is a (k x I)-vector describing the direction of the
763
!?"t.......""""'"_ _
?0~~x""--:,r-~";;:;;.::;,.:v-~~0-:.;::.;::,:-=,,:>~<::.---'-'
~
I
~
y
treatment difference, and c denotes a real-valued scalar. The OLS- and the GLS-test
statistics - their names reHect their relation to ordinary least sq~ares and generalized
least squares techniques - are
J'(X1 - X2 )
TOLS
(J'l'J)1/2
J':r-l~Xl
TGLS
- X2 )
(J'r- 1J)1/2
.
Both statistics are asymptotically normally distributed under Ho.
4
A Data Example
A data set named HEP is assumed to contain data for three variables GOT, GPT, and
GGT corresponding to three measurements of GOT, GPT, and -y-GT taken repeatedly
in a clinical trial. The efficacy of two hepatitis treatments has to be investigated,
whereby one is especially interested in comparing treatment difference effects which
occur in all three relevant variables simultaneously and with equal direction (the printed
example only shows the pre-post-treatment differences in the two groups). Some of the
observations are missing at random.
\
Treatment
Patient
A
A
A
A
A
A
A
A
A
A
A
A
A
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
endpoints
GOT GPT -y-GT
4.0
1.6
4.1
3.0
.
4.4
4.5
2.6
3.8
5.2
0.4
3.1
2.6
3.0
\,
764
8.2
4.6
5.1
5.6
4.3
7.4
6.4
7.6
3.2
5.7
4.6
7.1
2.4
-0.6
2.6
0.1
4.1
0.3
4.8
3.3
1.7
7.1
1.3
3.3
1.6
2.2
.
.
Treatment
Patient
B
B
B
B
B
B
B
B
B
B
B
B
B
B
15
16
17
18
19
20
21
22
23
24
25
26
27
28
endpoints
GOT GPT I'-GT
9.1
4.8
2.3
6.0
.
2.1
5.2
4.5
.
6.7
4.5
3.4
2.9
5.2
0.1
4.8
2.0
3.7
3.9
2.4
1.7
2.2
3.1
4.2
3.9
1.2
1.7
2.1
2.7
8.3
4.4
4.2
3.6
4.7
4.8
-2.7
-1.5
2.4
7.4
1.6
0.6
3.8
The printed output of our SAS macros for multivariate two-sample tests contains, among
other details, the estimated correlation matrix
CORRELATION (GOT GPT GGT)
1 0.1250937 -0.142397
0.1250937
1 0.3709465
-0.142397 0.3709465
1
and the values ot the test statistics for Hotelling's T2 (T_HOT) and O'Brien's OLS- and
GLS-test (T_OLS, T_GLS) as well as the accompanying p-values (p _HOT, P_OLS, P_GLS)
O'BRIEN'S STATISTICS
T_OLS
0.815113
T_GLS
-0.277358
P_OLS
0.2075038
P_GLS
0.3907526
765
'~'-
----------. - :./... - '~'- '-' ~ - -.'-'
HOTELLING'S STATISTICS
20.599375
0.0001275
As can be shown, for example, by PROC GLM or PROC TTEST, considerable differences between the two treatments only occur in variable GPT, whereas GOT shows a
small treatment difference (but into the other direction!) and GGT indicates no distinction between the two treatments:
TTEST PROCEDURE
Variable: GOT
CL
Mean
N
Std Dev
StdError
-------------------------------------------------------------~--
A
B
13
12
3.25384615
4.72500000
T
DF
Prob>ITI
-2.1802
-2.2170
18.7
23.0
0.0422
0.0368
Variances
Unequal
Equal
1.29461409
1.97903787
0.35906134
0.57129902
****************************************************************
Variable: GPT
N
Mean
Std Dev
Std Error
13
14
6.17692308
2.64285714
1.95369472
1.32690421
0.64185742
0.35436281
CL
A
B
T
DF
Prob>ITI
3.9140
3.9701
20.9
26.0
0.0008
0.0006
Variances
Unequal
Equal
****************************************************************
Variable: GGT
CL
A
\
N
Mean
Std Dev
Std Error
13
2.82307692
2.43623817
0.67669089
t.
\.
766
3.16428571
14
B
T
DF
Prob>ITI
-0.3242
-0.3216
24.6
26.0
0.7485
0.7506
Variances
Unequal
Equal
3.01932421
0.80694834
This behaviour is reflected in the p-values of the various multivariate two-sample tests,
too: Hotellings T2 detects the differences between the two treatments which occur in
two variables, but with contrary directions, i.e., treatment A reveals an improvement
upon B with respect to GOT while GPT allows to suppose a superiority of treatment
B. Application of Hotelling's T2 adresses thus the wrong question: in spite of the small
p-value no treatment can be regarded as being actually the best. O'Brien's tests give
no indication of equidirected treatment differences.
5
..;
,.
Macro Call
Usually a data set in SAS is arranged in a form similar to the hepatitis example above:
one treatment variable, one variable enumerating the subjects receiving the treatment
and one variable containing the values measured for each endpoint. For making such
a data set usable for our macros, it must be reorganized by creating a single variable
containing the names of the endpoints and another variable with the corresponding
endpoint values (Note that PROC GLM needs exactly the same structure to perform
a repeated measurement analysis). Thus, the hepatitis data set has to be organized as
follows (for example by means of PROC TRANSPOSE):
TREATH
PATIENT VARS
A
A
A
1
1
1
GOT
GPT
GGT
B
B
B
13
13
13
GOT
GPT
GGT
POST_PRE
4.0
8.2
1.1
9.1
0.1
2.1
The general form of a macro call corresponding to the multiple endpoint test problem
IS
% procedure (
<DATA = dataset ,>
SUBJ = subjects variable,
767
I
~
~
.~
.~
lJ
.}:
~,
~;
ENDP = endpoints variable,
VAL UES = endpoint values,
CLASS = class variable
<,BY = by variable>
~:
¥.
:,.:
~
~'
~
;
};
;.,"
where
i~
"
~:
":~
t
procedure names the procedure to be used: OBRIEN - for O'Brien's test procedures
(OLS and GLS) - or HOTELL - for Hotelling's T2 - respectively)
,~
:s~
:1',
"
t
dataset names the SAS data set containing the data to be analysed, default is _LAST_
(as in SAS)
f,.
subj denotes the variable witch enumerates the subjects receiving the treatments
f
endp names the variable containing the names of the endpoint variables
.:"
,.
.' .
"
~~'
'j;
,-r,
.0,
.<
.r:
values specifies the variable containing the values of the endpoints
&:
~
.'t
:~
class variable names the class variable defining the two samples (treatments) to be
compared
'f;
').
{
...)-!,
by variable leads to seperate analyses on observations in groups defined by the specified by variable (as in SAS)
to'
"
'.t"
P
\'
~
"
For example, the macro call for analysing the hepatitis data set by means of O'Brien's
OLS- and GLS-tests as described in the previous section is:
:,:;-
~~
1~
J:,
"t:
f
% obrien(
DATA = hep,
SUBl = patient,
ENDP = vars,
VALUES = posLpre,
CLASS = treatm
r
i·
l:
1.
.~
f~
~
t,
t
"r,~:
);
~~.
ii'-'!;
,j:
f;
~.rI·
6
Closing Remarks
~.
X
1~
While Hotelling's T2 is the method of choice for detecting any nonspecific departure
from the null hypothesis, O'Brien's procedures are optimal for detecting equidirectional '
alternatives [3]. Even the simpler but slightly less powerful OLS-test has been shown
to perform quite well, especially in small samples where the GLS-procedure turned out
to be a little anti conservative. More details concerning the performance in simulation
studies and comparisons between the tests can be found in [4].
To our knowledge the computational realization of multivariate two-sample tests for
incomplete data with respect to the exploitation of all available data (i.e., without
~
it;....
~
I
~
h
i
t
.~
\
~
\.
768
deleting observations) has not been approached in any statistical sQftware package. To
overcome this unsatisfactory situation, we have developed a SAS macros collection which
makes use of the SAS /IML matrix language. It can be implemented on every platform
with SAS version 6.04 or higher. Since under DOS working with larger data sets in
PROC IML often exeeds the memory capacity, the SAS/WINDOWS version should be
preferred.
A copy of our macro collection is available on request from the authors. Please direct
the correspondance to the following address:
Thomas Bregenzer
Institut fiir Biometrie und Epidemiologie
Tierarztliche Hochschule Hannover
Bischofsholer Damm 15
D-30173 Hannover
Tel. +49 511 856 7549
FAX +49511 856 7695
email [email protected]
References
[1] Th. Bregenzer and W. Lehmacher. SAS macros for comparisons with multiple endpoints. In Proceedings of the SAS European Users Group International Conference,
pages 784-790. SAS Institute Inc., Heidelberg, 1993.
[2] D. Follmann. Multivariate tests for multiple endpoints. Report, National Heart,
Lung, and Blood Institute, Bethesda, 1993.
[3] H. Frick and V.W. Rahlfs. Comparison of multivariate and univariate tests for
directional alternatives. Biometrics, to appear, 50, 1994.
[4] W. Lehmacher, G. Wassmer, and P. Reitmeier. Comment on: On the design and
analysis of randomized clinical trials with multiple endpoints. Biometrics, to appear,
50, 1994.
[5] P.C. O'Brien. Procedures for comparing samples with multiple endpoints. Biometrics, 40:1079-1087, 1984.
[6] C.R. Rao. Linear Statistical Inference and its Applications. John Wiley, New York,
1972.
[7] W.M. Stanish, D.B. Gillings, and G.G. Koch. An application of multivariate ratio
methods for the analysis of a longitudinal clinical trial with missing data. Biometrics,
34:305-317, 1978.
SAS, SAS/STAT, and SAS/IML are registered trademarks of SAS Institute Inc., Cary,
NC, USA.
769