•
•
•
SIMULTANEOUS NONPARAMETRIC TESTS IN TWO-WAY LAYOUTS
by
Emilia Sakurai
Department of Biostatistics, University of
North Carolina at Chapel Hill, NC.
•
Institute of Statistics Mimeo Series No. 2111T
February 1993
•
•
SIMULTANEOUS NONPARAMETIUC TESTS IN TWO-WAY LAYOUTS
by
Emilia Sakurai
•
A Dissertation submitted to the faculty of the University of North Carolina at Chapel Hill in
partial fulfillment of the requirements for the degree of Doctor in Philosophy in the Department
of Biostatistics.
Chapel Hill
Approved by:
V~~A-~~t~
--"::;"'=--=~-..'-------
Advisor
/'
Reader
Reader
•
.
•
•
Abstract
Emilia Sakurai. Simultaneous Nonparametric Tests in Two-Way Layouts (under the direction of
Prof. Dana Quade).
In this dissertation, simultaneous tests for row and column effects in two-way layouts are
studied, using nonparametric rank-based methods, restricted to the case of one observation per
cell and no interaction. In this setup, the joint null hypothesis HJ:
"There are neither row nor
column effects" can be seen as the intersection of the two marginal hypotheses, which are
unrelated to each other. Therefore, the errors associated with the joint null hypothesis HJ are
related to the errors associated with the marginal hypotheses, and the question that follows is how
to express this relationship.
In the nonparametric set up, for the test for HJ , two procedures are available: the first,
by independently testing the marginal hypotheses, ignoring the second factor (Friedman, 1937;
•
Ehrenberg, 1952); the second, by jontly ranking the observations from 1 to the total number of
observations (Conover and Iman, 1981) and applying the usual ANOVA-based test on the joint
ranking, called a Rank Transform test. In the parametric set up, the simultaneity characteristic
of the test is reflected by the common denominator used in the F statistics for rows and columns,
which is the estimated variance of the error.
Three nonparametric tests are selected to be studied: Ehrenberg's test, Friedman's test
and the Rank Transform test. The first two are based on average rank correlations, so that the
theory of U-statistics could be used in their analyses (Quade, 1972, 1984). For each test, the
correlation between the two marginal test statistics was obtained under the joint null hypothesis;
closed-form expressions are provided for Ehrenberg's and Friedman's tests.
The same correlation, as well as the joint frequency of rejections of the
marginal
hypotheses are studied for three types of alternatives: linear, quadratic and "umbrella"-type
effects, for 6 x 4 and 5 x 5 designs, by means of Monte Carlo simulation.
•
Some information about the asymptotic joint distribution of the marginal test statistics
when one of the dimensions is finite and the other is large is also provided.
Finally, three examples of applications of the results here obtained are described, and a
summary and suggestions for future research are provided.
Acknowledgements
First, I want to express my sincere gratitude to my advisor Prof. Dana Quade.
His
knowledge, kindness and dedication give a true meaning to the word wisdom.
I am also thankful to the members of my committee Prof. P.K. Sen, Dr. Paul Stewart,
Dr. Lloyd Edwards and Dr. Dana Loomis for their careful examination of my work, for their
suggestions and comments.
I need to address my thanks to my sponsors from Brazil: UFMG, Federal University of
Minas Gerais and CAPES, Coordena<;a.o de Aperfei<;oamento de Pessoal de Nivel Superior.
•
My classmates, my friends from home, and the staff of the School of Public Health
deserve my dearest thanks for their friendship and support.
My special gratitude to Eduardo
Mota, for his loving, smiling and constant encouragement.
Finally, I treasured the love, support and appreciation from my family, to whom I
dedicate this dissertation.
•
TABLE OF CONTENTS
Page
Abstract
List of Tables
i
ii
Chapter
1 - INTRODUCTION AND LITERATURE REViEW
1
1.1 - Notation and Basic Definitions
I
1.2 - Hypotheses
2
1.3 - Error Rates
4
1.4 - Parametric Tests in Two-way Layouts
5
1.5 - Nonparametric Tests in Two-way Layouts
7
1.5.1 - Randomization Tests - Permutation-type Tests
7
1.5.2 - Average Rank Correlation
7
1.5.3 - U-Statistics
8
1.5.4 - Ehrenberg's Test
9
1.5.5 - Friedman's Test
11
1.5.6 - Rank Transformations
14
1.6 - Simultaneous Tests
15
1.7 - Summary
16
2 - CORRELATIONS BETWEEN T C AND T R UNDER THE JOINT NULL HYPOTHESIS. 18
2.1 - Tests Based on U-statistics
18
2.1.1 - Correlation Between Two U-statistics
19
2.1.2 - The Test Procedure
19
2.2 - Ehrenberg's Test
20
2.2.1 - Test for Column Effects
20
2.2.2 - Test for Row Effects
21
2.2.3 - Correlation Between T C and T R
21
2.3 - Friedman's Test
23
2.3.1 - Test for Column Effects
23
2.3.2 - Test for Row Effects
2.3.3 - Correlation Between T
•
25
C
and T
R
26
2.4 - The Rank Transform Test
28
2.5 - Summary
29
3 - SIMULATION STUDy
31
3.1 - Definition of the Alternative Hypotheses
32
3.1.1 - Alternatives of Linear and Quadratic Effects
32
3.1.2 - Alternatives of "Umbrella"-type Effects
32
3.1.3 - Parameters for the Alternative Hypotheses
33
3.2 - Monte Carlo Study - Simulation Design
33
3.2.1 - Tests
34
3.2.2 - Probability distributions
34
3.2.3 - Sizes of the Two-way Layouts
34
3.3 - Some Remarks
35
3.4 - Results from the Simulatiolls
35
3.5- Discussion
39
3.5.1 - Two-by-two Tables
39
3.5.2 - Correlations
4 - ASYMPTOTIC DISTRIBUTION OF T
39
C
AND
HYPOTHESIS
4.1 - Marginal Distributions
TR
UNDER THE JOINT NULL
41
41
4.1.1 - Asymptotic distribution of a U-statistic
41
4.1.2 - Ehrenberg's Test
43
4.1.3 - Friedman's Test
43
•
t
4.2 - Joint Distributions
44
4.3 - The Rank Transform Test
45
4.4 - Summary
46
5 - EXAMPLES
47
5.1 - Example 1 - Migrant and Seasonal Farmworkers' Health
47
5.1.1 - Description of the Study
47
5.1.2 - Ehrenberg's and Friedman's Tests
48
5.1.3 - The Rank Transform Test
50
5.1.4 - F-test
51
5.1.5 - Summary
51
5.2 - Example 2 - Tensile Strength
.
...
;
52
5.2.1 - Description of the Study
52
5.2.2 - Ehrenberg's and Friedman's Tests
52
5.2.3 - The Rank Transform Test
54
5.2.4 - F-test
54
5.2.5 - Summary
54
5.3 - Example 3 - Wheat Yield Trial
55
5.3.1 - Description of the Study
55
5.3.2 - Ehrenberg's and Friedtnan's Tests
56
5.3.3 - The Rank Transform Test
58
5.3.4 - F-test
58
5.3.5 - Summary
58
6 - SUMMARY AND DISCUSSION
59
6.1 - Summary
59
6.2 - Discussion
60
6.3 - Suggestions for Future Research
61
R.eferences
62
Appendix
65
Program AI.l
1
Program AI.2
1
,
.
List of Tables
Table 1.1 - Basic Layout of Data
2
Table 1.2 - Types of Error in Testing HR' Hc and HJ
4
Table 1.3 - ANOVA for a Two-Way Layout, One Observation per Cell, No Interaction
6
Table 2.1 - Correlation Between T C and T R from Ehrenberg's Test, for Selected
Values of m and n
23
Table 2.2 - Correlation Between T C and T R from Friedman's Test, for Selected
Values of m and n
.
28
Table 3.1 - Number of Rejections Out of 5000 Simulated Matrices
36
Table 3.2 - Correlation Between the Two Marginal Test Statistics
37
3.2.1 - Under the Joint Null Hypothesis
37
3.2.2 - Under the Alternative of Linear Effects on Columns
37
3.2.3 - Under the Alternative of Linear Effects on Columns and Rows
37
3.2.4 - Under the Alternative of Quadratic Effects on Columns
37
3.2.5 - Under the Alternative of Quadratic Effects on Columns and Rows
38
3.2.6 - Under the Alternative of "Umbrella"-Type Effects on Columns
38
3.2.7 - Under the Alternative of "Umbrella"-Type Effects on Columns and Rows
38
Table 5.1 - Example 1 - Original Data - Cholinesterase by Type of Crop and
Worked Barefoot
48
Table 5.2 - Example 1 - Within-Row Rankings
48
Table 5.3 - Example 1 - Within-Column Rankings
48
Table 5.4 - Example 1 - Kendall's
49
T
Correlation Between Pairs of Within-Row Rankings
Table 5.5 - Example 1 - Spearman's p Correlation Between Pairs of Within-Row Rankings
49
Table 5.6 - Example 1 - Kendall's
49
T
Correlation Between Pairs of Within-Column Rankings
Table 5.7 - Example 1 - Spearman's p Correlation Between Pairs of Within-Column Rankings. 50
.
Table 5.8 - Example 1 - Joint Ranking
50
Table 5.9 - Example 1 - ANOYA on Joint Rankings
51
Table 5.10 -Example 1- ANOVA on Original Data
51
Table 5.11 - Example 2 - Original Data-Tensile Strength by Alloy TY!le and Mold Temperature 52
Table 5.12 - Example 2 - Kendall's
T
Correlation Between Pairs of Within-Row Rankings
52
Table 5.13 - Example 2 - Spearman's p Correlation Between Pairs of Within-Row Rankings
53
Table 5.14 -Example 2 - Kendall's
53
T
Correlation Between Pairs of Within-Column Rankings
Table 5.15 - Example 2 - Sperman's p Correlation Between Pairs of Within-Column Rankings .. 53
Table 5.16 -Example 2 - Joint Ranking
54
Table 5.17 -Example 2 - ANOVA on Joint Rankings
54
Table 5.18 - Example 2 - ANOVA on Original Data
54
Table 5.19 -Example 3 - Original Data - Yield of Wheat (kgjha) in Shawbak,
Jordan, in 1978
Table 5.20 -Example 3 - Kendall's
55
T
Correlation Between Pairs of Within-Row Rankings
56
Table 5.21 -Example 3 - Spearman's p Correlation Between Pairs of Within-Row Rankings
56
Table 5.22 - Example 3 - Kendall's
57
T
Correlation Between Pairs of Within-Column Rankings
Table 5.23 -Example 3 - Spearman's p Correlation Between Pairs of Within-Column Rankings. 57
Table 5.24 -Example 3 - ANOVA on Joint Rankings
58
Table 5.25 - Example 3 - ANOVA on Original Data
58
•
•
or
.
•
Chapter 1
INTRODUCTION AND LITERATURE REVIEW
Various applications of simultaneous statistical tests have been developed over the past
decades, under different theoretical approaches (Harter, 1980;
Schaffer, 1988).
In this
dissertation, simultaneous tests of row and column effects in two-way layouts are studied, using
nonparametric rank-based methods; the case of one observation per cell and no interaction is
emphasized.
The implications of simultaneous tests must be studied whenever a study attempts to
investigate two or more hypotheses using the same data. The two-way layout is the special case
of an experiment with two factors: for example, to investigate whether time to reaction to a
stimulus is affected by two factors, one related exclusively to internal conditions and the other
"
related to environmental conditions.
The subjects are observed under controlled internal and
external conditions, but there is not a way to separate the two factors when collecting the data.
Situations with one observation per cell and no interaction, of course, constitute only the simplest
cases, and the more complicated cases will need investigation later.
In this chapter, notation and basic definitions are introduced in Section 1, the hypotheses
for a two-way layout are stated in Section 2, the error rates associated with these hypotheses in
Section 3, a review of parametric tests in Section 4, the non parametric
tests in Section 5,
simultaneous tests in Section 6, and a summary in Section i.
1.1 Notation and Basic Definitions
Let X be a continuous random variable subject to a two-way classification, with n
rows and m
"
..
N
~
~
2
2 columns, so that Xij denotes the observation in the i-th row, j-th column, and let
= nm be the total number of observations.
The observations on X are organized in a n X m matrix displayed in Table 1.1.
2
Table 1.1 - Basic Layout of Data
.,
Columns
Rows
Total
1
2
m
1
Xu
X12
X1m
Xl.
2
X21
X22
X2m
X2 •
X. 1
X. 2
X. m
X
n
Total
Later, it will be necessary to assume that Xij'
= 1,...,n ; j = 1,...,m can be expressed as a
linear model:
X··
..J '
IJ = It+8.+-I..
I
'l'J +t I
(1.1.1)
where J.l represents the overall mean;
•
the 8 i denote the row effects, i = 1, ..., n;
the ¢J j denote the column effects, j = 1, ..., m; and
the tij are independent and identically distributed (lID) random error variables.
n
Note that
m
L: 8i = L: ¢J . = 0 , and that there is no interaction
i =1
A vector Y = ( Y l'
Y
where sign(u)
between row and column effects.
j=l J
k=
...,
Y m)' is called a ranking if
m.t 1 +
= 1 , if u > 0;
0, if u
4 :t1 sign (Y k- Y j)'
= 0;
- 1, if u <
k = 1, ..., m,
(1.1.2)
o.
If all the elements in Yare distinct, they are some permutation of the integers 1,..., m,
and the ranking is said to be untied. In all cases, ~ Y k =
T(m+ 1). A permutation set is the set
of rankings consisting of all the permutations of a single ranking vector.
.
1.2 Hypotheses
c
In a two-way layout with no interaction, three hypotheses are of immediate interest:
3
(1) HR : "There are no row effects";
(2) He: "There are no column effects";
(3) HJ : "There are neither row nor column effects", the joint null hypothesis.
These three hypotheses are clearly related, since the joint null hypothesis H J can be seen as the
intersection of the first two hypotheses, which are unrelated to each other.
In the nonparametric setup the hypothesis of no effects is equivalent to the hypothesis of
random ranking, described later in Section 5.
Decisions about these hypotheses will be based on the test statistics T R' T e and T J' for
H R ,He and H J respectively.
A hypothesis H is to be rejected if T
valued constant; H is to be accepted if T
~~.
>
~,
where
~
is a real-
It is important to note that rejecting at least one
of the hypotheses H R or He implies the rejection of HJ'
The results of the tests may be interpreted as follows: Accepting He (H R) implies that
there are no
differences in column (row) means. Rejecting He (H R ) implies that there exist
column (row) effects, which yield differences in column (row) mean values homogeneously across
rows (columns). Accepting HJ means that the values of X are homogenous across rows and
columns.
•
Rejecting the joint null hypothesis H J implies that there are either column or row
effects, or both.
Henceforth, when testing hypotheses, H will denote the null hypothesis and K will denote
the alternative hypothesis.
In general, C will stand for columns, R for rows,
and J for joint,
meaning both rows and columns, unless otherwise specified. In addition, T will denote the test
statistic and
~
will denote the critical value associated with the test of H against K.
In general, the test of any single hypothesis involves two kinds of error that should be
taken into account when drawing conclusions from the test: first, a false rejection, that is,
rejecting the null hypothesis H when it is in fact true, called a Type I error; second, accepting H
when it is in fact false, called a Type II error. The probabilities of occurrence of these two kinds of
error are usually denoted by
0'
and {3, respectively. Two more definitions must be mentioned at
this point: The maximum value of the probability of Type I error, say a, is defined as the
significance level of the test. If the null hypothesis H is being tested against the alternative
hypothesis K, then the power of the test is defined as the probability of rejecting H when K is
true (Bickel and Doksum, 1977). Then, a criterion to evaluate the performance of a test procedure
is that of Neyman-Pearson, which defines t.he best. test procedure as the most powerful test among
•
t.ests of a-level of significance. These ideas have been ext.ended t.o tests of more than one
hypothesis, as summarized in the next section.
4
In the present situation, the two independent hypotheses H R and He are subject to Type
I and Type II errors. The types of error that may occur when simultaneously testing H R and He'
and consequently HJ , are shown in Table 1.2, where II means not H; the triples represent the
sequence 'error in testing' (H R , He' HJ ); no error is coded '0', Type I error is code 'I', and Type
II is coded '2'.
From Table 1.2 it can be seen that the errors associated with the joint null hypothesis HJ
are related to the errors associated with the marginal hypotheses. The question that follows is
how to express this relationship.
Table 1.2- Types of error in testing H R' He and H J
True State of H R and He
HR
HR
He
He
He
He
He
(0,0,0)
(0,2,2)
(2,0,2)
(2,2,2)
He
(0,1,1)
(0,0,0)
(2,1,0)
(2,0,0)
He
(1,0,1)
(1,2,2)
(0,0,0)
(0,2,0)
He
(1,1,1)
(1,0,0)
(0,1,0)
(0,0,0)
HR
Decision
HR
•
For the linear model
and the three hypotheses are written
= 0,
<Pj = 0,
(1) H R : OJ
1= 1,
(2) He:
J
= 1,
"0'
n
0'"
m;
(3) H J : 0i = 0,
i = 1, ..., n
<Pj = 0,
j = 1, ..., m
(1.1.3)
1.3 Error Rates
Consider a family of k hypotheses
ai'
HI' ..
0' Hk , the i-th hypothesis being tested at level
As mentioned in Section :3, a false rejection is the rejection of a true hypothesis. In extending
the Neyman-Pearson concepts of level of significance and power, three aspects are of particular
interest (Schaffer, 1988; Miller, 1981):
•
5
(a) the expected proportion of the total number of tests that result in false rejections, called per-
,
comparison error rate, which is bounded above by
L (\' J
k;
(b) the expected number of false rejections, the per-family or per-experiment error rate, which is
bounded above by k
(L ad
k )=
L
O'j;
and
(c) the probability of one or more false rejections, called familywise or experimentwise error rate,
which is bounded above by some value between
L a;/
k and
L aj'
depending on the joint
distribution of the test statistics.
These three error rates serve different purposes. The per-comparison error rate (a) may be
used if the decisions resulting from the hypotheses are unrelated; per-family (b) and familywise
(c) error rates should be preferred if the outcomes of all tests in the family are to be considered as
a whole. Error rate (c) has been used more than (b), since a bound on (c) allows the
interpretation that with some high probability 1 - a, no incorrect rejections will occur, and also
because more powerful procedures associated with (c) are available. However, some authors argue
for a bound on (b), since (c) ~ (b), therefore a bound a on (b) is also a bound on (c).
The most general procedure to determine a bound a on (b) is the Bonferroni procedure
(Miller, 1981; Hochberg and Tamhane, 1987): test each hypothesis at some level
L
•
..
O'i
O'j
such that
equals the desired value 0'; usually a i = 0'/ k. When the Type I error probabilities are
chosen to be close to aj simultaneously for all n hypotheses, the least upper bound on (b) is
exactly a. See Feller (1968) for a thorough description and derivation of this procedure. A good
reference for other inequalities useful for this situation of simultaneous testing is Hochberg and
Tamhane (1987), Appendix 2.
1.4 Parametric Tests in Two-way Layouts
In the parametric linear model
X ij = J1.
+ OJ + ¢j + f j j '
1= 1, ...,
n , j
= 1, ...,
m ,
the us.ual assumptions are normality, independence, finite varIance and homoscedasticity of the
error variable
fjj'
or
fjj
,.,.
N(O, (72), 110. An additional assumption in the situation considered
here is additivity of effects of rows and columns.
To test whether or not column effects are
present, He: ¢ j = 0, j = 1, .... m, the test statistic is the variance ratio
•
6
obtained from the analysis of variance (ANOVA) Table 1.3 shown below:
Table 1.3 - ANOV A for a two-way layout, one observation per cell, no interaction.
Source of
Variation
Degrees of
Freedom
Sum of
Squares
Rows
n-l
SSR= 1m Ex~I.
ii'ffi
1
1
nm
1
Columns
m-l
1
SSe= n
Error
(n-l)(m-l)
SSE= SST - SSR - SSe
Total
nm-l
SST=
2
Ex
.
J
.J
E EXj'2 J
J
1
1
iiffi
Mean Sum
of Squares
F-ratio
Statistics
x2
MS = SSR
R n-l
MS R
FR= MS
E
x2
MS = SSe
e m-l
MS e
Fe = MS
E
MS E
SSE
(n-l)(m-l)
x2
When He is true, the distribution of the test statistic Fe is that of a central F distribution with
(m - 1) and (n - 1)( m - 1) degrees of freedom. Similarly, the test of H R is based on a central F
statistic with (n -1) and (n - l)(m - 1) degrees of freedom. It is important to point out that F R
and Fe are not independent, since they share the same denominator MS E'
•
In testing the joint null hypothesis H j , suppose that HR and He are being tested at levels
of significance O:R and O:e, respectively. Using the Bonferroni inequality, it can be determined
that the overall level of significance
OJ
of the two tests is such that
OJ
In fact, under Hj
,
:S
OR
+ O:e'
the joint distribution of the test statistics FRand Fe
IS
that of a singly
dependent central bivariate F.
By definition, a bivariate F distribution is based on three sums of squares, say Sl' S2 and
S3' which are central chi-squared random variables with n 1 , n 2 and n 3 degrees of freedom,
n3S 1
n3 S2
respectively. Then, F 1 = -So
'" F (n I , n3) ; F 2
-s
'" F (n 2, n3)'
and F 1 and F 2 are
n1 3
n2 3
.
singly dependent if Sl and S2 are independent; F 1 and F2 are doubly dependent if Sl and S2 are
=
dependent.
Furthermore, F 1 and F 2 mayor may not have central F distributions, and only if
they do are their joint distributions central. Tables for
III
= n2 are available, as referred to in
Johnson (1983).
An inequality that is valid for both singly alld doubly dependent, doubly central bivariate
F random variables is due to Kimball (1951) :
Pr {F 1 :S f1 ; F2:S f2 } 2 Pr { F I :S fI }· Pr { F2:S f 2 }·
i
Olkin (1971) also showed that when n l = n2' and f l = f2 = f, the inequality has the form
•
.
Pr{F I $f;F 2 $f} 2: 2Pr{F I $f} - Pr{F 2 $2f} .
Thus, lower bounds on the family error rate associated with t.he test of HJ may be obtained by
direct application of these inequalities.
1.5 Nonparametric tests in two-way layouts
Basic references for this topic are Quade (1972) and (1984).
Most of the tests described in the literature on nonparametric analysis of two-way layouts
deal with only a single hypothesis, either He or HR' Suppose that the test under consideration is
for column effects, He.
The two usual assumptions for this test are (AI) the rows are
independent, and (A2) all the blocks have the same distribution of ranks.
The latter will be
important to study the behavior of the test statistic under alternative hypotheses. Then, the data
can be taken as n random vectors of dimension 01, corresponding to the n rows, say, Xi
= (XiI'
... , X im )', i = 1, ..., n, and an associated vector of within row rankings can be assigned to each
vector, denoted by R i = (R il , ... , Rim)" i = 1, ... , n.
The null hypothesis He of no column effects implies that the observations within each
row are interchangeable, which means that the m! permutations of observations within the i-th
•
row are all equally likely. Therefore, the probability of any ordered subset (xl' ... , x m ) of the
integers (1, ... , 01) is
P (xl' ... , X".) = ~
m. ,
a property which is called random ranking.
1.5.1 - Randomization Tests - Permutation-type Tests
In this scenario, an efficient way of constructing a test for He is the rank randomization
test procedure, an application of Fisher's randomization principle to the sets of ranks,
particularly suitable for small values of nand m. The method consists of five steps. First, choose
a test criterion T that tends to be smaller if He is true than when He is false.
Next, generate
each of the M = (m!)n hypothetical data sets obt.ained by permuting the within row rankings.
Third, calculate T from each such dat.aset.
large as that one which was observed,
•
.
with T is the p-value p = M* 1M
Four, count how many of them yield values of T as
M*.
Finally, the exact level of significance associated
.
1.5.2 - Average Rank Correlation
In the situation of a two-way layout with one observation per cell and no interaction, the
8
choice of T is typically of the form:
2:
j
< j'
Corr(R i , R.,) ,
(1.5.2.1 )
•
I
where R i = (Ril , ... , Rim)' is a vector of within-row ranks and Corr is a measure of correlation.
T is then called the average internal rank correlation (Quade, 1972). The idea is to determine the
correlation between every two pairs of rows and average these (~) values.
Two measures of correlation - Kendall's tau and Spearman's rho - are most commonly
used to determine T, corresponding to Ehrenberg's test and Friedman 's X~ test, respectively.
These tests are described in Sections 5.4 and 5.5.
Using the randomization principle, it is feasible to tabulate the exact distribution of T for
small values of m and n. For large n, if the correlation measure is symmetric under interchange,
i.e.,
Corr(Ri,R i,) =
Corr(Ri"R i), then T is a
V-statistic of degree 2 (Quade, 1972).
Consequently, by assumptions Al and A2, the ranks Ri are independent and identically
distributed (lID), and the U-statistics theory for large n may be utilized.
1.5.3 - U-statistics
For a brief description of U-statistics theory,
let Xl' .. , ,X n be n independent
•
observations on a random variable X. Define statistics of the form
.2:.
•< J
U
g( Xj,X j
)
(1.5.3.1 )
where g is a symmetric function. Then, V is called a V-statistic, the g is called the kernel, and
k, the minimum number of observations necessary to calculate g, is called the degree of the Ustatistic (see Lee, 1990). In this case, g=Corr, and k=2. Further. define
I
= E [g(X I , X2 )] ,
77 = Var [g(X l , X2 )],
•
and"l
= E [g (Xl' X 2 )
2
g (Xl' X3 )] -"I.
In general, (q will denote the covariance between two kernels with q observations in common.
Then, the expected value of U and its variance are given by
E [lJ] ="1 ,
Var[lJ]
= 4(n -
2)(1 + 27/
Il(n - I)
_ 4(n - 2)(1 + 2(2
n(n - I)
( 1.5.3.2)
( 1.5.3.3)
..
9
For large n, Var[U] = 4(/ n. If 0
<( <
00,
it has been proved that U is asymptotically normal
(Hoeffding, 1948).
However, when testing He'
normality may not hold.
III
general, (1=0 , which implies that the asymptotic
Instead, Quade (1972) showed that in the particular cases of
Ehrenberg's and Friedman's tests, the asymptotic distribution is that of
1 + (n - 1) T "'"
L:a
Wi Yi '
where Y i are independent chi-squared and the Wi are positive weights. If (1= 0, Var [T] = 2(2
/ n(n-l).
Also, if the measure of correlation is of product-moment type, then (2 =1/ (m - 1) and
Var [T] = n(n _ 1)(m _ 1) ,and finally,
Var [1 + (n - 1) T] =
2(n-l)
(
1) .
nm-
These results will be applied in Ehrenberg's and Friedman's X~ tests described in next
two sections.
1.5.4 - Ehrenberg's test
This test was proposed by Ehrenberg (1952).
Suppose the test is for column effects.
Using Kendall's tau as the measure of correlation between any two vectors of within-row ranks,
R i and R i "
i, i' = 1, ..., n
(1.5.4.1 )
Then, the average internal rank correlation is given by
1
('~)
i
E
< i'
T .. ,
II
Note that - _1_
n- 1
::s T 1,·' ::s
1 .
Another way of defining this correlation measure is the following: first, two observations
•
(Xl,Y I )
and
(X 2,Y 2 )
on a
bivariate variable
(X,
Y)
are said
to
be concordant if
(Xl - X2)(Y1 - Y 2) > 0; they are said to be discordant if (Xl - X2)(Y1 - Y2) < 0 , and they. are
said to be tied if (Xl - X2)(Y 1 - Y 2 ) = O. Then, given a sample of size n, let Nc ' N d and Nt be
number of concordant, discordant and t.ied pairs of observations, respectively such that
Nc - Nd
Nc+Nd+N t = 2 = Ntotal' Thus, TJ( may also be defined as
N
. Now, let Pc' Pd and Pt
(11)
1
total
10
be the probability that
a randomly chosen pair will be concordant, discordant and tied,
respectively, with Pc+ Pd+Pt=1.
Finally, Nc/Ntotal ' Nd/Ntotal and Nt/Ntotal
are the
corresponding U-statistics estimates of degree 2, and T [( is the U-statistic of degree 2 for
,
estimating r=pc - Pd .
•
If He is valid, the first four moments of the statistic T K are (Quade, 1972):
(1.5.4.3)
2
2 (201+5)
2
Var [T K ] = E [T K ] = 901 (01 -1) n(n -1)
(1.5.4.4)
/3 _ 16 (2m 2 + 601 +7)2 (n - 2)2
1 -
01(01 -1)(201+5)3
(1.5.4.5)
n(n - 1)
and the kurtosis is
24 (2m 3 - 8m 2 + 12m +9) (n - 2)(n - 3)
81 01 2 (01 - 1)21/J
+
01(01 - 1) (201+5)2
n(n -1)
+ 2(201+5)2 n(n -1)
/3 - 3 (n+l)(n - 2)
2-
n(n -1)
,
where 1/J is the fourth moment of Kendall's tau,
1/J= 100 01 4 + 32 01 3 - 127 01 2 - 99701 - 372
1350 [01(01 - 1)/2]3
Then
/3 2 simplifies to
a
1J2
=
3 (n-l)(n-2)
24 (201 3 _ 8m 2 + 12m +9)
+
n n- 1
m(m - 1) (201+.5) 2
(
)
96 (2m 3 + 8m 2 +12m+~)
01 (01 - 1) (201+5)2
1
IT
(1.5.4.6)
When n=2, the test is that of Kendall's tau=O, and when 01=2 it is the sign test. Exact
tables are available for the following values:
Reference
Ehrenberg (1952)
Quade (1972)
n for:
01=:3
01=4
4, 5
3
:3( 1)10
:3( 1)6
01=5
3,4
01=6
3
II
For values of 01 and n beyond the scope of the mentioned tables, some approximations to
the distribution of T K have been proposed. Ehrenberg (1952) showed that the test statistic W=
D{ 1+(n - 2) A T K} is approximately distributed as a chi-squared with D degrees of freedom,
11
where D= n(n -1)B, A= 3(2m +6m.+7) and 8= m(m -.I)(2m+5~3 .
(2m+5)2
2(2m 2 +6m+7)2
(n - 2)2
2
This test procedure is consistent against all alternatives for which the parameter
E [T K ] = (1 1)
m m-
,.
X; test
Friedman's X; test
j
2:
[Pr(R jj >
< j'
R ..,) - Pr(R jj < R ..,)]
I)
2
> O.
.')
1.5.5 - Friedman's
is the most popular nonparametric test for the analysis of two-way
layouts. It was designed to be more widely applicable than the classical analysis of variance, by
avoiding the assumption of normality of the error term. The hypothesis of interest is the single
marginal hypothesis He: There are no column effects, which is equivalent to saying that ranking
is at random. The procedure involves first ranking the data in each row, then "test to see whether
the different columns of the resultant table of ranks can be supposed to have all come from the
same universe" (Friedman, 1937).
Compute a statistic X~ from the mean ranks for the m columns,
which tends to be
distributed according to the lisual chi-squared distribution when He is true, or the ranking is in
fact at random. Let Rj denote the sample mean rank of the j-th column. It follows that
t (m+l) , and
E [R j ] =
JIR
Var [R.]
= (j2R = m122-1n
)
=
The test statistic X~ is defined as
_
12n
-m(m+l)
In
:21 (m + 1)] 2 .
2: [R )
j = 1
(1.5.5.1)
An easier formula to calculate X~, which involves only integers,
2
X
'r
•
12
= nm(m+l)
In
j
II
2
2:
( 2: R·
=1 j =1
where R jj is the rank of the observat.ion
) -
:3n(m+l),
IS
( 1.5.5.2)
I)
Xj)'
For n not too small. X~ has a chi-squared distribution with (m - 1) degrees of freedom.
Thus, if X;
>
X~ (m - 1), t.hen He is rejected at level
0'.
Another way of developing Friedman's X~ test is t.o use the average internal rank
12
correlation, with Spearman's rho as a measure of correlation. First, let R i = (R il , ... ,Rim)' i
=
1, ..., n, and
R=t
(m+l).
Then, Spearman's rho correlation between rows i and if is defined
as
m
pII..,
L: (R..IJ
j == 1
=
L: 1(R·IJ
0
IJ
-2
111
j ==
R) (R.,. -
-
R)
III
L: 1 (R.,.
1J
j ==
R)
, i, i' = 1,..., n ;
-2
( 1.5.5.2)
- R)
if there are no ties,
p ..,
(1.5.5.3)
II
Then, the average internal rank correlation is
Ts =
1
cn
.
L
.
p .. ,
II
1 <I
3n(m+1)
m-l
1
12 S
= n-l [
n(m 3 - m)
where S =
m
n
L
(
L
j==l i==l
-
1]
,
(1.5.5.4 )
1
RfJo) is a convenient integer. Note that - - - ~ T s ~ 1.
n-l
Another way of obtaining T s involves extending the definition of concordant and
discordant pairs. Three observations on a bivariate variable (X,Y) are called majority concordant
if at least two of the three pairs are concordant, and majority discordant if at least two are
discordant. Assuming no ties, in a sample of n bivariate observations, let N me be the number of
majority concordant triples, and NI1Id be the number of majority discordant triples; their sum is
~
,=
Nme - N l1Id
(~)
as the grade correlation of the sample. Thus, this is a U-statistic of degree 3 for estimating the
difference, = Pme - Pmd ' the grade correlation of the population, where Pme and Pmd represent
the true probabilities that a random triple will be majority concordant and majority discordant,
respectively. Then, p can be reexpressed as
p=
n~1 [(n - 2) , + :3 r],
(1.5.5..) )
and the average correlation is obtained through this same linear combination.
A rescaling of T s to obtain a range from 0 to 1 is Kendall's coefficient of concordance
(Kendall and Smith, 1939)
•
13
- 1+ (n - 1) T _
W n
S-
,
Finally, Friedman's
12 S
Z
n' (m
3
-m)
3(m+l)
m-l .
(1.5.5.6)
X; statistic can be expressed as
X; =
(m - 1) [1 + (n - 1) T s].
To study the distribution of the statistic
X;,
(1.5.5.7)
Quade (1972) derived its first four moments
under the null hypothesis of random ranking:
( 1.5.5.8)
0)
IT (m - 1)(n - 1) ,
the skewness is
..
131
(n - 2)3
n(n-l)'
= m~ 1
. . a _3(m+:3)(n-2)(n-3) + 12(m-l)(n-2) + 2(m-l)3"p
an d t he k urtosls IS !J2 n(m _ l)(n _ 1)
where "p
.
IS
the fourth moment of Spearman's rho,
Exact tabulations of
X;
3(25 m 3 - :38 m 2 - 35 m + 72)
3
25 m (m+l) (m - 1)
are available for small values of m and n. If n=2, the test is
equivalent to the simple rank correlation test,
and
if m=2,
to the sign test.
The following
table, reproduced from Quade (1984. p. 193), presents the original tabulations of the null
distribution for m, n>2.
Each gives upper tail probabilities (p-values) in terms of
X;
as the
argument, except for Kendall and Smith, who used \"1 instead. The notation "xDP" indicates
"at least x decimal places", "xSF" indicates "at least x significant figures" and "a(k)b" means a
•
to b by k.
Reference a
Precision
Friedman (1937)
n for:
m=3
m=4
:3DP/2SF
:3(1)9
3,4
Kendall and Smith (1939)
3DP/2SF
:3(1)10
:3( 1)6
Quade (1972)
.5DP/2SF
:3( 1).5
:3(1)8
Hollander and Wolfe (1973)
:3DP
:3( 1) 1
:3( 1)8
Odeh (1977)
.5DP
aO wen (1962)
m=5
m=6
3
3(1)5
6( 1)8
:3( 1)6
provides tables for m=:3 with n=3( 1) 1.5 and m=4 with n=3( 1)8 which
unfortunately are erroneous.
14
For large values of m and n,
various approximations to the distribution of
X;
have
been proposed (Quade, 1972). As mentioned before, Friedman (1937) presents the result that the
X;
asymptotic distribution of
t
is that of a chi-squared with (m - 1) degrees of freedom. However,
it fits only the first moment exactly, and it is extremely conservative for moderate values of m.
For the purpose of this dissertation, the chi-squared approximation will be used.
To study the consistency of Friedman's
E [Tsl
=
}2
m -m
.~ (E j
) =1
-
(E.) _
mt
l
let E j = E [R jj]; then
)2 .
w
m+l
-:r--'
and the tests based on T s are consistent against any alternative
mt 1 )2.
This makes this test slightly less general than Ehrenberg's test,
Un d er He' E j =
for which
J:
)=1
X; test,
-
since this requirement for consistency is included in the requirement for the latter.
1.5.4 Rank Transformations (RT)
The idea of rank transformation (Conover and Iman 1976, 1981) is simply to apply the
usual parametric methods to the ranks of the data instead of to the data themselves. Its purpose
is to combine mathematical transformations of data to solve the problem of non-normality and to
obtain distribution-free procedures. This idea is basically empirical, rather than theoretical, and
simulation studies show that it may be considered a valid procedure (Iman, 1974). A limitation
of RT procedures is that distribution-free tests are not always obtained: in some cases they are
conditionally distribution-free, asymptotically distribution-free, or neither.
Conover and Iman (1976) classify RT-procedures according to four basic ways of
assigning ranks to data:
"RT-l - The entire set of observations is ranked from the smallest to largest, with the smallest
observation having ranking 1, the second smallest ranking 2, and so on. Average ranks are
assigned in case of ties.
RT-2 - The observations are partitioned into subsets and each subset is ranked within itself
independently of the other subsets.
RT-3 - This rank transformation is RT-l applied aft.er some appropriat.e reexpression of the
data.
RT-4 - The RT-2 type is applied t.o some appropriate reexpression of the data. "
In two-way layouts, ranks can be assigned within rows, or within columns, which are RT2 type procedures, or they can be assigned to the whole table, therefore ranging from 1 to N=n m,
15
which is an RT-l type procedure.
,
Friedman's and Ehrenberg's tests make use of RT-2 procedures.
Conover and Iman
(1981) and Iman, Hora and Conover (1984) adopted the RT-l procedure and then applied a
standard ANOVA based F test to the set of overall ranks.
They concluded that the test is
asymptotically distribution-free under mild conditions, and that the test compares favorably
against Friedman's test in retaining information from the sample.
This procedure retains the
relative ordering of the original observations, and the authors proposed that separate Friedman's
tests may be used to test H R and He' by re-ranking within columns and within rows,
respectively. However, they do not recommend this method to be used alone. A parallel analysis
on raw data should also be carried out, and the results compared before drawing conclusions.
For testing a marginal hypothesis, Iman, Hora and Conover (1984) compared the small
sample power and robustness of Friedman's test and the RT-I test using a Monte Carlo study for
m=2, 3, 4, 5, 10 and n=1O, 20, 30.
They used five distributions in comparing the procedures:
normal, lognormal, double exponential and Cauchy, and presented tables of power and robustness
based on 30,000 simulations.
For m=2 columns, the comparisons were made with the paired t
test and the sign test.
The results with the normal distributions showed the RT-l approach to have almost as
..
much power as the t test.
For non-normal distributions, the t test has the most power for
uniform distribution, while the sign test and the RT-l test are equivalent and they are best for
•
Cauchy distributions. The RT-l procedure has the greatest power for the lognormal. For m
2: 3,
the RT-l approach was compared to the F test for a complete blocks design and to Friedman's
test.
In the 20 cases examined (five distributions and four values of m) the F test had the most
power in the four cases involving the normal distribut.ion; the F test and RT-l test were
equivalent for the Cauchy distribution. and the RT-I procedure had the most power in the
remaining eight cases.
It would be interesting to extend these results to the test of the two
marginal hypotheses on the same set of observations.
1.6 Simultaneous Tests
,
Simultaneous tests are usually presented in connection with multiple comparIson
procedures, since the ultimate goal of simultaneous tests is to provide conclusions when the null
hypothesis of no effects is reject.ed, leading to the question of what factors or levels of the factors
yield the differences.
In the parametric set up, the simultaneity characteristic of the test
IS
reflected by the
16
common denominator used in the F statistics for rows and columns, which is the estimated
variance of the error. As mentioned earlier, the strategy to obtain an overall rate for the test of
the two effects is to determine bounds on the family wise error rate, or the expected number of
false rejections. The Bonferroni inequality, its extensions and combinations with Tukey's and
ScheffE~'s
methods (Neter, Wasserman and Kutner, 1985) have been recommended for the two-way
layouts.
Jensen (1971) presents another inequality that is useful in the specific case of positive
•
dependence between simultaneous events.
In the nonparametric set up, for both Ehrenberg's and Friedman's tests,
the marginal
test statistics do not satisfy an explicit relationship, as in the parametric situation.
Each
marginal hypothesis is tested entirely based on information on one of the dimensions only,
ignoring the second one, which limits the scope of the tests when both dimensions must be taken
into account.
The test statistic for the joint null hypothesis could be some combination of the
two marginal test statistics, however, this is not the case for the above mentioned tests.
To take both within-row and within-column information into consideration, two
approaches should be mentioned. The first is from the original work of Friedman (1937), where
the author suggests that testing HJ is equivalent to testing HR and He independently. The
author says to perform one of the tests, and then repeat the analysis just treating the columns the
way in which the rows were previously treated. Thus, observations will be ranked within columns
t
and the mean values obtained for each column, as done before with the rows.
The second, suggested by Conover and Iman (1981) is to apply the F test directly to RTtype ranks, where all of the observations are ranked together from 1 to N=nm. This results in
a conditionally distribution-free test, given the partitioning of ranks into rows.
•
The authors
stated that the "advantage of ranking all of the observations together is that all of the analysis
of variance procedures may be applied to the ranks, with the resulting tests for main effects,
interaction, or whatever. following immediately. Other rank tests that involve a separate ranking
for each test of hypothesis become difficult or almost impossible to apply".
However, neither of these two approaches addresses the issue of a possible association
between the two tests, neither under the joint null hypothesis, nor under alternative hypotheses.
Therefore, it is the purpose of this research to study non parametric analysis of simultaneous tests
in two-way layouts, using average rank correlation based tests and the Rank Transform tests.
1.7 Summarv
When simultaneous tests are the major focus of the study, and non parametric tests are to
be used the data analysis, two questions must be taken into consideration: Whether under the
•
•
17
joint null hypothesis the two marginal test statistics are associated, or correlated, and in what
direction.
Under the alternative of existence of row effects, will the test for column effects be
affected, how and in what direction.
These questions are approached
by U-statistics theory,
average internal rank correlation theory and the results available for the parametric analysis of
two-way analysis.
...
•
"
Chapter 2
CORRELATION BETWEEN
-rC AND T R
UNDER THE JOINT NULL IIYPOTHESIS
Suppose that the joint null hypothesis
H J : 0i=O, i= 1,
,n;
<Pj =O,j = 1,
,m
is valid, the N=mn observations are arranged as in Table 1.1, and that the marginal hypotheses
Hc : <Pj = 0, j
= 1, ..., m, and H R : OJ= 0, 1= 1, ..., n are tested separately, based on the
marginal test statistics T C and T R , respectively.
In this chapter, Ehrenberg's, Friedman's and the Rank Transform tests will be examined.
For each test, the correlation between the two marginal test statistics will be obtained:
Under H j , E[T C ] = E[T R ] = 0, and Var[T C] and Var[T R ] are finite for any nand m.
For each of the tests, a closed-form expression for the correlation will be provided, as well
as how it was obtained, and some numerical values for selected nand m.
A summary of the
results will also be presented.
It has been mentioned
In
Section 1.5 that the test statistics for Ehrenberg's and
Friedman's tests are based on average rank correlation, and, thence on U-statistics.
Therefore,
the theory of U-statistics will be applied to determine the correlation between the two test
statistics T C and T R . The Rank Transform test will be treated in a different way.
2.1 - Tests based on U-Statistics
The general expression for the correlation between two U-statatistics is presented
In
Theorem 2.1, which will be applied to the specific cases of Ehrenberg's and Friedman's tests. In
both cases, the results will be worked out first for the smallest possible design, the
expanded to n x m designs.
a x 3, and
then
This will be accomplished by writing TCand T R in their most
reduced forms, that is, as functions of the signs of products of differences between two
19
observations. The reasoning for this generalization is that the test statistics will depend only on
..
how many choices of pairs of rows and columns there are to be taken into account.
..
2.1.1 - Correlation between two U-statistics
Hoeffding (1948) firstly introduced an expression for the correlation between two Ustatistics; this was also presented by Lee (1990), in a simpler form which is adopted here.
Theorem 2.1 - Let 5n ,k be the set of k-subsets of {I,..., n}j let 51 E 5 n k and 52 E 5 n k
, 1
' 2
U~I) and U~2)
•
Let
be two U-statistics, both based on a common sample Xl' ..., Xn' but with
different kernels g(l) and g(2) of degrees kl and k2 respectively, kl ~ k2. Then
(1) (2) _ 1
Cov( Un' Un) - ( n)
k
t
k (k2) (n - k2) 2
L::
c
k
ff c c'
c=l
I-C'
1
where ff~,c
= Cov(g(I)(5 1), g(2)(5 2 », and the sets of indices 51 and 52 are such that 51 n 52 has
c elements.
2.1.2 - The test procedure
..
For both Ehrenberg's and Friedman's tests, the procedure for testing column effects has
four steps: first, rank the observations within each row; second, take the correlation within each
..
pair (1)f rows; third, average these correlations over the pairs of rows. Finally, the test statistics are
linear functions of the average rank correlations.
Analogously, the procedure for testing row
effects follows these four steps, substituting ranking within columns for ranking within rows, and
so on.
The ranks within row i are written
m
R~. - m+l + 1
IJ 2
2
j'
L::
=
1
sign (X ij - Xii') , j = I, ..., nj
1 -< R~
IJ
< m,
-
and the ranks within column j are written
n+l
Rc
jJ. = -')-
..
There are
+:)1
~
L.J
i'
=
sign(X jJ.
1
-
X.,.) ,
I
i = 1, ..., m;
J
(2) and CD possible pairs of columns and
correlation between rows ranges from - _1_
n-l
columns ranges from - _1-1 to 1.
m-
1~
Rb ~ n.
rows, respectively, and, the average rank
to I, and the average rank correlation between
20
It is important to note that, under HJ , without loss of generality, the observations Xii
can be replaced by their joint rankings R ii , Le., by integers from 1 to N. This implies that it is
equivalent to take sign(R ii - R ii ,) or sign(X ii - XV). Furthermore, for ranking within rows R~ ,
sign(RR1'J' - R~.,)
= sign(X1'J' - X lJ..,)
lJ
and, symmetrically for the rankings within columns, R~.
,.
.
This fact will be used to derive the expressions necessary for Theorem 2.1. The idea is to
write both marginal test statistics as two U-statistics based on rows, or both based on columns.
In this way, the two U-statistics will be calculated on the same sample of row vectors Xi' i = 1,
..., n or on column vectors Xi' j = 1,..., m. The expressions for the U-statistics for Ehrenberg's
and Friedman's tests will be determined in the next sections.
2.2 - Ehrenberg's Test
In this test, the measure of correlation between two rows or two columns is Kendall's tau,
as described in Section 1.5.
2.2.1. Test for column effects
For any two rows i and i', Kendall's tau coefficient is given by
T
-
.,
~ sign (R~ - R~.,) sign(R~. - R~,) ,
i < j'
lJ
I J
I J
1
ii' - (~)
1
(~)
j
~
<
j'
sign (Xii - X..,)(X.,. - X., .,),
IJ
I J
1 J
and the test statistic is the U-statistic on the n rows based on
T .. ,
II
as the kernel:
T C = U(l)
1
- (2)
~
i<i'
Too'
II
__1_ _1_
-(2)(~)
i
~
~
< i' i < j'
sign (Xii-X ..,)(X.,.- X.,.,),
IJ
1 J
I J
When HJ is true, E[U(l)]=O and Var[U(l)]=
(mx
2 2
n
2m+5
-!J)
..
21
2.2.2 - Test for row effects
..
Similarly, for any two columns j and j' , Kendall's tau is
E
i < i'
=
1
(2)
i
sign (Rb - RS'.) sign(Ri?, - RS',) ,
1 J
IJ
E
sign (Xij-X.,.)(X ..,< i'
I)
1 J
X.,.,),
I)
1 )
and the test statistic is written
T
R
=
(.-L)
E
m .<.,
2
1
= (m )
2
T ..,
))
) )
(-1-)
n
.E
< ., . E
< .,sign (Xi)' 2
1
I)
X.,1 ) .)(X IJ
.., - X.,.,),
1 J
J
C
C
1
2n+5
Under HJ , E[T ]=0 and Var[T ]= (mx. n ) -9- .
2
..
2
Note that this can be also considered as a U-statistic on the rows with kernel
1
..
(2)
j
E
< j'
sign(X ij - x.,.) (X ..,-X.,.,).
I)
IJ
I)
2.2.3 - Correlation between T C and T R
Consequently, T C and T R are expressed as two U-statistics based on the same sample of
(2.2.3.1)
T R = UI,,2)(X1,..., Xn ) = ( 1)
.
..
~
i
E
<
g
j"
(2)
(Xi' X.,)
1
with kernels
=(.-L)
g(1)(X i, X.,)
E sign (Xi ) - X,)(X,
- X.,.,),
1 m . < .,
I)
I )
1 )
2 ) )
•
and
(2.2.3.2)
22
g(2)(X i • X,,)
1) . .E1 sign(X i ]·- X".)
(X",-X",,)
,
• =( m
I]
I]
I]
2 ]<]
respectively, both of degree 2. Now, using Theorem 2.1, the covariance between U(I) and U(2) is
given by
•
Cov (U(1)
U(2)
u'
?) (n - '»)
(2) c~1 (C 2 _ ~
2
= _1_ "
n
2
(1'c,c'
where (1'~,c = Cov(g(I)(5 1), g(2)(5 2», and the sets of indices 51 and 52 are such that 51
n 52
has
c elements; say 5 1={i,i'}, 5 2 ={k, k'}, i, i', k, k' =1, . H, n; i<i' and k<k'. Then
E .,
] <]
sign (X .. - X ..,) (X., . - X., ,,)
I]
I]
1 ]
1 ]
and
both of degree 2. Therefore,
(1) For c= 1, (1'1,1 =0, since all the terms in this covariance are like
E sign [(Xn - X12 ) (X 21 - X22 ) (X n - X31 ) (X 12 - X32 )] = 0,
by the independence between rows;
(2) for c=2, (1'2,2 =
+(+)'
since the non-null terms in this covariance are like
These results lead to
These results were confirmed for the :3 x:3 case by complete enumeration of the 9! permutations of
integers from 1 to 9, using the Adjacent Mark Method (Bechenbach, 1964).
For each
permutation, the product of the two test statistics was calculated, and thence the expected value
and covariance, and later used to calculate this covariance when there are
and columns.
In consequence, there follows:
(2) (T) pairs of rows
23
Theorem 2.2- Let Xjj , i=l,..., n,
j=l,
variable with a c.d.f. F(x-Oj-¢>j)'
i=l,
, m be a random sample of a continuous random
, n, j=l, ..., m.
Let T C = U(1) and T R= U(2) be the two marginal test statistics for Ehrenberg's test, for
testing column and row effects, respectively, as defined in (2.2.3.1) and (2.2.3.2).
Then, the correlation between T C and T R is given by
Corr (T C T R) =
3
.
,
~(2m+5)(2n+5)
Proof - Given that the covariance between T Cand T R , and the variances of these test statistics
1
2n+5
1
2m+5
.
are (7"m":"2"'X==2") -9- and
X 2) - 9 - ' respectlvely, the result follows.
('2
Note that when m-oo, or n-oo, or both, Corr(TC,TR)_O.
Some values of this
correlation are shown in Table 2.1.
Table 2.1 - Correlation between T C and T R from Ehrenberg's test,
for selected values of m and n.
m
n
3
3
4
5
6
10
20
.273
.251
.233
.219
.181
.135
.231
.215
.202
.166
.124
.200
.188
.155
.115
.176
.145
.108
.120
.089
4
5
6
10
20
.067
2.3 - Friedman's test
In this test, the correlation between two rows or two columns is Spearman's p, as earlier
described in Section 1.5. In order to use the same method used in Ehrenberg's test, Spearman's p
---.1-1 [:3T
+ (n - 2) ,] , a linear combination of Kendall's T
n+
and the grade correlation " both V-statistics, of degrees 2 and :3.
will be written as in (1.5.5.5): p=
2.3.1 - Test for column effects
24
For any two rows i and i', Spearman's p is given by
R
[ j Lm= 1 R R.. R.,.
I)
It is important to note that the measure
determined, while
Pjk
Tjk
I)
m(m+l)2 ]
4
.
requires a minimum of two columns to be
requires a minimum of three columns.
The test statistic is written as
C
(-L)
T = n . L ., p II..,
2 ,<a
=
(1)
n . L ., n +11 [3T .., + (n-2) r ..,]
2 <
II
1
=
II
1
n~1 (~)
,L,T + ~~~ (~)
,L, i'jj'
2 1<1
2 ,<,
jj ,
= _3_
n+l
U(l)
n
+ n-2
n+l
U(2)
(2.3.1.1)
II
a linear combination of two U-statistics calculated on the n rows. When H J is valid, ETC =0 and
C
2
Var T = n(n _ l)(m _ 1) .
The two U-statistics are defined by
1 "
(1)(
(n)
,L.J"g
XiI Xi') ,
2
(1) _
U II
-
1<1
where the kernel g(1) is given by
g(1)(X i , X.,)
,
=(--L)
In.
2
L"
sign«Xj),-X.")(X.,,-X,,,,))
I)
1 )
1 )
J<J
of degree k1 =2, and
=
1
(2)
where
g
of degree k2 =3.
(2)
(Xi' X.,)
1
l,,·
=-(-)
L.J
slgn«XiJ-X.")(X"-X,,,,,)),
6 III
:3
'-J."
JrJ
-J. .-"
rJ
IJ
1 J
1
J
•
25
2.3.2 - Test for row effects
..
In this case, given two columns j and j' ,
n (n+1)2
4
•
] ,
and the test statistic is expressed by
1
(2)
=
j
1
(2)
j
L:
p ../
< j' JJ
L:
+1 1 [3
< j' m
T ..,
JJ
+ (m - 2)
r ..,] .
11
Now, switching the sums, T R may also be written as a linear combination of two Ustatistics on the rows, in the same way it was done for Ehrenberg's test.
(2.3.2.1)
•
The U-statistics are defined by
I
(2)
i
"LJ g (3) (X ,
j
< i'
X.,) ,
I
where the kernel g(3) is given by
_ (-)
1 "LJ slgn(
.
( XjJ.-X./.)(X./-X." ))
g (3) (Xi' X,/)
1-m
· ./
IJ
IJ
•J
2
J<J
of degree k3 =2, and
1
6
(3)
_
1
i
'#
L:
j'
'# i"
g(4)(X j ,
x." x.,,) ,
I
I
where
g
(4) (
X," X'I " X.,,)
- (-)
I
nl
2
j
L:
sign«Xjj-X.,.)(X ..,-X.".,)),
< j'
J
I)
I)
I
26
of degree k4 =3.
2.3.3 - Correlation between T C and T R
T C and T R
With both
written as U-statistics on the same sample of n rows, as in
(2.3.1.1) and (2.3.2.1), Theorem 2.1 can be used to determine
COy (T C T R )
,
~ U(l) + n - 2 U(2»)
= COy [(
n+l
n
n+ 1
n
,
(_3_ U(3) + m - 2 U(4»)]
m+l
n
m+ 1 n
1
[9 C ov (U(l)
(3») + 3 ( m - 'J)
-_ (m+l)(n+l)
n ' Un
- COY (1)
Un , Un(4») + 3 ( n - .2) COY (2)
Un , Un(3»)
in the 3 x 3 case, by complete enumeration, similarly to what was done for Ehrenberg's test.
(1) The statistics U(l) and U(3) are the same as statistics involved in Ehrenberg's test, therefore
(1)
(3»)
1
I
Cov(U n ,Un = :3 (nx m )'
2 2
(2) The covariance between U(1) and U(4) is given by
COV(U(l) U(4»)
n' n
=
~ (3)(n-3) 2
(2)1 c~1
c 2 - c (7c,c'
where (7~,c = Cov(g(1)(5 1),g(4)(5 4)), and 51 and 54 are such that 51 n 54 has c elements; say
5 1={i,i'} and 5 4 ={k,k',k"}. The kernels are written
g(l) (51) =
g(4) (54) =
(-L)
j
2
1
E
sign
< j'
(( X iJ· - X.,) ( X". - X., .,))
_(1
). l: sign (( X
6 m . < .,
:3
J
J
IJ
kJ, -
X k ,·)
J
1J
(
Xk
J
·, -
1J
Xk"
.,)) ,
J
of degrees 2 and 3. Therefore, lIsing the same method lIsed for Ehrenberg's test, it is obtained by
Theorem 2.1:
(i) For c= 1, (71,1=0, since all the terms in this covariance are zero. by the independence between
rows;
(ii) for c=2, (72,2 =
Z5
, since the non-null terms in this covariance are
..
'27
.
Thus,
Cov(U(1) U(4))
u'
n
(3) The covariance between U(2) and U(3) may be obtained in a similar way to be equal to
(2)
(3)
7
Cov (Un' Un ) = 45
(4) The covariance between U(2) and U(4) is given by
(2)
Cov (Un'
where
1
(4)) _ _
1
I
(2)
cn
(3) (n2 -_ 3)
~
- (~) c ~ 1 c
Un
C
2
17 c, c ,
(j~,c = Cov (g(2)(S2)' g(4)(S4))' 52 and 54 are such that 52 n 54 has c elements: say
5 1 ={i,i'} and 5 4 ={k,k', kif} so that the kernels are written
g(2) (5 )
2
= _1_
6 (3)
j
.L
"I- j' "I- j"
sign (( X iJ· - X ..,) (X, - X .,1/)) ,
IJ
1J
1J
and
..
of degrees 2 and 3. Therefore,
(i) for c= 1,
17 1 ,1 =0,
since all the terms in this covariance are zero, by the independence between
rows;
(ii) for c=2,
7
17 2 ,2
= 90
(D
(3) , since the non-null terms in this covariance are like
E sign [(X l1
-
Xd (X 21 - X 22 ) (X l1
-
X·H
)
(X 12
-
X 22 )] =
g~
Finally, after combining the four results above and their coefficients. the covarIance
between the two marginal t.est stat.ist.ics
28
This result was also verified for the case m=n=:J by the same complete enumeration of
the 9! permutations of integers from 1 to 9, using the Adjacent Mark Method (Bechenbach, 1964).
For each permutation, the four products listed above were calculated, and thence the expected
value and covariance, and later used to calculate this covariance when there are
(2) ('2) pairs of
rows and columns.
Now the following theorem can be stated:
Theorem 2.3 - Let Xij be defined as in Theorem 2.2, and the test statistics T C and T R as above.
Then the correlation between T C and T R is given by
Proof - Given that the covariance between T C and T R equal to
1
of these test statistics are - 1) ~-1
and
(~
1
(~)
g
1
1
en en
, and the variances
_1-1 ' respectively, the result follows.
n-
Note that when m-oo, or n-oo, or both,
Corr (T C , TR)_O.
Some values of this
correlation are shown below.
Table 2.2 - Correlation between T C and T R from Friedman's test,
for selected values of m and n.
m
3
n
:J
4
;)
6
10
:W
.271
.2:J4
.210
.191
.148
.105
.203
.182
.166
.128
.091
.162
.148
.115
.081
.1:35
.105
.074
.081
.057
4
5
6
10
20
.041
2.4 - The Rank Transform Test
This test consists of simply applying the classical F-test on the ranks of the observations
instead of on the original observations: the ranks are integers from 1 to N=mn.
..
29
The two marginal test statistics are given by
SSR(columns)j(m - I)
SSREj(m - I)(n -I)
MSR(columns)
MSRE
SSR(rows)j(n - I)
MSR(rows)
MSRE
SSREj(m - I)(n - I) =
where SSR(columns) denotes the sum of squares of ranks associated with the columns, SSR(rows)
denotes the sum of squares of ranks associated with the rows, SSRE denotes the sum of squares
associated with the error, and
SSR(total) = SSR(columns)
+ SSR(rows) + SSRE
(2.4.1)
is the total sum of squares.
Note that T C and TRare clearly correlated, because just as in the parametric case, they
share a common denominator MSRE.
In addition, differently from the classical ANOVA table
sums of squares, here, the total sum of squares of ranks is a fixed number
N(N 2 - 1)
12
(2.4.2)
This implies that the sums of squares associated with the columns and with the rows are
negatively correlated, since they still have to satisfy (2.4.1).
In the 3x3 case, by complete enumeration, the correlations are as follows:
(i) between the sums of squares:
Corr [SSR(columns), SSR(rows)]=
-1'
where SSR(total)= 60 ;
(ii) between the two test statistics. the two variance-ratios:
Corr (T C , T R )
= 0.42 ,
a positive correlation.
2.5 - Summary
2.5.1 - Under the joint null hypothesis
In summary, under the joint null hypothesis, for all of the three tests studied, the
correlation between the two marginal test statistics is positive. This suggests that if for one test
the null hypothesis is to be rejected, for the other test it is more likely that the null hypothesis
30
will also be rejected. Of course, the necessary condition for this is positive quadrant dependence
(PQD),
F(x,y)
as
~
defined
by
Lehmann
(1966).
In
this
situation,
PQD
would
mean
F(x,oo)F(oo,y) for all x, y, where F is the joint distribution of the test statistic for rows
and the test statistic for columns.
This has not been proven.
However, the complete
enumeration mentioned earlier for the :3 x :3 case shows that PQD holds there for both Ehrenberg's
and Friedman's tests. The complete enumeration for the Rank Transform test shows that PQD
also holds for the variance-ratio statistic, at least for tests conducted at the same a-level: that is,
F(x,x)
~
F(x,oo) F(oo,x) for all x. (By symmetry, F(x,oo)
= F(oo,x) for all x).
The values of the correlation for Friedman's test are smaller than the values of the
correlation for Ehrenberg's test, for the same m and n. They both converge to zero as either m or
n or both dimensions are large.
2.5.2 - Under alternative hypotheses
Whether PQD holds under alternative hypotheses is the question that naturally arises
from the remarks above.
Let us first consider the asymptotic case where m is fixed and n-oo.
For the alternatives of "both column and row effects" and "column effects but no row effects", for
Ehrenberg's test and for Friedman's test, since the two test statistics are based on U-statistics
with (1)0, they have a bivariate normal distribution. Therefore, PQD holds. However, for the
alternative of "row effects but no column effects", the limit joint distribution is that of a
degenerate normal variable (for the test for column effects) with a non-degenerate one (for the
test for row effects). This remains to be investigated.
In the next chapter, some information about the joint distribution of the two test
statistics is provided. for moderate-sized layouts. using simulation as a tool.
•
Chapter 3
SIMULATION STUDY
In Chapter 2, the exact expressions for the correlation between the statistics for the test
for column effects and for the test for row effects were obtained under the joint null hypothesis.
In this chapter, the relationship between the two test statistics is studied under alternative
hypotheses, for moderate sized two-way layouts, using Monte Carlo simulation methods.
The
model is assumed to be linear, although, in general, this may not be necessary in the
nonparametric approach.
The goal is to examine how the alternative hypotheses affect the relationship between the
two marginal test statistics.
The specific purpose of this chapter is to obtain two basic facts
about the results from the single marginal tests: first, two-by-two tables showing the agreement
•
•
between the conclusions drawn from the marginal tests, and second, a measure of correlation
between the two test statistics.
Six types of alternatives were selected, resulting from the combination of effects on only
one factor (columns) or on both factors (rows and columns) at once, with three types of effects,
namely, linear, quadratic, and "umbrella"-t,ype effects. The parameters were chosen in a way to
achieve 90% power in the F-test for normally distributed data.
Three factors were taken into account in the Monte Carlo simulation design: The
statistical test to be applied on the data, the probability distribution to generate the data from,
and the size of the two-way layouts.
A general linear model for the data is
1= I, ..., n, j = I,..., m,
where J1. is the overall mean, Bi are the row effects, and ¢J j are the column effects, and
error variables.
€ ij
are lID
32
3.1 Definition of the Alternative Hypotheses
There are two ways of rejecting the joint null hypothesis HJ: by concluding that there
exist either column or row effects, and by concluding that both effects exist. These alternatives
may have different shapes, but we restricted ourselves to three kinds of effects: linear, quadratic,
and "umbrella"-type, that are specified below. The first two alternatives were selected because
they are widely used in parametric linear models theory, therefore furming a basis for comparison
between the parametric and the nonparametric tests under study. The third kind of alternative
was chosen because of its common use in applications.
3.1.1 - Alternatives of Linear and Quadratic Effects.
The existence of linear effects means that the effects fall along a straight line, and the
quadratic effects can be used as an indication of presence of higher order effects in the data. In
this study, the quadratic effects are expected to have an important role when dealing with Cauchy
distributed data.
To avoid redundance in the definition of the effects, they were taken to be orthonormal.
This is a consequence of the fact that if an experiment has m treatment levels, the set of m - 1
orthonormal effects spans all the other effects (Kirk, 1982).
..
These alternatives can be expressed as the special case of (3.1) in which
and
()j
= (i-I)8 RL
¢j
= (j -
I) 8CL
+
+
(i-l)28 RQ , i=I,
,n,
= 1,
, m,
(j - 1)2 8CQ ' j
(3.1.1.1)
•
where 8 RL represents a common parameter for linear effect on rows, 8 RQ represents a common
parameter for quadratic effect on rows, and similarly for the column effects. For example, for the
alternative of a linear effect on the columns only, take bC L
:f:. 0,
and all the other parameters
equal to zero.
3.1.2 - Alternatives of "Umbrella" -type Effects
These alternatives are useful in situations where there are
a control group and the other
111 -
111
treatment levels, one of them
1 representing the treatment groups, and an overall treatment
effect is to be compared to the control. For column effects only, suppose group 1 is the treatment
group, so the effects must satisfy
m
¢1
=I:
,pj
(3.1.2.1)
J =:2
An equivalent expression can be written for the row effects:
11
B1 =
I:
j=2
Bj
(3.1.2.2)
..
33
Using
..
reference cell coding, for instance, for column effects only, the effects defined by
this alternative are added to the observations under the joint null hypothesies denoted by Xo
using the expressions: X i1 =Xo il , X i2 = XO i2
+ l/(m -
2)e5 UG ' i=l,...n; and Xij = XO ij - e5 UG '
i=I,...n, j=3,...,m, where e5 UG is the parameter for the "umbrella"-type effects.
3.1.2 - Parameters for the Alternative Hypotheses
For each of the six alternatives and for the two sizes of· experiments, the parameters were
chosen to obtain an approximate power of 90% in the F-test for column effects or row effects for
normal data, at 0.05 level of significance. All the calculations were done using the SAS macro
POWERLIB.IML (Muller et al. , 1992; SAS, 1990 a).
This macro requires that the data be normally distributed, with mean and variance
corresponding to the parameters associated with the alternative hypotheses. For a fixed level of
significance, given the parameters, the dimensions of the experiments, and
the number of
replicates in each cell, which was 1, this macro program scales the parameters and returns the
power of the F-test to detect the specified alternative.
The values of the parameters e5 obtained are:
•
Alternative
Hypothesis
Parameter
6 x 4 experiment
5 x 5 experiment
Linear effects on columns
3.09/{I4 = .8205
:3.37/flO = .6153
Linear effects on rows
3.77 /..J55"
= .5083
3.37/flO = .6153
Quadratic effects on columns
2.55/{98
.2576
2.84/~354 = .1509
Quadratic effects on rows
:3.15/~919 = .1039
2.84/~:354 = .1509
"Umbrella" effects on columns
1.76/-[6
"Umbrella"
2,43/{:IT = .5:30:3
effects
on
rows
= .7185
2.04/ffi
.5889
2.04/ffi = .5889
3.2 Monte Carlo Study - Simulation design
Monte Carlo was used in this chapter for computational feasibility, which is one of the
assets of this method.
Other assets are convenience, ease, directness and expressiveness (Kalos
and Whitlock, 1986).
The terms Monte Carlo and simulation are used exchangeably in this
chapter, although some authors claim there should be a careful distinction between these two
terms (Kalos and Whitlock, 1986).
Monte Carlo methods may be simply defined as experiments on random numbers.
(Hammersley and Handscomb, 1964). The method used here can be classified as a Monte Carlo
34
probabilistic type, Since it is directly concerned with the behavior and outcome of a random
process, in its simplest form. The original problem is to generate random numbers from different
probability distribution functions, with no restrictions or structures imposed on the data
collection.
It may also be described as a simple random sample of the infinite population of
random numbers with a particular probability distribution. What is being sought is to infer the
behavior of these random numbers.
This original situation corresponds to the situation where the joint null hypothesis is
valid. The linear expression of the model allows the parameters listed above to be added to the
original observations to obtain data under the alternative hypotheses.
3.2.1 - Tests
The four tests previously described in Chapter 1 were applied on the simulated data:
Ehrenberg's test, Friedman's test, the Rank Transform test, and the parametric F-test. The first
two tests are based on average rank correlations; for Ehrenberg's test, Kendall's r was used and
for Friedman's test, a linear combination of Kendall's r and grade correlation was used, as
presented in Chapter 1. The same expressions were used for both the Rank Transform and the Ftest, applying them on the ranks and the original data, respectively.
..
3.2.2 - Probability Distributions
The data were simulated from a standard normal distribution and from a Cauchy
distribution with location parameter 0 and scale parameter 1, using SAS call routines RANNOR
and RANCA U, respectively, based on a Box-l\I uller transformation of data generated from an
uniform distribution with parameters 0 and 1.
It is important to recall that these two sets of
simulated observations correspond to the situation when the joint null hypothesis HJ is true.
The standard normal distribution was taken in order to compare the results from the
nonparametric test against the results from the F-test, since the latter is the uniformly most
powerful test in that situation.
For the Cauchy distribution, with its heavy tails, the
nonparametric tests are known to produce larger power than the F-test (see Hollander and Wolfe,
1973).
3.2.3 - Sizes of the two-way layouts
For small samples, the exact proportion of agreement between the two tests, as well as
their correlation, may be obtained by using a permutation-type test procedure. In this chapter,
two moderate sized experiments, Gx4 and 5x5, are examined; in other words, scenarios where the
35
number of rows and columns are not small enough to be handled in a permutation-test way
.
(except by taking a sample of the permutations), but are not large enough to be considered
asymptotic. Moreover, these situations have numerous practical applications. The case of either a
large number of rows or a large number of columns is treated in the next chapter.
Therefore, four sets of simulated observations were generated, for the standard normal
and for the Cauchy distribution, organized in 6 X 4 and 5 x 5 matrices. Each data set contained
5000 matrices of lID observations. The data sets for the alternatives were constructed from these
four data sets corresponding to the joint null hypothesis, by adding effects as described earlier.
3.3 Some Remarks
The sets of original observations generated correspond to the situation where the joint
null hypothesis is true.
Under this hypothesis, it is expected that 5% of the time the marginal
tests will result in rejection.
At a 5% level of significance, the critical values used for Ehrenberg's test in the 6x4 case
were exact for the test for column effects, and based on the chi-squred approximation for the test
for row effects; in the 5 x 5 case they were also exact (Alvo and Cabilio, 1984). For Friedman's
test, all the critical values used were exact.
.
For the Rank Transform data, the critical values
were empirically determined from the data under the joint null hypothesis; the 95% percentiles
were taken as the critical values.
..
Under the alternative hypotheses, the power of the test is just the proportion of rejections
among the 5000 calculations. All the calculations were done using SAS 6.07 (SAS, 1990 b), and
a sample program is included in the Appendix.
3.4 Results from the simulations
The results from the simulations are shown in Tables 3.1 and Table :3.2. In Table 3.1,
they are first sorted by test procedure, then by size of the experiment, and then by distribution.
For setting a standard for comparison, and also, to check the validity of the test
procedures on the simulated data, the tests were primarily applied to the original simulated data,
when the joint null hYP,othesis HJ is valid. Then, the test procedures were repeated on the data
transformed to each of the six alternatives.
In Table 3.2, the measure of correlat.ion is the Pearson correlation coefficient.
36
Table 3.1 Number of rejections out of 5000 simulated matrices
Test
Ehrenberg
Rows
Cols
Rows
Cols
Rows
Cols
Null
246
:313
231
248
248
253
263
261
C-L
4081
313
4080
248
4505
225
4635
261
C-Q
C-U
B-L
B-Q
B-U
3937
:313
3915
248
4406
237
4572
261
3937
313
3756
248
4290
219
4491
261
4081
:3642
4080
3468
4427
3672
4635
3951
3937
3861
3915
3636
4313
3899
4572
4222
3795
3209·
3756
3032
4162
3861
4491
4440
Null
208
270
204
227
251
251
84
97
C-L
1352
270
1302
227
1720
251
472
97
C-Q
C-U
B-L
B-Q
B-U
1244
270
1195
227
1626
216
441
97
1186
270
1144
227
1513
239
413
97
1352
1086
1302
917
1496
1058
472
320
1244
1165
1195
992
1402
1146
441
347
1186
1042
1144
836
1307
1148
413
377
Null
228
19:3
216
216
238
222
252
237
C-L
3750
19:3
:3831
216
4266
240
4340
237
C-Q
C-U
B-L
B-Q
B-U
:3756
193
:3867
216
4291
244
4401
237
362:3
193
3766
216
4266
219
4527
237
3750
:3738
:3831
3849
4160
4129
4340
4303
:3756
:376:3
:3867
:3848
4209
4238
4401
4415
3623
3612
3766
3727
4192
4157
4527
4491
Null
218
207
2:37
230
261
240
73
96
C-L
1132
207
1176
2:30
1400
206
345
96
C-Q
C-U
B-L
B-Q
B-U
1184
207
1241
2:30
1410
216
345
96
1047
207
1115
2:30
1328
230
349
96
1132
1100
1176
11:31
1207
1187
345
333
1184
1108
1241
1148
1231
1197
345
351
1047
1079
1115
1179
1197
1241
349
385
Dist
Alt
6x4
Norm
5x5
Norm
Cau
where
F-test
Cols
Size
Cau
Rank Trans
Friedman
Norm .. , Normal dist.
C
t.>ffects
011
columns
L ... linear
Cau
13
effects
011
bot.h
Q '" quadratic
... Cauchy dist.r.
columns and rows
lJ ... "umbrella"-type
Rows
.
37
Table 3.2 Pearson's Correlation between the two marginal test statistics
3.2.1 Under the Joint Null Hypothesis
Test
Ehrenberg's
Friedman's
Normal (0,1)
.1948
.2053
.2162
.2144
Cauchy (0,1)
.2092
.2015
.2195
.2098
Normal (0,1)
.2020
.1920
.2000
.2146
Cauchy (0,1)
.2036
.1982
.2145
.2439
Size/Distribution
6x4
5x5
Rank Transform
F-test
3.2.2 Under the alternative of Linear Effects on columns
Test
Size/Distribution
6x4
5x5
..
Ehrenberg's
Friedman's
Normal
.2587
.25.19
.3377
.3651
Cauchy
.1614
.1603
.2260
.2136
Normal
.2127
.2064
.2897
.3017
Cauchy
.1700
.1594
.1973
.2211
Rank Transform
F-test
3.2.3 Under the alternative of Linear Effects on columns and rows
Test
Ehrenberg's
Friedman's
Normal
.:3264
.:3192
.4057
.5006
Cauchy
.2339
.2199
.3407
.4098
Normal
.:3096
.2964
.:3940
.4746
Cauchy
.2404
.22:38
.3176
.3848
Size/Distribution
6x4
5x5
Rank Transform
F-test
3.2.4 Under the alternative of Quadratic Effects on columns
Test
Ehrenberg's
Friedman's
Normal
.2521
.24:34
.3544
.3685
Cauchy
.1572
.1577
.2328
.2176
Normal
.2111
.2049
.3058
.3046
Cauchy
.1677
.1591
.2001
.2165
Size/Distribution
6x4
5x5
Rank Transform
F-test
38
3.2.5 Under the alternative of Quadratic Effects on columns and rows
Test
Ehrenberg's
Friedman's
Normal
.3022
.2911
.4143
.5102
Cauchy
.2207
.2130
.3386
.4231
5x5 Normal
.3060
.2981
.3994
.4782
Cauchy
.2337
.2191
.3235
.3866
Size/Distribution
6x4
Rank Transform
F-test
•
3.2.6 Under the alternative of "Umbrella"-type Effects on columns
Test
Ehrenberg's
Friedman's
Normal
.2514
.2429
.3667
.3652
Cauchy
.1425
.1417
.2411
.2040
Normal
.2206
.2086
.:3442
.3039
Cauchy
.1642
.1596
.2285
.2219
Size/Distribution
6 x4
5x5
Rank Transform
F-test
3.2.7 Under the alternative of "Umbrella"-type Effects on columns and rows
Test
Ehrenberg's
Friedman's
Normal
.3026
.2981
.4971
.53.59
Cauchy
.2039
.1944
.3377
.4017
Normal
.2745
.2711
.420:3
.4723
Cauchy
.2268
.2244
.3248
.4183
Size/Distribution
6x4
5x5
Rank Transform
F-test
"
.
39
3.5 Discussion
3.5.1 - Two-by-two tables
Under the joint null hypothesis, the marginal proportions of rejections are within the
expected 5% range, except for Ehrenberg's test on normal data, for both sizes of experiment; in
the 6 X 4 case, the large number of rejections might be due to the use of an approximate critical
value. For Cauchy data, Friedman's test presented a small proportion of rejections, if compared
to the other three tests and to the results for normal data.
For all alternatives, the power of the F-test was expected to be approximately 90%, or,
the number of rejections to be 4500 with standard error equal to ~ 5000 (.05) 95
= 15, but some
of the observed values were not in the expected range, possibly because of sampling fluctuations.
Also, for all alternatives, for normal data, Ehrenberg's test and Friedman's test
performed equivalently, and the Rank Transform test performed better than either. For Cauchy
data, the nonparametric tests have much larger power than the F-test.
For Cauchy data, for the alternatives of linear effects on the columns, of quadratic effects
on both columns and rows, and for the two "umbrella"-type alternatives, Ehrenberg's and
Friedman's tests perform the same. The Rank transform test has the largest power, while the Ftest presented very low power.
For the alternatives of linear effects on both columns and rows,
and of quadratic effects on columns only, the three non parametric tests performed the same way.
For both normal and Cauchy data, the power for the alternative of quadratic effects on
the columns only is slightly smaller if compared t.o t.he power observed for the test against the
alternative of linear effects on the columns.
When both column and row effects are present, the nonparametric tests based on average
rank correlation remained the same as when there were column effects only, while the Rank
Transform test had a decrease in power. However, the power of the Rank Transform test is still
larger than the power of the first two tests.
3.5.2 - Correlations
The analysis of the correlations between the two marginal test statistics shows that,
consistently, for all four test procedures, for both distributions and for both sizes of experiments,
under the joint null hypothesis, the observed correlations for Ehrenberg's test are close to their
theoretical values, while for Friedman's test they were larger than expected.
For the test of column effects only, the three types of alternatives did not lead to any
40
difference in the correlations.
The correlations are higher with effects on columns only than with no effects, and higher
still with effects on both columns and rows.
Ehrenberg's and Friedman's test present similar correlation results, with values always
smaller than those for the Rank Transform test, which are still smaller than from the F-test.
For normal data, the correlations are higher than for Cauchy data; somewhat higher in
the 6 x 4 case than in the 5 x 5 case.
In summary, these results suggest that under the three alternatives selected, the
correlations between the two marginal test statistics are positive, and larger than under the joint
null hypothesis.
"
..
..
Chapter 4
ASYMPTOTIC DISTIUBUTION OF rrC AND T R UNDER THE JOINT NULL HYPOTHESIS
In this chapter, the asymptotic distributions of the two marginal test statistics are
studied under the joint null hypothesis restricted to when the number of columns is finite and the
number of rows is large.
The marginal distributions already described in the literature are
reproduced here for Ehrenberg's test, Friedman's test and for the Rank Transform test, regarding
the test statistic for the marginal test for column effects. The joint distributions were not found
in the current literature, therefore, some information is to be provided in this chapter, for the
tests based on average rank correlation.
4.1 - Marginal distributions
..
4.1.1 - Asymptotic distribution of U-statistics
The first fundamental result about the asymptotic behavior of U-statistics
•
IS
due to
Hoeffding (1948).
Theorem 4.1.1 - Let Xl'
H"
X n be a random sample of a continuous random variable X, and let
Un be a U-statistic of degree k. If (1 > 0, then as n-oo, the quantity
is asymptotically normal with mean zero and asymptotic variance k(l'
Its multivariate version is presented by Lee (1990):
Theorem 4.1.2 - Let
degree k j .
Xk .+ k
I
-1»'
J
UP), j=l,..., m be U-statistics having expectations Ij and kernels gU) of
I:
X kl ), g(j)(X ki + l , ...,
and denote by Un and I the m-vectors (U~ll), H" U~:n) and ({1,H"'m)' respectively.
Also, let
=
(lTj,j) ,
where lTjj=k j k j Cov (g(i)(x l ,
H"
42
Then, as n-oo,
is asymptotically multivariate normal with mean zero and asymptotic covariance
E.
"
The condition for a U-statistic to have an asymptotic normal distribution is (1 > 0,
which is not satisfied in the cases of Ehrenberg's test and Friedman's test.
The next theorem
presents one way of verifying the asymptotic distribution of the marginal test statistic for
columns, as shown in Quade (1972). A more general proof is presented in Serfling (1980).
Before proceeding to the theorem, some additional notation is necessary. For any vector
of rankings ri = (ril' ..., rim)' of m components, define its inverse as ri = (m + 1- ril'"''
m
+ 1-
(mt
1
mt
1
Denote by ro = ro- the completely tied ranking
,...,
), and denote by
r 1 the vector of natural ranks (1, ..., m). There are f(m) pairs of rankings and their inverses,
denoted by r 1,..., r2/' where ri +/ = ri-' i= 1,...'/. Then, define the symmetric (2f+1)x(2f+l)
matrix
rim)"
r
= (('Yij»'
where 'Yij
=Corr(r"rj)'
Pi = Pr(Y=ri) , P = (PO,P1'" "P2/)',
Also, define the vectors of probability assignment
the diagonal matrix .d = diag (PO,P1" ",P2/)" and the
matrix {} = .d - P p'. Then the following theorem may be stated.
Theorem 4.1.3 - Let Xi , i= 1,..., nand Un be defined as in Theorem 4.1.1. If (1 = 0, then as
n-oo, the quantity
.
(n - I)(U n
-
1')
has asymptotically the same distribution as
00
.L....t\
""
(Zil
-1),
1=1
where the Z's are independent standard normal variables and the A'S are the eigenvalues of
roo
To prove this theorem, Quade showed that the average rank correlation can be written as
a quadratic form in P and 0, and from there, that when n-oo, if (1 >0, then Theorem 4.1.2 can
be reproven, and if (1 = 0, Theorem 4.1.3 holds.
43
4.1.2 - Ehrenberg's test
For the test for column effects, the asymptotic distribution of T C is obtained by applying
Theorem 4.1.3, as proven in Quade (1972) and Alvo and Cabilio (1985):
Theorem 4.1.4 - Under the joint null hypothesis, therefore, under the hypothesis of no column
effects, the eigenvalues of
ro are
2(m + I)(m - 2)!
3
of multiplicity (m - 1), and
2(m-2)! f
l' 1"
(m-I)(m-2)
3
0 mu tip lClty
2
'
so that the distribution of (n - I)(U - ,) is a mixture of chi-squared variables
2(m+I) 2
2
m-l Xm -l +m-l
2
X(m-l)(m-2)
2
-
(3m-I),
and thus,
2
(m -1) (n - 1) U + (3m - 1) is distributed as 2(m+I) X2m -1+ 2 X(m
-1)(m _ 2)
2
For the test for row effects, the test statistic T R
=( m1) . L: ./
2
number of U-statistics based on n rows, with n---.oo.
T ..,
J)
is an average of a finite
)<)
In this set-up, each term of the sum
converges to a normal random variable with mean 0 and variance Var(T I2 )
= 9~'
Therefore, T R
is based on a sum of identically distributed, but non-independent random variables, since a pair
of correlations may have been calculated having one column in common,
The covariance
between two typical terms is
Cov (T 12 ,T I3 ) =
Thus,
(~)2
2
[L:.,si g n(X il - Xii) (X i2 - X i2 )]
~L:"sign(Xil
1<1
1<1
- Xii) (X i3 - X i3 )] =0.
~ 'fI'i T R is asymptotically distributed as a normally distributed variable with mean 0 and
variance 1.
4.1.3 - Friedman's Test
Using the same arguments used in the Ehrenberg's test case, the asymptotic distribution
44
of T C is given by
Theorem 4.1.5 - Under the joint null hypothesis, therefore, under the hypothesis of no column
effects, the eigenvalues of
rn are equal to
m(m - 2)!
of multiplicity (m - 1),
•
and hence the asymptotic distribution of (n - 1)(U -1) is the same as that of a chi-squared
m ~ 1 X~ - I
-
1, which can be reexpressed as
(m-1)[(n-1) U + 1] is X~_I'
For the test for row effects, similarly to what was done for Ehrenberg's test, the
asymptotic distribution of ~ T R is that of a normal distribution with mean 0 and variance 1.
4.2 - Joint Distributions
Let us first establish some notation. For any two columns of observations X j and
Xi' '
1 $ j $ j' $ m, define three terms:
.,
.
=
R ..,
= ~r .."
JJ
and
9n(11 - 1)
2(2n+5) tjj'
T ..,
]}
]}
calculated on two columns of observations j and j', and
m(m -1)
similarly r .., is the sample Spearman's p correlation. Therefore, there are
2
of each of
]]
3m(m-1)
.
these terms, for j <j'. Then, for a fixed m, as n--oo, the
2
varIables have
where t ]..,
is the sample Kendall's
}
T
asymptotically a multivariate normal distribution in which all means are zero and all variances
are 1, and:
(1) Corr(S."
]}
S .11)
= '31 , and Corr(S JJ.."
JJ.
(2) Corr (T ]}
.', RJJ.,)
=
Sill)
J ]
= -~ ;
.J
1, asymptotically;
and all the remaining correlations are null.
Using this notation, for Ehrenberg's test, the test statistic. for column differences is a
..
45
. rlorm
quadratlc
.
In
' bl es,
t hese 3m(m2 - 1) S, T
a nd R
varIa
"LJ. ES
2..,
., JJ
TCJ J
- (n - l)m(m - 1)
and the test statistic for row differences T R is a linear combination of the same variables.
For Friedman's test, the test statistic for column differences is also a quadratic form
proportional to
3E(ES .. ,')2
i
., JJ
TCJ
- (n - l)m(m 2 - 1)
1
n-l
and the test statistic for row differences T R is also a linear combination of the S, T and R
variables.
Therefore, for both tests, the asymptotic joint distribution of the column and of the row
difference test statistics is the joint distribution of a quadratic form in normal variables and a
linear combination of the same normal variables.
..
4.3 - The Rank Transform Test
For this test, the results are listed for the marginal distributions for finite m, and n-oo.
The idea of the rank tranformation is to apply the usual parametric tests on the joint rankings
from 1 to N=mn, instead of on the original data. Iman, Hora and Conover (1984) showed that
asymptotically the marginal test statistic so calculated has the same distribution as for
homoscedastic normally distributed data. The authors presented the null distribution of T C ,
which they denoted by F R' the usual ANOY A statistic for main effects computed on ranks from 1
to N=mn. The results were given for the case where the number of rows n-oo.
A necessary condition was stated first.
Let Xii for i=I,. H' nand j=I,..., m be
independent random variables such that Xii has a continuous distribution Fi(x),
Each of the
theorems requires that for the sequence of within-row distribution functions {Fi(x)}, there exists a
positive constant Ko such that
..
(4.3.1)
1
n
where Hn(x) = IT . E Fi(x) and Xi is a random variable having the distribution function Fi(x).
,= 1
46
The authors stated three theorems, the first stating the conditions under which the ratio
of the variance of the rank sum for the j-th column to the normal theory estimator of error
variance, MSE, converges in probability to a constant. The second showing that the vector of
.
sums of within-row rankings, when normalized, converges in distribution to a normal random
vector.
Only the (m - I)-vector was considered, because the linear dependence of the m-vector
..
leads to a degenerate limiting normal distribution. Finally, the two theorems were combined to
show that the usual F statistic for columns has the same limiting distribution under He when
applied to the ranks of general continuous random variables with cumulative distribution
functions satisfying (4.3.1) as when applied to the homoscedastic normal random variables, as
transcribed below.
Theorem 4.3.1 - Let Xij be Let Xij for i=I,..., nand j=I,..., m be independent random variables
such that Xjj has a continuous distribution Fj(x) satisfying (4.3.1). Then, as n-oo,
In
Tc
=
-
m .L1(R. j
_---:1:...=
-
-
RJ
2
....,..-_ _
·2
(m-I)17f1
converges in distribution to a chi-squared random variable with m - 1 degrees of freedom divided
1
1
N+l
2
m(m - 1)
by m - 1, where R. j n L R ij , and Roo mn L L R ij =
17f1
n
Var R j ,
=
=
:r-'
=
j = 1, ..., m .
.
In the situation studied here. under the joint null hypothesis, the N=mn observations are
independent, and condition (4.3.1) holds, therefore the result from Theorem 4.3.1 may be applied
to determine the marginal distributions of both T C and T R .
4.4.1 - Summary
In summary, under the joint null hypothesis, the asymptotic distribution of the two
marginal test statistics for Ehrenberg's test and for Friedman' test are marginally sums of chisquared variables.
Jointly, they are distributed as the joint distribution of dependent
components: a quadratic form and a linear combination of multivariate normally distributed
variables, with all means equal to O. variances equal to 1, and correlations as described in Section
4.2.
For the Rank Transform test, the marginal distribution of both test statistics is
asymptotically the same as in the case of homoscedastic normal random variables.
.
..
Chapter 5
EXAMPLES
In this chapter, the methods and results presented in the previous chapters are illustrated
by three situations where differences in both column and row effects are of interest.
For each
example, a brief description of the study, followed by the application of the tests to the data, and
a summary of conclusions from the tests is presented.
5.1-Example 1 - Migrant and Seasonal Farmworkers' Health
5.1.1 - Description of the Study
This set of data is part of a larger study on effects of exposure to pesticides on
farmworkers' health, conducted by Ciesielski et aI. (1993). The assessment of human exposure to
pesticides in the fields is usually difficult, firstly because the chemicals can be absorbed by the
body in more than one way, e.g., through the skin, the lungs and the digestive system, and
secondly, due to the large number of other factors that might be present but cannot be controlled.
Hence, a number of surrogate measures is needed to evaluate this exposure.
In this study, health status was measured by level of serum cholinesterase.
The purpose
was to evaluate if under different levels of exposure, depression of cholinesterase levels occurred.
which is not a desirable effect. For this purpose, some 202 farm workers and 42 non-farmworkers
visiting a rural health clinic in North Carolina during the 1990 harvest were observed.
A
common questionnaire was used to obtain personal and health data from both groups; for the
farm workers group, the questionnaire also solicited information about pesticide exposure, crops
picked, hand washing, and use of protective clothing (gloves, shoes, long sleeves).
In this particular example, only the farm workers group will be analyzed. Two exposure
..
variables were chosen to be studied simultaneously: "Type of Crop Picked This Month" and
"Worked Barefoot This Month"; the response variable selected is "Minima of Cholinesterase
Adjusted for Temperature and Hemoglobin". The minima analyzed here are the minimum values
•
observed among the 202 individuals cross-classified by the two exposure variables, and they are
shown in the next 5 x 3 table.
48
Table 5.1 - Example 1 - Original Data- Cholinesterase by Type of Crop and Worked Barefoot.
BAREFOOT
TYPE OF CROP
Always
Sometimes
Never
Tobacco
18.47
18.53
19.96
Cucumbers
22.88
16.65
18.08
Sweet Potatoes
27.08
27.70
11.08
Green Peppers
27.8.5
29.98
27.64
Other
28.14
30.87
22.92
..
5.1.2 - Ehrenberg's and Friedman's Tests
To proceed to the tests described in the previous chapters, the first step is to rank the
observations within-rows for the test for column effects, and to rank the observations withincolumns for the test for row effects, which are given below:
Table 5.2 - Example 1 - Within-Row Ranking
BAREFOOT
TYPE OF CROP
Always
Tobacco
Sometimes
Never
2
3
Cucumbers
3
2
Sweet Potatoes
2
3
Green Peppers
2
3
Other
2
3
Table 5.3 - Example 1- Within-Column Ranking
BAREFOOT
TYPE OF CROP
Always
Tobacco
Sometimes
Never
2
3
Cucumbers
2
Sweet Potatoes
3
3
Green Peppers
4
4
5
Other
5
5
4
2
The next step is to determine the correlations between pairs of rows and the correlations
between pairs of columns, and then average them over the possible number of pairs.
"
•
49
Table 5.4 - Example 1 - Kendall's
row 1
row 1
row 2
1.00
row 3
row 4
row 5
- 0.33
- 0.33
- 0.33
- 0.33
1.00
- 0.33
- 0.33
- 0.33
1.00
1.00
1.00
1.00
1.00
row 2
.
Correlation Between Pairs of Within-Row Rankings
T
row 3
row 4
row 5
1.00
Table 5.5 - Example 1 - Spearman's
row 1
row 1
pCorrelation Between Pairs of Within-Row
row 2
1.00
row 3
row 4
row 5
- 0.50
- 0.50
- 0.50
- 0.50
1.00
- 0.50
- 0.50
- 0..50
1.00
1.00
1.00
1.00
1.00
row 2
row 3
row 4
Rankings
row 5
1.00
Therefore, the average correlations are calculated as
..
average
T
between rows =
average p between rows =
d)
d) (-
0.6669 = 0.0667
0.5)= - 0.05
Then, the p-values associated with these correlations are 0.1975, and 0.5216, for the
average
T
and the average p, respectively. Thus, at a 5% level of significance, it can be concluded
that the hypothesis of no column effects is not rejected, in both cases.
Now, let us proceed to the test for row effects.
Table 5.6 - Example 1 - Kendall's
column 1
•
column 2
column ;3
T
Correlation Between Pairs of Within-Column Rankings
column 1
column 2
column 3
1.00
0.90
0.50
1.00
0.60
1.00
50
Table 5.7 - Example 1 - Spearman's p Correlation Between Pairs of Within-Column Rankings
column 1
column 2
column 3
1.00
0.80
0.20
1.00
0.40
column 1
column 2
column 3
•
.
1.00
Then, the average correlations are calculated as
average
T
between columns
average p between columns
d)
=d)
=
= 0.4667
1.4
2.0
= 0.6667.
Therefore, the p-value associated with the test statistic for Ehrenberg's test is 0.05965,
and the p-value for Friedman's test is 0.02590. So, it can be concluded that the hypothesis of no
row effects is rejected.
In summary, the conclusions drawn from the marginal tests, for both Ehrenberg's and
Friedman's tests are: The data suggest that the factor "Type of Crop" affects the cholinesterase
levels, but the variable "Worked Barefoot" did not present a significant effect.
..
5.1.3 - The Rank Transform Test
=
For this test, the observations are ranked from 1 to N 15, as listed below:
Table 5.8 - Example 1 - Joint Ranking
BAREFOOT
TYPE OF CROP
Always
Sometimes
Never
Tobacco
4
5
6
Cucumbers
7
2
3
Sweet Potatoes
9
11
Green Peppers
12
14
10
Other
13
15
8
.
Now, applying a usual ANOV A based F-test, the results are
51
Table 5.9 - Example 1 - ANOVA on Joint Rankings
Source
..
d.f.
Sum of Squares
Mean Square
F-value
p-value
Type of crop 4
90.00
22.50
1.28
0.3533
Barefoot
2
49.60
24.80
1.41
0.2982
Error
8
140.60
17.55
Total
14
280.00
These results suggest that neither one of the factors considered has significant effects on
the response variable, cholinesterase level.
5.1.4 - F-test
Just for completeness of this discussion, the usual F-test was applied to the original data
in Table 5.1, and the resulting ANOV A is
Table 5.10 - Example 1 - ANOVA on Original Data
Source
d.f.
Type of crop 4
Sum of Squares
Mean Square
F-value
p-value
242.75
60.69
3.14
0.0789
2.10
0.1849
Barefoot
2
81.16
40.58
Error
8
154.61
19.33
Total
14
478.52
The conclusions from this test are the same as for the rank transform test.
5.1.5 - Summary
In summary, both Ehrenberg's and Friedman's tests detected differences among the
groups defined by the factor "Type of Crop", but the Rank Transform test and the F-test did
not. All of the tests concluded for no effects of "Worked Barefoot". Therefore, for Ehrenberg's
test and for Friedman's test, the joint null hypothesis was rejected because one of the marginal
hypotheses was rejected, but although the conclusions for the two marginal tests are opposite, it is
important to remember that the tests are not independent. In other words, the experimentwise
error rate must be considered when drawing conclusions simultaneously, instead of marginal error
rates only. For the Rank Transform test and for the F-test, the joint null hypothesis was rejected
•
because the two marginal hypotheses were rejected.
It was suggested by the results from the
simulation study that the correlation between the two marginal test statistics is positive, which
affects the conclusions from the two tests, since the rejection of one of the marginal hypotheses
might be more likely to occur if the other marginal hypothesis was also rejected.
52
5.2 - Example 2 - Tensile Strength
•
5.2.1 - Description of the Study
This example is quoted from Johnson and Leone, Volume II (1964), p. 92:
Alloys A, B, and C are identical except that a small percentage of an expensive
component has been added in different proportions to alloys Band C to determine
whether this affects the tensile strength of the uncast alloy. Six specimens of each
were prepared by the investment casting method using molds which ranged in
temperature to see if mold temperature affected the tensile strength. The data are
coded.
Table 5.11 - Example 2 - Tensile Strength by Alloy Type and Mold Temperature
ALLOY
MOLD TEMPERATURE
A
B
C
1
170
211
180
2
188
142
162
3
150
110
120
4
18:3
244
216
5
040
085
112
6
196
214
179
..
5.2.2 - Ehrenberg's and Friedman's Tests
For the test for column effects, that is, test for differences between alloy compositions, the
average rank correlations are taken on pairs of within-row rankings, as listed below:
Table 5.12 - Example 2 - Kendall's
row 1
row 1
row 2
row 3
row 4
row 5
row 6
1.00
row 2
T
Correlation Between Pairs of Within-Row Rankings
row:3
row 4
row 5
row 6
- 1.00
- 1.00
1.00
0.:3:3
- 0.33
1.00
1.00
- 1.00
- 0.33
0.33
1.00
- 1.00
- 0.33
0.33
1.00
0.33
- 0.33
1.00
- 1.00
1.00
'
.
\
53
Table 5.13 -Example 2 - Spearman's p Correlation Between Pairs of Within-Row Rankings
row 1
row 1
•
1.00
row 2
row 3
row 4
row 5
row 6
- 1.00
- 1.00
1.00
0.50
- 0.50
1.00
1.00
- 1.00
- 0.50
0.50
1.00
- 1.00
- 0.50
0.50
1.00
0.50
- 0.50
1.00
- 1.00
row 2
row 3
row 4
row 5
row 6
1.00
With these values, the average rank correlations are:
average
i
between pairs of rows
=
average p between pairs of rows =
..
d) (d) (-
3.00)
= - 0.20
3.00) = - 0.20
These values are the minimum values that can be observed in this case, since the average
=-
0.20. Therefore, the p-values associated with these test
correlations are equal to - _1_
n- 1
statistics is 1.00, and the hypothesis that alloy composition has no effect is not rejected.
For the test for differences in temperature effects, the correlations are calculated on pairs
of within-columns rankings, presented in the next two tables.
Table 5.14 - Example 2 - Kendall's
i
Correlation Between Pairs of Within-Column Rankings
column
column 1
1.00
column 2
column 2
column 3
0.60
0.47
1.00
0.87
column :3
1.00
Table 5.15 - Example 2 - Spearman's p Correlation Between Pairs of Within-Column Rankings
column
"
column 1
column 2
...
column 3
1.00
column 2
column 3
0.71
0.54
1.00
0.94
1.00
54
Therefore, the test statistics are given by
between pairs of within-row rankings
= 0.6467
average p between pairs of within-row rankings
0.7300
average
T
With these values, the p-values are, respectively, <0.001 and 0.0052, which lead to the
conclusion of presence of Mold Temperature effects on the data.
5.2.3 - The Rank Transform Test
Using the joint rankings from 1 to N= 18, the ANOVA based test provides the following
results:
Table 5. 16 - Example 2 - ANOVA on Joint Rankings
Source
d.f.
Sum of Squares
Mean Square
F-value
p-value
Alloy
2
2.33
1.15
0.12
0.8850
Temperature
5
387.83
77.57
8.22
0.0026
Error
10
94.33
9.43
Total
17
484.50
From these results, it can be concluded that Temperature has significant effects on
Tensile Strength, while Alloy Composition does not.
5.2.4 - F-test on the original data
Table 5. 17 - Example 2 - ANOVA on Original Data
Source
d.f.
Alloy
2
520.78
260.39
0.35
0.7132
Temperature
5
38041.11
7608.22
10.22
0.0011
Sum of Squares
Error
10
7447.22
Total
17
46009.11
Mean Squares
F-value
p-value
744.72
The conclusions from this test are the same as for the rank transform test.
5.2.5 - Summary
In summary, the conclusions from the four tests agree on a significant effect of Mold
Temperature on Tensile Strength, but no effect of Alloy Composition. These results suggest that
the joint null hypothesis is rejected because of the effect of Mold Temperature on Tensile Strength
only.
In this case. it is important to remember that even if the conclusions from the two
•
55
marginal tests are opposite, the tests are still related.
•
5.3 - Example 3 - Wheat Yield Trial
5.3.1 - Description of the Study
This example is quoted from Petersen (1985), p. 159 :
In the cereal breeding programs of the International Agricultural Research Centers
one method of evaluating promising selections is through the yield nursery
program.
Under this program seeds from a number of selections are sent to
cooperators at national or university research centers throughout the world.
Here
they are grown in a yield trial using a standard experimental design, normally a
randomized block design with four blocks.
At harvest time yield data are
collected, tabulated, and returned to the breeder at the International Center. The
results are then analyzed to select the best varieties for each location and to
measure the adaptability of the selections to a variety of growing conditions. The
results of one such trial grown in Shawbak, Jordan, in 1978 are given in [Table
5.18]. Since the breeder wants to separate the highest yielding selections from the
others, and since there is no underlying relationship or structure connecting the
selections, this is an example of the few situations in which a multiple comparison
•
•
procedure makes sense.
Table 5.18 - Example 3 - Original Data - Yield of Wheat (kg/ha) in Shawbak, Jordan, in 1978.
BLOCK
SELECTION 1
2
3
4
2546
2139
2050
208:3
2
2843
2369
2117
1808
3
:3546
2865
2908
1750
4
2611
2610
2575
1542
5
2792
2209
2000
1892
6
1913
1491
2033
1925
7
1754
1796
1850
1517
8
2315
2.'):37
2158
2375
9
3366
2759
2992
2450
10
2463
2162
1842
2308
11
2352
2148
1950
1917
12
2412
2:310
2150
2250
56
5.3.2 - Ehrenberg's and Friedman's Tests
..
Table 5.19 - Example 3 - Kendall's r Correlation Between Pairs of Within-Row Rankings
rowl
rowl
row2 row3 row4 row5
row6
row7 row8
row9
rowlO
rowll
rowl2
1.00
0.67
0.33
0.67
0.67
-0.66
-0.33
0.33
0.33
0.67
0.67
0.67
1.00
0.67
1.00
1.00
-0.33
0.00
0.00
0.67
0.33
1.00
1.00
1.00
0.67
0.67
0.00
0.33 -0.33
1.00
0.00
0.67
0.67
1.00
1.00
-0.33
0.00
0.00
0.67
0.33
1.00
1.00
1.00
-0.33
0.00
0.00
0.67
0.33
1.00
1.00
0.00 -0.67
0.00 -0.33
-0.33
-0.33
1.00 -0.33
0.33 -0.67
0.00
0.00
row2
row3
row4
row5
row6
1.00
row7
row8
1.00 -0.33
0.00
0.00
0.00
row9
1.00
0.00
0.67
0.67
1.00
0.33
0.33
1.00
1.00
rowlO
row 11
..
1.00
rowl2
..
Table 5.20 - Example 3 - Spearman's p Correlation Between Pairs of Within-Row Rankings
rowl
row2
row3
row4
row5
row6
row7
rowl
row2
row3
row4 fow5
row6
row7
row8
row9
rowlO
rowll
rowl2
1.00
0.80
DAD
0.80
0.80
-0.80 -DAD
DAD
DAD
0.80
0.80
0.80
1.00
0.80
1.00
1.00
-0.60
0.00
0.80
DAD
1.00
1.00
1.00
0.80
0.80
0.00
0040 -0.60
1.00
0.20
0.80
0.80
1.00
1.00
-0.60
0.00
0.00
0.67
0.33
1.00
1.00
1.00
-0.33
0.00
0.00
0.67
0.33
1.00
1.00
0.20 -0.80
0.00 -DAD
-0.60
-0.60
1.00 -DAD
DAD -0.80
0.20
0.20
1.00
0.20
row8
1.00 -0.60
0.20
0.00
0.00
row9
1.00
0.20
0.80
0.80
1.00
DAD
DAD
1.00
1.00
rowlO
rowll
rowl2
1.00
Then, the values of the average rank correlations between pairs of rows are given by:
57
average
T
between within-row rankings
= (1~2) 19.71 = 0.:30
average p between within-row rankings = ( I}) 21.27 = 0.32
The p-values associated with these average rank correlations are, respectively, <0.000 1
and <0.005, which suggests that the hypothesis of no column effects must be rejected.
Table 5.21 - Example 3 - Kendall's
column 1
T
Correlation Between Pairs of Within-Column Rankings
column 1
column 2
column 3
column 4
1.00
0.53
0041
.{j.Ol
1.00
0.70
0.06
1.00
0.12
column 2
column 3
column 4
1.00
Table 5.22 - Example 3 - Spearman's p Correlation Between Pairs of Within-Column Rankings
column
J
column 1
column 2
1.00
column 2
column 3
column 4
0.69
0.55
0.01
1.00
0.83
0.08
1.00
0.09
column :3
column 4
1.00
With the values above, the average rank correlations between columns, for the test for row effects
are calculated as
average
T
between pairs of within-column rankings
=
average p between pairs of within-column rankings =
d)
d)
1.83
= 0.30
2.25 = 0.37
With these observed values. the p-values are <0.01 and <0.025, respectively, which
means that the hypothesis of no row effects must be rejected.
58
5.3.3 - The Rank Transform Test
Table 5.23 - Example 3 - ANaYA on Joint Rankings
Source
d.f.
Selection
11
Block
Sum of Squares
Mean Square
F-value
p-value
43490.00
395.36
4.48
0.0004
3
1953.33
651.11
7.38
0.0006
Error
33
2909.67
88.17
Total
47
9212.00
These values also lead to the conclusion that both hypotheses of no column and of no row
effects must be rejected.
5.3.4 - F- test
Table 5.24 - Example 3 - ANOYA on Original Data
Source
d.f.
Selection
11
4659329.25
Block
3
2133256.92
Error
33
2718159.08
Total
47
9510745.25
Sum of Squares
F-value
p-value
423575.39
5.14
0.0001
711085.64
8.63
0.0002
Mean Square
82368.46
The conclusions from this test are the same as for the Rank Transform test.
5.3.5 - Summary
In this example, the conclusions drawn from the four tests are the same: there exist both
row and column effects, or both Selection and Block effects on Yield of Wheat. It was shown in
the previous chapters that these conclusions are positively correlated, which suggests that the
rejection of one of the marginal hypotheses is more likely to occur if the other marginal
hypothesis is also rejected.
•
•
Chapter 6
SUMMARY AND DISCUSSION
6.1 - Summary
The purpose of this chapter is to summarize the results presented in the previous five
chapters, then discuss some practical implications of the use of these results, and finally list some
suggestions for future research.
In this dissertation, the relationship between the simultaneous test and the marginal tests
for column and for row effects in two-way layouts, restricted to the case of no interaction and one
observation per cell, was described in two aspects.
First, the correlation between the two test
statistics involved in the simultaneous test for column effects and for row effects, and second,
some characterization of the joint null distribution of the two marginal test statistics.
.
The first result is that under the joint null hypothesis, for Ehrenberg's test and for
Friedman's test, the correlation between the two marginal test statistics was found to be positive.
J
It approaches zero, as either the number of columns, or the number of rows, or both are large.
For the Rank Transform test, the sum of squares for columns and the sum of squares for rows are
negatively correlated, because of the restriction that the sums of squares have to add up to a fixed
number, the total sum of squares.
was found to be positive in the :3 x
However, the correlation between the variance-ratio statistics
:~
design, and so it might be in larger designs.
Under the joint null hypothesis, in the :3 x:3 case, using complete enumeration, positive
quadrant dependence between the two marginal test statistics was shown to be valid.
However,
this property is still to be studied for a general n x m case.
Under the alternative hypotheses of linear, quadratic or "umbrella"-type effects selected
to be used in this dissertation, for moderate-sized designs, the correlations determined by
simulation were even larger than under the joint null hypothesis.
These results are interesting, since what is done in practice
IS
to test the marginal
hypotheses separately, and then infer about the joint null hypothesis, which would be totally
correct if the tests were based on independent test statistics.
This is not the case here: the test
statistics are correlated, and t.his fact should be taken into consideration when drawing
60
conclusions from the tests.
A discussion about the implications and interpretations of the test
results is presented in the next section.
"
The asymptotic null distributions of the marginal test statistics are listed in Chapter 4.
The marginal null distributions for Ehrenberg' test and for Friedman's test was worked out using
average rank correlation and V-statistics theories, while for the Rank Transform test, the
approach available in the literature is the one that leads to results similar to the results for the
usual F-test. The marginal null distributions for the first two tests are a mixture of chi-squared
and a chi-squared, respectively, and the joint distribution is the distribution of dependent
quadratic forms and linear combinations of the same multivariate normal variables.
For the
Rank Transform test, the marginal distribution of both test statistics is asymptotically the same
as in the case of homoscedatic normal random variables.
The three examples presented the procedure used in practice to analyze layouts with two
factors of interest, and they illustrate the need to discuss the consequences of the testing the
marginal hypotheses separately and then conclude for the simultaneous hypothesis.
6.2 - Discussion
The question to be discussed in this section is how the results listed above may affect the
analysis, interpretations and conclusions from simultaneous tests based only on marginal tests. In
other words, if experiment wise error is defined as "at least one error: rejecting a true hypothesis
and/or accepting a false one", how is it affected by the dependence between the two marginal test
statistics.
First of all, the positive quadrant dependence in the :3 x:3 case, and the positive
correlation between the two marginal test statistics suggests that: when one of the marginals
hypothesis is rejected, the other is more likely to be rejected; also, when one of the hypothesis is
not rejected, the other is more likely not to be rejected; and, when one of the hypothesis is not
rejected, the other is
less likely to be rejected.
[n consequence, the fact that the statistics are
positively correlated affects the conclusions from the simultaneous test.
For illustrative purposes, assume that under independence of the marginal tests, the error
levels are fixed at 0'=0.05 and 13=0.10. Then,
P(at least one error when HJ is true) = 1 - (I - 0)2 =0.0975.
P( at least one error when only one hypothesis is true) = 1 - (I - 0)( 1 - jJ) = 0.145
P(at least one error when both are false) = 1- (I -/3)2=0.19.
In terms of experimentwise error, the error levels under positive correlation, if compared
"
61
to the error levels under independence, may be described as follows.
..
.
(i) When the joint null hypothesis is true, or, both marginal hypotheses are true, an error occurs
when at least one of the marginal hypotheses is rejected.
Then, under dependence,
the
experiment error is less likely to occur than under independence. In the example, the experiment
error level would be smaller than 0.0975;
(ii) When the joint null hypothesis is false because one of the single hypotheses is false,
experimentwise error is more likely to occur under dependence than under independence. In the
illustration, this would be larger than 0.145;
(iii)
When the joint null hypothesis is false
because both single hypotheses are false,
experimentwise error is less likely to occur under dependence than under independence.
This
would be smaller than 0.19.
In summary, the positive correlation between the two marginal test statistics under the
joint null hypothesis, the positive quadrant dependence shown in the :3 x a case, and the positive
correlation under alternative hypotheses found in the simulation study, imply that the conclusions
for simultaneous tests based only on marginal tests must be carefully addressed.
suggest
that
the dependence between
the
two marginal
test statistics will
These results
reduce the
experiment wise error level when the marginal hypotheses are either both true or both false.
,
6.3 - Suggestions for Future Research
During the course of the present dissertation, some other questions were suggested to be
of further interest:
1 - Determine the exact expression for the asymptotic joint distribution of the marginal test
statistics, when one of the dimensions is finite, but the other is large, both under the joint null
hypothesis and the alternative of "row effects but no column effects". by extending the theory for
the simultaneous distribution of two U-statistics to the case where one variable is degenerate and
the other is not;
2- Verify whether positive quadrant dependence holds in general n x m cases;
3- Do more simulations of moderate-sized designs, using other probability distributions to
generate the data, and also other data structures;
4- Use simulation to study if the presence of interaction would affect the results here presented;
5- Develop an analysis of the Rank Transform Test using the same arguments used for the tests
based on average rank correlations, which would be a different approach to the adaptation of the
classical F-test setup adopted in the current literature.
REFERENCES
Alvo, M. and Cabilio, P. (1984). A comparison of approximations to the distribution of average
Kendall tau.
Communications in Statistics, Part A - Theory and Methods 13, 3191-3216.
Alvo, M. and Cabilio, P. (1985).
Average rank correlation statistics in the presence of ties.
Communications in Statistics, Part A - Theory and Methods 14, 2095-2108.
Beckenbach, R.F. (Ed.)(1964). Applied Combinatorial Mathematics. Wiley, New York.
Bickel, P.J. and Doksum, K.A. (1977).
.~[athematical
Statistics.
Basic Ideas and Selected
Topics. Holden-Day, Oakland.
Ciesielsky, 5.,
Mims, S.R., Loomis, D.P.
cholinesterase depression,
and Auer, A. (1993).
and symptoms among
North
Pesticide exposure,
Carolina migrant
workers.
American Journal of Public Health. (In press).
Conover, W.J. and Iman, R.L. (1976).
analysis of experimental designs.
On some alternative procedures using ranks for the
Communications in Statistics, Part A - Theory and
Methods 14, 1349-1368.
Conover, W.J. and Iman, R.L. (1981).
Rank transformations as a bridge between parametric
and non parametric statistics. The American StatistlClan :35, 124-133.
Ehrenberg, A.S.C. (1952). On sampling from a population of rankers. Biometrika 39, 82-87.
Feller, W. (1968). A n Introduction to Probability Theory and Its Applications, Volume 1. Third
edition. Wiley, New York.
•
63
Friedman, M. (1937). The use of ranks to avoid the assumption of normality in the analysis of
variance. Journal of the A merican Statistical Association 32, 71-75.
•
Hammersley, J.M and Handscomb, D.C. (1964). Monte Carlo Methods. Wiley, New York.
Harter, H.L. (1980). in Handbook of Statistics, VoU, P.R. Krishnaiah, ed. North-Holland,
Amsterdam.
Hochberg, Y. and Tamhane, A.C. (1987).
Hoeffding, W. (1948).
Multiple comparison procedures. Wiley, New York.
A class of asymptotically distribution-free normal distribution.
Annals
of Mathematical Statistics 19, 293-325.
Hollander, M. and Wolfe, D.A. (1973). Nonparametric Statistical Methods. Wiley, New York.
Iman, R.L. (1974).
A power study of a rank transform for the two-way classification model
when interaction may be present. Canadian Journal of Statistics 2, 227-239.
,
Iman, R.L., Hora, S.C. and Conover, W.J. (1984). Comparison of asymptotically distributionfree procedures for the analysis of complete blocks.
Journal of the A merican Statistical
Association 79, 674-685.
Jensen, D.R. (1971) A note on positive dependence and the structure of bivariate distributions.
SIAM Journal of Applied Mathematics 4, 749-7.'):3.
Johnson, R.E. (1983). A comparison of error probabilities for two standard analyses of variance
in unbalanced two-way designs.
Department of Biostatistics,
Institute of Statistics Mimeo Series No.
1447.
University of North Carolina at Chapel Hill,
Ph.D.
Dissertation.
Johnson, N.L. and Leone, F .C. (1964) . .')'tatislics and E1:perzmental Design in Engineering and
•
.
the Physical Sciences, Volume II. Wiley, New York .
Kalos, M.H. and Whitlock. P.A. (1986). Monte Carlo Methods. Volume I - Basics. Wiley, New
York.
64
Kendall, M.G. and Smith, B.B. (1939). The problem of m rankings. Annals of Mathematical
Statistics 10, 275-287.
Kimball, A.W. (1951).
On dependent tests of significance
In
the analysis of variance.
The
A nnals of Mathematical Statistics 22, 600-602.
Kirk, R.E. (1982).
Experimental Design: Procedures for the Behavioral Sciences. Second
Edition. Brooks/Cole, Belmont.
Lee, A. (1990). U-statistics: Theory and practice. Marcel Dekker, New York.
Lehmann, E.L. (1966). Some concepts of dependence.
Annals of Mathematical Statistics 37,
1137-1153.
Miller, R.G., Jr. (1981).
Simultaneous statistical inference.
Second edition. Springer-Verlag,
New York.
Muller, K.E., LaVange, L.M. , Ramey, S.L. and Ramey, C.T. (1992). Power Calculations for
General Linear Multivariate Models Including Repeated Measures Applications. Journal of
the A merican Statistical Association 87, 1209-1226.
Neter, J., Wasserman,W. and Kutner, M.H. (1985). Applied Linear Statistical Models. Second
edition. Irwin, Homewood.
Odeh, R.E. (1977). Extended tables of the distribution of Friedman's S-statistic in the two-way
layout. Communications in Statistics - Simulation and Computation 6, 49-61.
Olkin, I. (1971).
Monotonicity properties of Dirichlet integrals with applications to the
multinomial distribution and the ANOV A test. Technical Report No. 137, Departments of
Operational Research and Statistics, Stanford University.
Owen, D. B. (1962). Handbook of Statistical Tables. Addison-Wesley, Reading, Massachussets.
Petersen, R.G. (19S.5). Design and Analysis of Experiments. Marcel Dekker, New York.
l
65
Quade, D. (1972). Average Internal Rank Correlation. Report SW 16/72, Mathematical Center,
Amsterdam.
Quade, D. (1984).
Nonparametric inference in two-way layouts. In Handbook of Statistics,
Volume 4, P.R. Krishnaiah and P.K. Sen, editors, Elsevier Science Publishers, New York.
SAS Institute Inc.,
(1990a).
SASjIML. Software: Usage and Reference,
Version 6, First
Edition. SAS Institute, Cary.
SAS Institute Inc.,
(1990b).
SAS Language: Reference,
Version 6, First Edition. SAS
Institute, Cary.
Schaffer, J.P. (1988).
Simultaneous testing. In Kotz, S. and Johnson, N.L. (Editors-in-chief).
Encyclopedia of Statistical Sciences, Volume 8, 484-490.
Serfling, R.J. (1980). Approximation Theorems of Mathematical Statistics. Wiley, New York.
•
j
APPENDIX
COMPUTER PROGRAMS
A 1.1 - Program to determine the joint null distribution of the two marginal tests statistics for
Ehrenberg's test, Friedman's test, the Rank Transform test and the F-test, in the 3 x 3 case.
DATA PERMUTE;
ARRAY C(9) CI-C9; N=8;
ARRAY Z(3,3) CI-C9;
ARRAY RR(3,3) RRI-RR9;
ARRAY CR(3,3) CRI-CR9;
DO 1=1 TO 9; C(I)=I;END;
COMPUTE: IF C3< C6 AND C7 <C8 THEN DO;
,
DO 1=1 TO 3;
LO=MIN(Z(I, 1),Z(I,2),Z( 1,3));
HI=MAX(Z(I, 1),Z(I,2),Z(I,3));
DO J=1 TO 3; Q=Z(I,J); RR(I,J)=2;
IF Q= LO THEN RR(I,J) =1;
IF Q= HI THEN RR(I,J) =;3; END; END;
DO J=1 TO 3;
LO=MIN(Z( I,J),Z(2,J),Z(3,J));
HI=MAX(Z( I,J),Z(2,J ),Z(3,J));
DO 1=1 TO 3;
IF Q= LO THEN CR(I,J)= 1;
IF Q= HI THEN CR(I,J)= 3;
END; END;
FR=(CR1+CR2+CR3)**2+(CR4+CR5+CR6)**2+(CR7+CR8+CR9)**2 - 108;
FC=(RRl+RR4+RR7)**2+(RR2+RR5+RR8)**2+(RR3+RR6+RR9)**2 - 108;
KR=O; KC=O;
DO 1= 1 TO 2; DO II=(I+l) TO :3;
.
..
67
DO J= 1 TO 2; DO JJ=(J+l) TO :3;
KC + SIGN «Z(I,J)-Z(I,JJ)) * (Z(II,J )-Z(II,J .1)));
KR + SIGN «Z(I,J)-Z(II,J)) * (Z(I,JJ)-Z(II,JJ)));
END; ENDj END; ENDj
SR=(Cl+C2+C3)**2 + (C4+C5+C6)**2 + (C7+CS+C9)**2 - 675j
SC=(Cl+C4+C7)**2 + (C2+C5+CS)**2 + (C3+C6+C9)**2 - 675;
SI= ISO - SC -SRi IF SI >0 THEN DO;
VR = 2*SR/Slj VC = 2*SC/Slj END;
OUTPUT;
KEEP KR KC FR SR SC SI VC VR ;
END;
R = C(N);
K = N-l;
ONE: L=C(K);
IF L > RTHEN DO;
IF K= 1 THEN GO TO OUT;
K= K-l; R= L; GO TO ONE; END;
DO 1= N TO K BY -1;
•
X= C(I);
IF X >L THEN GO TO TWO;
END;
TWO: C(K)= X;
C(I) = L;
DO 1= (K+l) TO INT«N+K)/2);
M = N+ 1- I
+
K;
X= C(M);
C(I) = X; END; GOTO COMPUTE;
OUT; STOP;
LABEL FC = "3 * FRIEDMAN'S CHI-SQUARED FOR COLUMNS";
LABEL FR = "3 * FRIEDMAN'S CHI-SQUARED FOR ROWS";
LABEL SR = "3 * RT ANOVA SS FOR ROWS";
•
LABEL SC = "3 * RT ANOVA SS FOR COLUMNS";
LABEL SR = "3 * RT ANOV A SS FOR INTERACTION (ERROR)";
LABEL VR = "RT VARIANCE RATIO FOR ROWS";
LABEL VC = "RT VARIANCE RATIO FOR COLUMNS";
LABEL KC = "9 * AVE TAU BETW COLS (TESTS ROWS)";
68
LABEL KR = "9 * AVE TAU BETW ROWS (TESTS COLS)"j
PROC UNIVARIATE FREQ VARDEF=N; VAR FC FR KC SC SI VCj
PROC CORR;
VAR FC FR KC SC SI VC;
WITH _NUMERIC_;
...
PROC FREQ; TABLES FR*FC SR*SC KR*KC FR*FC /NOROW NOCOL;
*********************************************************************************;
•
•
69
A 1.2 - SAS 6.07 Program to determine all the permutations of integers from 1 to 8,
using the Adjacent Mark Method (Beckenbach, 1964).
* First permutation set, numbers in natural sequence, 1 to 9 *;
data zero;
array c(9) cl-c9;
do i= 1 to 9j c(i)=i; end;
*------------------------------------------------------------------------------------------------------*;
*
Generating all the possible permutations of numbers from
1 to n - 1=8, fixing c9=9, using Adjacent Mark Method *;
*------------------------------------------------------------------------------------------------------*;
data onej
n=8;
array c(9) cl-c9j
array delta(7) deltal-delta7;
array eps(7) epsl-eps7j
array alpha(7) alphal-alpha7j
•
)
do i= 1 to 9; c(i)=ij end;
do i=1 to (n - 1);
delta(i)=Oj
eps(i)=I;
alpha(i)=l+i;
end;
do i=1 to n - 1;
three: k=n - Ij
four:
alpha(k)=alpha(k) - eps(k);
sdelta=Oj
•
do m=( l+k) to (n - I);
sdelta= sdelta+delta(m);
end;
if alpha(k) =( l+k) or alpha(k)=O t.hen goto ten;
q=alpha(k) + sdelta;
70
qq=q+1;
x=c(q);
..
c(q)=c(qq)j
c(qq)=x;
output;
goto three;
ten: eps(k) = ( - 1)
* eps(k);
delta(k)= 1 - delta(k);
k=k-i;
if k =0 then stop; else goto four;
end;
*--------------------------------------------------------------------------------------------------------*;
f
© Copyright 2025 Paperzz