This work was supported by National Institutes of Health,
Institute of General Medical Science Grant No. GM-12868-04
and GM 13625
A PROGRAM FOR THE
ANALYSIS OF CATEGORICAL DATA BY LINEAR MODELS
by
Ronald N. Forthofer*, C. Frank Starmer**,
and James E. Grizzle*
*Department of Biostatistics
**Department of Biomathematics
University of North Carolina
Institute of Statistics Mimeo Series No. 604
January 1969
ERRATA
Page 18
Example 2
The alternative test to Cochran's test is presented in example 5 beginning
on page 43.
The test shown here is that of no interaction between the responses
to the three drugs.
The data are from 46 subjects, not 42, and Table 4, not Table 3, is the
table containing the data for this example.
Page 27
The fourth line should begin:
Page 43
Example 5
The data are from 46 subjects, not 42, and this example is using the data
from Table 4, not Table 3.
Page 44
The table is Table 4, not Table 3.
TABLE OF CONTENTS
Page
INTRODUCTION . . .
1
SECTION I:
9
USE OF CATLIN.
SECTION II:
EXAMPLES OF CATLIN.
SECTION III:
USE OF LINCAT.
SECTION IV:
SECTION V:
EXAMPLES OF LINCAT.
ORDER OF CARDS .
SECTION VI:
SUMMARY
SECTION VII:
SECTION VIII:
REFERENCES . .
DESCRIPTION OF THE OUTPUT.
DISCLAIMER.
15
31
36
48
49
55
60
61
A PROGRAM FOR THE
I
ANALYSIS OF CATEGORICAL DATA BY LINEAR MODELS
Ronald N. Forthofer, C. Frank Starmer,
and James E. Grizzle
INTRODUCTION
Berkson has pointed out in [1968] and on several other occasions
2
that the minimum logit X gives, for all practical purposes, numerically
the same estimates and test statistics as maximum likelihood and Pearson's
2
X for a variety of problems.
There seems to be no Widespread realiza-
2
tion that the minimum logit X is only one member of a family whose test
2
statistics have, in large samples, the X -distribution if the null hypothesis is true, and that exploiting this fact leads to a unified approach
both conceptually and computationally, for analyzing categorical data.
The computing aspects of the analysis of categorical data have been
oriented to the desk calculator which tends to keep powerful general approaches from emerging, even though they have been available for some
time.
The general approach has the advantages of giving the analyst more
latitude in choosing models and testing hypotheses which are precisely
tailored to specific data, and of making it possible to have computer
programs for the analysis of categorical data comparable in generality
to those developed at many places for the analysis of linear models.
The purpose of this paper is to present a general approach to the analysis of categorical data and to illustrate its use by examining some
lThis program is written in Fortran IV, level H for the IBM 360/75.
2
special cases.
These methods represent an alternative set of procedures
to those of Lewis [1968] which are based on maximum likelihood estimation.
The theoretical justification for the method presented can be found
in Wald [1943] and Neyman [1949].
The equivalence of these two approaches
for the class of problems we shall consider was demonstrated by Bhapkar in
[1966].
Notation
To fix ideas, consider the hypothetical data shown in Table 1 and
the expected cell probabilities shown in Table 2.
Table 1
F reQuency D'l.strl.'b utl.on
Populations
(Factors)
Categories of Response
1
2
r
· ..
n
1
n
2
n
·
·
·
·
·
·
s
n
n
ll
Zl
·
sl
n
2l
ZZ
·
·
s2
·..
· ..
· ..
·..
· ..
· ..
n
n
Total
lr
nl.
Zr
n Z•
·
·
·
·
·
tl
n
·
sr
s.
Table Z
Expec t e d Ce 11 P ro b a bil't'
l. l.es
Populations
(Factors)
Categories of Response
1
Z
r
1
TIll
TI lZ
Z
TI
TI
·
··
·
TI
TI
·
·
S
Zl
·
sl
ZZ
·
·
sZ
· ..
· ..
·..
· ..
·..
·..
· ..
TI
lr
TI
Zr
·
·
Total
1
1
·
·
·
·
TI
1
sr
I
I
-.
I
I
I
I
I
I
eI
I
I
I
I
I
I
I
-.
I
3
Define
.In.L ,
n.
q
p~
1
=
lxr
,£
,
lxrs
(n
il
,n.
12
, ...
,TI.
1r
),
(11' ,11', ... ,11'),
-1 -2
-s
(P·1,P·2'···'P.
1
1
1r ),
( '£1" ,,£
2
, ... ,,£ ')
s
-11
= -n1
11
i2
(1-11
i2
-11
) '"
11
i l ir
11
i2 ir
i.
-11
11
.1\
V(,£.1 )
.......
11. (1-11 )
1r
ir
-11 1. 211 1r
.
i1 ir
-i
sample estimate of V(,£ ),
-
(rx r )
A
V(,£)
= block
i
/\
diagonal matrix having V(,£.) on the main
-
(rsxrs)
1
diagonal,
f
(11)
m-
any function of the elements of
IT
that has partial
derivatives up to the second order with respect to
the 11 .. , m = 1, 2, ... , u< (r-l)s;
1J
, f u (11)]
[F(11)]" = [ f (II) , f 2 (IT) ,
l
F ( )] ..
[ f 1(,£) , f (,£) , ... , f u ('£)],
_F' =[ -,£
2
...
H
uxrs
4
S
=E
'"
2 (,E)E '
uxu
Notice that i f any n
1\
ij
,
= 0, S = ~(,E)E may not be of rank u which
~
we shall require for the development.
If an occasional n
ij
= a we sug-
gest that it be replaced by a small quantity such as 1
r
Estimation and Testing
To summarize, thus far we have defined u parametric, possibly nonlinear, functions of
1\
rr, the [f
m
(,E)}, and their asymptotic covariance
,
matrix E 2 (,E)E .
Assume that
X.(rr) = X§.,
uxl
where
~
is a known design matrix (which is different from the usual design
matrix when more than one function is constructed within each population as
§. is a vector of unknown
parameters.
Several workers have shown that a best asymptotic normal (BAN) estimate of
~
is given by
£,
when b is the vector which minimizes
(F - Xb)'S
-
-1
(F - Xb)
(ixu)(uxu) (ux1)
The minimum value of this form is a test of the fit of the model
a test of the hypothesis
C §.
dXv vxl
F(rr) = X§.;
= a is produced by conventional methods
dxl
of weighted regression, where C is a matrix of arbitrary constants of rank
d < v.
-,
I
I
I
I
I
I
uxv vxl
will be illustrated later) of rank v < u and
I
I
The test statistic for the fit of the model is
_I
I,
I
I
I
I
I
I
-.
I
5
SS[I(II.) = ~1iJ =
b" (X" S
F"
S-l F
(lxu) (liXu) (ux 1)
-1
X)
b
(lxv) (~xv) ~ (vX 1)
2
which has, asymptotically a central X -distribution with u-v degrees of
freedom i f the model fits, where b
the test of the hypothesis
SS[~1i =
~1i =
=
Q(~
-1
!)
-1
~'~
-1
I.
Given the model,
Q is produced by
QJ
which has asymptotically a central X2-distribution with d degrees of freedom if H
o
is true.
In many cases there is only one population and the objective of the
statistical analysis is to study the relationships among several ways of
classification of the sample units.
Many of the tests appropriate to
this problem can be formulated as
F(n)
(uXl )
O.
This fits into the general framework by
setting~
=~
the null matrix.
Thus the test statistic is I,,~-lI, which has asymptotically a central
X2-distribution with u degrees of freedom if H
o
is true.
Special Cases of f(II.)
The form of S depends on H and through H on the function I(II.).
Therefore for each family of functions I (II.) ,
~
will be different. For-
tunately two classes of functions cover most applications discussed in the
literature thus far.
For linear relationships, one can define a family
of functions,
I(II.)
=
A
uxrs
n
rsxl
6
where
a
a
A
=
lll
211
a
a
a
1l2
a
2l2
llr
; a
12l
a
a
l22
. a
a
2lr' 22l 222
a
l2r
22r
;
... ,
a
;
... ,
a
lsI
2sl
a
a
a
ls2
a
2s2
lsr
2sr
I
I
-,
I
I
-<
a
a 1 ; a
a
u r
u2l u22
is of rank u <_ s(r-l); the a
Yij
u2r
;
a
usl
are arbitrary constants.
a
a
us2
usr
For logarithmic
I
I
I
relationships, one can define the family of functions
I (II)
txl
K log
An
txu
e (uxrs)(;sxl)
the a-th element of I(rr) has the form
u
= L:
ay=l
F (n)
where the a
tively.
yij
Here,
and k
CiY
~
_I
k log ( L:
ay
e i,j
are the appropriate elements of
~ and~
is a matrix of arbitrary constants of rank t
~
respecu
~
(r-l)s.
Some care must be exercised to make sure that the H associated with the
functions described above is of full rank (i.e., of rank u for the linear
case and of rank t for the logarithmic case).
The matrix of partials of the first transformation F(rr)
H
ClF
d!!.
=A
-'
I
--
= An
is
I
I
I
I
I
and
I
In the second case
= KD -1
A
I
-,
I
7
and
where A is as defined previously; and
D=
-F-
a'n
o
o
o
a'n
-2L.
o
o
o
where a' represents the y-th row of A.
1
Many hypotheses can be produced as special cases of this formulation when correctly chosen matrices of constants are inserted for
X~
C~
A
and K.
A program has been written to do this analysis and the following is
an explanation of how to use the program.
There are four versions of this program available for use.
These
four versions are the following:
1) CATLIN - in this version of the
program~
the number of populations
(s) multiplied by the number of responses (r) must be less than or equal to
65.
This program is on disk.
la) CATLIN* - this is just a larger version of CATLIN.
r x s must be less than or equal to 150.
This time
An object deck is available for
this program.
2) LINCAT
to a restriction.
this
is~
in a
sense~
a larger version of CATLIN subject
The restriction is that in this
across the populations must be the
same~
i.e.
version~
the functions
8
A=
[A*]
[0 ]
[0 ]
[0 ]
[A*]
[0 ]
[0
[0
[A*]
I
-,
I
In this version, the number of populations (s) multiplied by the
rank of A*(u) must be less than or equal to 65, and the number of responses
(r) must be less than or equal to 65.
I
I
This program is on disk.
2a) LINCAT* - this is a larger version of LINCAT.
This time r has to
be less than or equal to 150, and UXs less than or equal to 150.
deck of this program is available.
I
An object
I
J
I
el
I
I
I
I
I
-,
I
USE OF CATLIN
The cards that are necessary to run the program are the following:
(0) JOB CONTROL CARDS
These are necessary to call and to execute the program.
(I) PARAMETER CARD
This card specifies the problem and the type of analysis
desired.
(II) DATA CARDS (optional)
(III) The A matrix (optional)
(IV) The K matrix (optional)
(V) The X matrix (optional)
(VI) The C matrix (optional)
(VII) A blank card signaling the end of data and a card with a 'I' in
column I and a
'*' in column 2.
More than one problem can be entered at a time.
All that is neces-
sary to do this is to place the cards for sections (I) through (VI) for
one problem behind the cards for sections (I) through (VI) of the preceding problem.
After the last problem t place the cards for section
(VII).
DESCRIPTION OF THE CARDS
(0) JOB CONTROL CARD
There are seven job control cards needed to use this program.
The
first card (the JOB CARD) identifies who is using the program, hence it
10
will be different for each user.
The next six cards call and cause the
program to execute and these cards must be exactly as shown here.
JOB CARD
It must have the following form:
Iljobname b JOB b account code, 'programmer name',REGION=240K b
T=(minutes,seconds),P=nnn
The following is a description of the symbols on the job card:
II
Slashes in columns 1 and 2.
jobname
Start in column 3.
Maximum of 5 alphanumeric
characters and the first must be alpha.
Blank.
JOB
Identifies the card as a job card.
b
Blank.
account code
This contains three levels (source.department.
No blanks
are permitted in this field.
Maximum of 15 characters is permitted for the proThe name must be enclosed in single
quotes and must be in the form:
'last name, first initial b second initial'
If you cannot fit your full name just use the first
15 characters.
,REGION=240K
Must be exactly as shown.
b
Blank.
minutes
T=
(minutes ,seconds)
(,seconds)
I
I
I
I
I
charge-number) separated by periods.
grammer name.
-,
I
b
,'programmer name'
I
I
_I
I
I
I
I
I
I
I
-,
I
11
Parentheses are required only if seconds are
given.
T=l should be sufficient time for most
problems using this program.
,P=nnn
This tells the number of pages of output.
For
most problems P=lOO should be sufficient.
999 is
the maximum number of pages that one can use.
Here are two examples of a job card.
E3~819 10
//EXA~
E
J 415 ,
II 1111J 141516117 18 19 20111 11 ?J 1'115 l' 21 18119 JO J1 niB J4 J5 JliIJI J8 J'J 401" 41 4J 441.5 46 41 481.9 50 \[ 5I15J 54 \556151585' 6016161 W 64165666/681697071 1111l " 15
¥'SI~
JOB UHC.B.S3043,·STOHER,T C',REGIOH=240K T=1,P=100
, 81' 10 II 171[] 1\ 1,
'eI!? I' 191011112131'1151617 18119 JO 31 .311B J4 J5 36IJ7 J8 J'J .0141
4.' 43 ,,145 46 41
"I" 50 515215] \4 55 '6151 58 \9 60161 616.1 "'16\ c; '" "I" "" "Ill
II "
T-~ 0'l
//TEST JOB UNC.B.S3022,·ALEXANDEHDSANDE·,REGIOH=240K T=(,30),P=50
~
415 6 I 819 10 11 1111J 141516117 18 19 101" " 11 1'11516 17 18129 JO J1 311B J' 35 361J7 J8 J<l .0141 42 '3 "1.5.641 481.9 50 51 5115J 'J 55,,61" \8 59 60161" W "'165 6661081'91011 I1IIl 14 7, /6177 ?S N
Note that some of the guidelines here are for convenience, but unless
one is familiar with programming these guidelines should be adhered to.
The remaining six cards must be exactly as shown here.
//JDBlIB DD DSNA"E=UHC.I.r2335.GRIZZlE.CATLIN,DISP=(OlD,P~SS),
//
UHIT=DISK,YOLUM(=SER=UNCll1
//
EXEC PG~t~tDAT
//rT03rOOl DD SYSOUT=A,DCJ=(RECr"=UA,ILKSIZE=133,LRECl=133)
//rT02rOOl DD SYSDUT=B,DCB=(RECr~fB,BlKSIZE=80,LRECL=80)
//rfOlrOOl
DD •
These job control cards are good only at Triangle Universities
Computation Center, Research Triangle Park, North Carolina.
'2]
12
I
(I) PARAMETER CARD
There are nine numbers on this card, and these numbers describe
the problem.
Each number has a five column field and is right justi-
fied in its field.
(FORMAT (1615»
Information Contained
Columns
1 to
5
6 to 10
The number of responses (r).
The number of populations (s).
11 to 15
Rank of the A matrix (u).
16 to 20
This number is one if you wish to use least squares
analysis and zero otherwise (MM).
21 to 25
This number is one if the function f(p) is logarithmic,
and zero if f(p) is linear (ML).
26 to 30
This number is one if the A matrix is the identity
matrix and zero otherwise (IG).
31 to 35
The number of sets of contrasts to be tested by least
squares analysis (NC).
36 to 40
This number is one if the K matrix is the identity
matrix and zero otherwise (IK).
41 to 45
I
This number is one if you wish to reanalyze the data
entered in the preceding problem and zero otherwise (ISW).
(II) DATA CARDS (optional)
These cards contain the actual data.
Each number has a ten column
field, and the number may be punched anywhere in its field as long as the
decimal point is punched.
The data is entered by populations with each
population starting on a new card.
If any element is zero, replace it by
a small number, e.g., l/r, 0.01, etc. depending on the size of the other
-,
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-,
I
13
numbers in the data. (FORMAT (8F10.0».
(III) The A (ux(r*s»
matrix (optional)
If the A matrix is the identity matrix, i.e., the number in columns
26 to 30 of the parameter card is one, skip this section.
Otherwise, the
A matrix is entered by rows with each row starting on a new card.
Each
element of the A matrix has a five column field, and the number may be
anywhere within its field as long as the decimal point is punched.
(FORMAT (16F5.l».
(IV) The K (tXu) matrix (optional)
If f(p) is a linear function, i.e., the number in column 25 of
the parameter card is one, go to (V).
If the function is logarithmic
and the number in column 40 of the parameter card is one, i.e., K is
the identity matrix, go to (V).
If f(p) is logarithmic and K is not the
identity matrix, the rank (t) of K matrix, and the K matrix are entered.
't' is on one card and is right justified in the first five columns of
the card.
(FORMAT (1615».
The next cards contain the K matrix entered
by rows with each row starting on a new card.
Each element has a five
column field and the decimal point must be punched in this field.
(FORMAT (16F5.l».
(V) The X (uxv) matrix (optional)
If the least squares analysis is not desired, i.e., the number in
column 20 of the parameter card is zero, go to VII.
If least squares
analysis is to be used, the rank (v) of the X matrix, and X matrix are
entered.
Thr first card of this section contains v entered in the first
five columns and right justified in this field.
(FORMAT (1615».
14
The next cards contain the X matrix entered by columns with each
column starting on a new card.
Each element has a five column field
and the number may be punched anywhere within its field as long as the
decimal point is punched.
(FORMAT (16F5.l)). If the logarithmic model
is used, X is a (tXv) matrix.
(VI) The C (dxv) matrix (optional)
This set of cards enters the rank (d) of the C matrix and the
C matrix.
There will be as many sets here as was specified in columns
31 to 35 of the parameter card which states the number of sets of contrasts to be tested.
in these columns.
d is entered in columns 1 to 5 and right justified
(FORMAT (1615)).
The next cards contain the C matrix
entered by rows with each row starting on a new card.
Each element has
a five column field and may be punched anywhere in its field as long as
the decimal point is punched.
(VII)
(FORMAT (16F5.l)).
If there are no more problems to analyze, place a blank card here
and a card with a 'I' in column one and an
are more problems, go to (I).
'*' in column two.
If there
I
I
-.
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-.
I
15
EXAMPLES OF CATLIN
Example 1
Bhapkar's [1966] article provides a good test case for CATLIN.
The data is presented in the following table.
TABLE 3
7477 Women Ages 30-39; Unaided Distance Vision
Left eYE
Right eye
Highes t
grade
Second
Igrade
Third
!grade
Lowest
grade
Highest grade
Total
Second grade Third grade
Lowest grade Total
1520
266
124
66
1976
234
1512
432
78
2256
117
362
1772
205
2456
36
82
179
492
789
1907
2222
2507
841
7477
The hypothesis he tests can be formulated in terms of the marginal
probabili ties as
'ITL
'IT
'IT2 •
'IT
.1
.2
'IT 3 . = 'IT .3
'IT
'IT 4 •
this can be wri t ten F (~)
and choose
A'IT
~-
=
.4
0 if we arrange the 'IT .. in a vector
~J
16
0
1
1
1
-1
0
0
0
-1
0
0
0
-1
0
0
0
0
-1
0
0
1
0
1
1
0
-1
0
0
0
-1
0
0
0
0
-1
0
0
0
-1
0
1
1
0
1
0
0
-1
0
0
0
0
-1
0
0
0
-1
0
0
0
-1
1
1
1
0
A
This matrix produces the correct hypothesis but it is singular, due to
the sum of the first two rows being the negative of the sum of the last
two rows.
Therefore the test can be produced by deleting any row of A.
These calculations reduce to
2
where A* is the original A with one row deleted.
The X produced is in-
variant under the choice of a basis of A.
The following paragraphs contain a detailed description of card
preparation for running this example with the program.
(I) PARAMETER CARD
r
= 16
s
=1
u
= 3 as the rank of the A matrix is three.
MM
=
since there are sixteen responses.
since there is one population.
ATI
0 since we are only testing H
o
=
0, the least squares
analysis isn't needed.
ML
=
IG
0 since the F(p) is a linear function.
0 as the A matrix isn't the identity matrix.
NC
=
0 since the least squares analysis isn't used.
IK
=
0 since the K matrix isn't used.
logarithmic function, i.e., ML
ISW
o since
It is used only if F(p) is a
= 1.
there is no data already entered that we wish to reanalyze.
I
I
-,
I
I
I
I
I
I
_I
I
I
I
I
I
I
I
-,
I
17
Each of these numbers has a five column field and must be right
justified in its field.
E.g.,
These number must be in the correct columns because the computer treats
blanks as zeros.
For example, if 1 were punched in column 9 instead of
column 10, the computer would read this as a 10.
(FORMAT (1615».
(I I) DATA CARDS
The data is entered by populations, with each element receiving a
ten column field and the decimal point being punched in the number.
In this example there is one population with sixteen responses.
There-
fore, it takes two cards to enter the population as we can fit only eight
numbers on a card.
(FORMAT (8FlO.0».
I;
1520.
266.
117.
362.
124.
1772.
(III) THE A (ux(r*s»
234.
36.
66.
2~.
1512.
82.
432.
179.
78.
492.
MATRIX
Since the A matrix isn't the identity matrix (IG=O) , the A matrix
is entered by rows with each row starting on a new card.
Each number has
a five column field and the decimal point is punched in the number.
(FORMAT (16F5.l».
'(IV) THE K (tXu) MATRIX
Nothing is entered here as ML
=
0 on the parameter card.
18
(V) THE X 11ATRIX
Nothing is entered here as MM
= 0 on the parameter card.
matrix is only used if least squares analysis is used.
The X
Go to (VII).
(VII) Since there are more problems to analyze, go to (I) for the new
problem.
Example 2
Cochran [1955] discusses another type of problem for which he
developed a test (sometimes called the Q test) by a permutation argument.
An alternative test can be derived by the techniques presented here.
The data on 42 subjects, shown in Table 3, are used as an example.
The subjects were given drugs A, Band C.
Some had a favorable response
to a single drug, some to two and some to all three.
The patterns of
response and the number of subjects showing each pattern are shown in
Table 3.
Table 4
Tabulation of Response to Drugs A, Band C
(1 d eno t es f avora b1e response, 0 d eno t es un f avorab1 e response )
(Pattern of Response)
A
B
Expected Probability
Number
C
1
1
1
6
1
1
0
16
1
'IT2
1
0
1
2
'IT3
0
1
1
2
'IT4
1
0
0
4
'ITs
0
1
0
4
'IT 6
0
0
1
6
'lT
0
0
0
6
Number favorable
2S
T
1
28
T
46
16
2
T
3
'lT
7
'ITS
I
I
-,
I
I
I
I
I
I
_I
I
I
I
I
I
I
I
-,
I
19
A test of interest is that of no interaction (as formulated by
Bartlett [1935] between the responses to the three drugs.
One set of
procedures (considered by Goodman [1963] and Plackett [1963] is based
on
This test fits into the general formulation by choosing
F(n)
K log
An
e --
with A = I and
K
[1
-1
-1
-1
1
1
1
-1].
Hence
and
f (E) = .405;
thus
2
X = .0796,
which has one degree of freedom.
Therefore the hypothesis of no inter-
action is not rejected.
The contrast tested is easily produced by observing that it is
equivalent to the contrast for no three-way interaction among the logarithms of the cell probabilities of a 2
3
factorial experiment.
I
I
20
The following paragraphs contain a detailed description of card
-,
preparation for running this example with the program.
(I) PARAMETER CARD
r = 8 since there are eight responses.
s = 1 since there is one population.
u
MM
8 as the rank of the A matrix is eight.
o
since we are only testing H : K log
o
e
ATI
Q, the least
squares analysis is not needed.
ML
1 since F(p) is a logarithmic function.
IG
1 since the A matrix is the identity matrix.
NC
o since
o since
o as we
IK
ISW
least squares analysis isn't used.
the K matrix isn't the identity matrix.
are not going to reanalyze the data from the previous
problem. (FORMAT (1615».
ITT J
411 6 I 819 10 II 11113 14 II 16111 18 1910[11 22 13 1411516 1118119 30 31 31133 34 3536131 31 39 40141 41 43 44145 46 41 ..149 50 51 511535' \\ \6151 58 ~ 60161 61 63 64165 66 61 68169 10 11 11113 14 1516117 1819 8n
818
0
I
11000
I-I 1 ) 415 6 1 al9 10 II 1111114-15 16111 18 19 111121 111314115161128119 JIl31 31)33
:w 35 31i)31 31 39 40141 4143 «145 46 41 ..149 50 51 51153 54 155&15158 59 60161 61 63 64165 66 61 68169 1011 11113 14 15 161n 1& 19 80 I
(II) DATA CARDS
The data are entered by populations, with each element receiving a
ten column field and the decimal point punched. In this example there
is one population with eight responses so we only need one card to enter
the data. (FORMAT (8F10.0».
(III) THE A MATRIX
Since the A matrix is the identity matrix (IG=l) we don't have to
enter anything here.
(IV) THE K MATRIX
Since we are using a logarithmic function (ML=l) and K is not the
identity matrix (IK=O), the rank of K and the K matrix are entered now.
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-,
I
21
t receives a five column field and is right justified in its field.
(FORNAT (1615».
K is (tXu) and each element of K receives a five column field with
the decimal point punched.
fTT2
415 6 I 819 1011 1211114 151.11118192012112 13 24125 .,.2728
K is entered by rows. (FORMAT (16F5.1) .
129 30 31
311JJ J4 35 Jil37 J8 J9 401414143 44145 46 41 41149 50 515115354 555.1\' \8 59 60161 il 63 "16566 bI 681.9
10
11 11173 " 1\
161"
1
1.0
-1.0 -1.0 -1.0 1.0
1.0
1.0
-1.0
(V) THE X MATRIX
Nothing is entered here since the least squares analysis isn't used.
GO TO (VII).
(VII) Since there are more problems to analyze, go to (I) for the new
problem.
Example 3
When the linear model was introduced, a remark was made that the
matrix X was not always the same as in univariate multiple regression.
As long as a single function is constructed within each of the s populations, the analogy with multiple regression remains unbroken.
However,
when two or more functions are constructed within each population, modifications must be made.
Fortunately, they are rather simple.
We shall use the data presented by Kastenbaum and Lamphiear [1959]
which were recently reanalyzed by Berkson [1968] to illustrate the method.
The approach we shall present supplies a test of interaction which is
equivalent to that of Berkson.
Both Berkson's test and the test we shall
present are tests of the same hypothesis originally treated by Kastenbaum
and Lamphiear, but they differ in the method of estimation used.
The data,
described in Kastenbaum and Lamphiear's paper are shown in Table 5.
18
I'?J
22
Table 5
Data
Litter Size
7
0f
Kastenb aum an d L amp h'l.ear [1959]
Number of Depletions
2+
Total
a
1
Treatment
A
B
8
A
B
9
A
B
10
A
B
11
58
75
19
5
7
74
101
49
58
14
17
10
8
73
83
33
45
18
22
15
10
66
15
39
13
22
15
18
43
79
12
15
17
8
33
28
4
5 :.
A
B
In this case r
11
77
= 3, and s = 10. Both Berkson and Kastenbaum and
Lamphiear have shown that there is no interaction in the sense defined
originally by Roy and Kastenbaum [1956].
An alternative interpretation
of their tests, which leads numerically to the same statistic as calculated by Berkson and to other tests, is the following:
TI
iO
'
TI
il
,
TI
i2
If we define
to be the expected probabilities of observing 0, 1, 2+
depletions respectively, then define
If the logarithmic functions liO and lil can be considered as additive functions of the mean effect, litter size effect and treatment
effect, there is no interaction in the sense of Roy and Kastenbaum.
Then
given the additive model, tests can be made on the treatment and litter
size effects.
To generate these tests we set
I
I
-,
I
I
I
I
I
I
_I
I
I
I
I
I
I
I
-,
I
23
1
1
1
0
0
0
\1
1
-1
1
0
0
0
a
1
1
0
1
0
0
a
140
1
-1
0
1
0
0
a
lSO
1
1
0
0
1
0
160
1
-1
0
0
1
0
170
1
1
0
0
0
1
180
1
-1
0
0
0
1
1
1
-1
-1
-1
-1
\1
1
-1
-1
-1
-1
-1
all
110
lZO
130
190
110 , 0
a
10x6
a
0
10
20
30
40
SO
1
------------------------~-----------------------
111
1
1
1
0
0
0
a
lZl
1
-1
1
0
0
0
a
1
1
0
1
0
0
a
1
-1
0
1
0
0
a
1
1
0
0
1
0
1
-1
0
0
1
0
1
1
0
1
1
-1
0
0
0
1
1
1
-1
-1
-1
-1
1
-1
-1
-1
-1
-1
131
141
lSI
161
171
181
191
110,1
10 x 6
° °
Zl
31
41
Sl
Each non-zero block of X is derived from a reparameterization of
the usual analysis of variance model so that it will be of full rank.
In terms of the general model originally presented
where t is the vector of logarithms of the elements of
and K
~TI
F(~)
=
~t,
with A
I;
J
24
K
20x30
=
000
1 0-1
000
000
1
0-1
o
0
o
o
o
0
1
0-1
0 0
1-1
0
000
o
o
0
0
000
o
o
1-1
0
0
-.
0
000
o 1-1
0
0
The first ten rows of K pertain to the tiO and the second 10 rows
to the til'
Once K and A are specified, it is an easy matter to compute
the asymptotic covariance matrix of the liO and li1'
Next the sample
estimates are substituted for K £ and its covariance matrix, and the remainder of the calculations are identical to weighted multiple regression.
The estimated parameters are
A
]10
= 0.945
]11
= 0.400
A
alO =-0.278
A
a
20
A
a
all =-0.278
A
= 1.415
a
21
0.474
A
30
0.846
a
= 0.195
a
=
3l
= 0.153
A
a
40
A
a
41
= 0.072
A
50
=-0.514
a
51
=-0.401
In considering the analysis of tiO' the estimated parameter a
10
is
the estimated A effect; and its negative is the B effect; the effect of
the first four litter sizes are estimated by a
sixth litter size a
60
20
, a
30
, a
40
, a
SO
and the
, which is not shown, is the negative of the sum
of the aiO's; i = 2,3,4,5.
I
I
I
I
I
I
I
I
_I
I
I
I
I
I
I
I
-.
I
25
The sum of squares of deviation from the model, 3.1269, represents
the test statistic for no interaction; it agrees with the result of
Berkson [1968J who found 3.128.
cept for rounding error.
The two results should be identical ex-
This error sum of squares can be interpreted as
a test for no interaction or it can be interpreted as a test of goodness
of fit of a multivariate additive model in the logarithms having treatments and litter size as its parameters.
If the latter interpretation is
adopted, it is reasonable to proceed to test hypotheses about litter sizes
and treatment.
The test for no effect of treatment on LiO and lil simultaneously
is produced by
c
2x12
2
and yields X
= roo
6.41 with 2 degrees of freedom which is significant at
less than the .05 level.
1
il
l
1 a a a a a a a a a
a a a a a a 1 a a a
To test the effect of litter size on l a n d
iO
simultaneously we choose
c
8X12
2
which yields X
= 75.32
=
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
1
a
a
a
a
a
a
a
a a
1 a
a 1
a a
a a
a a
a a
a a
a a a a
a a a a
a a a a
1 a a a
a a a 1
a a a a
a a a a
a a a a
a
a
a
a
a
1
a
a
a
a
a
a
a 1
a a
a
a
a
a
a
a
a
1
with 8 degrees of freedom.
More specific hypotheses can be tested.
For example, the linear
effect of litter size is easily found under the assumption of equal spacing.
Then we want to test
=a
26
for 1
and 1
simultaneously.
iO
il
substituting for Q'6 we get
-,
Q'6 was estimated by -Q'2-Q'3-Q'4-Q'5;
which simplifies to
-40' -30' -20'
-Q' = O.
345
2
This test is produced by choosing
c
2
which yields X
I
=
0
0
0
0
4
3
2
1
0
0
0
0
0
0
= 67.70 with 2 degrees of freedom.
can be tested for 1 iO and 1 il separately.
and X 2
0
0
0
0
0
4
3
2
n·
The same hypothesis
In this case we get X
respectively, each having one degree of freedom.
= 4.674
2
= 59.17
By
similar argument the test for quadratic effect of litter size is produced
by
c =
2
which yields X
= 5.282
o o
3
4
3
o o o o o
o o o o o o o o
3
4
with two degrees of freedom which does not quite
reach the .05 level.
From this analysis we can infer the following:
the observed proportions Pij' i
and In(p
il
/p
i2
= 1,
... , 10; j
A transformation of
= 0,1,2
by In(p.O/p
~
i2
)
) produces a scale on which an additive model containing the
effects of litter sizes and treatments produce an adequate fit to data as
demonstration by the lack of significant deviation from the model, i.e.,
no interaction.
On this scale treatments A and B are significantly dif-
ferent as are the litter sizes; and the number of depletions varies
linearly as litter size.
I
I
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-,
I
27
It is important to note that the results of tests involving both
liO and lil are invariant in the sense that the same test statistics would
have been produced if liO and lil had been defined as In(TIil/TI
iO
) and
In(TIi]/TIiO ); or in terms of some other linear transformation of K ~ in
which the same vector space is spanned.
The following paragraphs contain a detailed description of card
preparation for running this example with the program.
(I) PARAMETER CARD
r
=
3 since there are three responses.
s = 10 since there are ten populations.
u
=
30 as the rank of the A matrix is thirty.
MM
1 since least squares analysis is desired.
ML
1 since F(p) is a logarithmic function.
IG
1 since the A matrix is the identity matrix.
NC
4 as we wish to test four hypotheses.
IK
ISW
=
0 since the K matrix is not the identity matrix.
0 since we are not analyzing the data from the previous problem.
Each of these numbers has a five column field and must be right justified
(FORMAT (1615».
in its field.
[TTl .15 6 7 819 iO II
3
fTTT 415
10
6 7 sI9 10 Ii
1~113 14 15 16117 IS 1910111 2113 141157617 ls119 30 31 32133 34 353613738 39 40141 .1.3441454647 4814950 51 51153 54 55 56157 5S 59 60161 62 '3 b1jG5;6 67 68169 7071 12173 7' 7576\72
30
Jilij 14 ·1116117
1.
1·
1
U
4
0
0
IS 19 1011111132'1152617 28119 30 3i 32133 34 353613738 39 40141 42 43 441'5 46 47 4s149 50 51511535455 \615/ \S 59 6016i 61636416\ 66 67681697071
The data are entered by populations with each element receiving a ten
column field and the decimal point punched in the number.
In this example
Therefore, each population
fits on one card, and to enter the data thus requires ten cards.
(FORMAT (8F10.0».
0J
niB 74 75 761ii ~
(I I) DATA CARDS
there are ten populations and three responses.
ii: 79
.
1 1 J 4 5 6 1 I 9 10 \I 12 13 Ii 15 15 11 II 19 20 21 22 23 M 25 2i 21 21 29 lO 31
15.0
4.0
ls.O
14. ·0-
fo.o
11.0
13.'
12.0
19.0
17.0
7.0
.5.'
15.'
jl.O
22.0
22.0
15.0
B~I
~.o
I
I
I
I
I
I
I.'
f7~ 0
58.0
of"!. 0
II J5 Ji 31 • J9
5.0
11.0
58.0
49.8
33.0
J2 JJ
I
I
_.e I
11.0
8.'
(III) THE A MATRIX
Since the A matrix is the identity matrix (IG=l) we don't have to
enter anything here.
(IV) THE K MATRIX
Since we are using a logarithmic function (ML=l) and K is not the
identity matrix (IK=O), the rank of K(t) and the K matrix are entered now.
The rank (20) is entered on the first card in columns 4 and 5.
_I
K(txu) is entered by rows with each element receiving a five column
field and the decimal point punched in the number.
It takes two cards to
enter a row as there are 30 elements in a row and we can fit only 16 numbers on a card.
(FORMAT (16F5.l».
The following cards contain the rank of the K matrix and the first
row of the K matrix.
The other rows are entered in a similar fashion.
Notice that since blanks are treated as zeros, we didn't punch the last
27 zeros of the first row.
fTI} 415
6 1 119 10 \I 12113 14 15 1611118 1920[21 222324125 2ti 21 2I129lO 31
J2IJJ 34
J5 J6]J1 • J9 40141 42 43 44145 46 47 48149 50 51 52153 54 55 Sil51 \I 59 IO~I 62 6J 6411115 6/ 68169 1071 11173 74 7576111 78 " 10 I
20
f.O
II
8.0
-1.0
2 3 415 6 7 119 10 \I 1111314 15 16111 18 1920121 222324125262/28129 JO 31
J2IJJ
II 35 Ji13/ • J9 40141 424344145 4i 47 41149 \151 52153545556(57 \I 5'J 1015\ 62 6J 64165 66 6/ 61169 7011 11173 74 7516111 78 79
(V) THE X MATRIX
Since the least squares analysis is being used (MMF1) , the rank (v)
wi
I
I
I
I
I
I
I
-.
I
29
of the X matrix and the X matrix are
entered here. (v), the rank of the
X matrix, is punched in columns 4 and 5. (FORMAT (1615)).
The X matrix is entered by columns with each element haVing a 5column field and the decimal point is punched in the number. Each column
starts on a new card. (FORMAT (16Fs.l)).
The following cards contain v and the first column of the X matrix.
The other columns are entered in the same manner.
1 2 3
of
5 6 7 8 9 10 II 12 1314-15 16 Il IS 197021 ?'! 7] 24 25 26 27
::a
29 30 ]1 321334 3S16 37 38 39 404\ 424344 45 46 47 484950 51 52 53 54 55 S6 57 S8 59 60 61 62 6J 64 6S 66 61 68 i9 10 71 72 13 74 ,'576 7; IF. 79 ~\)
12
L 0
1.0
1.0
1.0
1.0
Lo
0:0
G.O
o~
0.0
0
0.0
0.0 0.0 0.0 0.0
II 1 3 415 6 7 819 10 11 1211J I' 15 161n 18 1920121 2113 24125262728129 JO 31 32133 34 35 lSI37 J8 J9 40141 42434414546 41 48149 50 51 5115354 555615718 59 60161 62 6J 64165 66 67 6*9 10 11 1211l 74 75
761n
;S 79 iO
(VI) THE C(dXv) MATRIX
The rank of the C matrix (d) and the C matrix are now entered. There
are NC sets of these cards.
d is entered in the first five columns of the
card and right justified in its five column field.
(FORMAT (1615)). Then
the C matrix is entered by rows with each element receiving a five column
field and having the decimal point punched.
(FORMAT (16Fs.l)). In this
example there are four different set of C matrices. Each row of the
C matrix has 12 elements. In some cases when a number is zero, we didn't
punch the zero since blanks are treated as zeros.
2
0.0
a.O
OJ
1. 0
~.O
0.0
0.0
0.0- 0.0
0.0
1:0
0.0
0.8
0.0
0:0
3 .15 6 7 819 10 11 Ill!! 14 -I' 161n 18 19 10111212324125162728119303131133 J.4 3536137 J8 39 40141 4243 «145 46 47 48149 50 515215354555015718 59 60161 62 63 6416566 67681697071 1211l 7' 7576171 78 79
'01
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
II
1 3 415 6 7 819 10 11 12113 1'-i5 161n 18 19 20121 2213 14125162728129 JO 31 32133 34 35 J6137 J8 J9 40141 42434414546474814950 51 5115354 555615718 59 60161 62 63 64165 666768169 70
11 niH
74 75
761n
78 79 80
I
I
I
I
30
IT J .1 I
°
o~O
II
0.0
9:. 2.'
4.'
~ 1111119 JO JI 32IJJ
1••
G.'
1 3 .15 , 1 119 10 \I 1111l I. 15 11117 1119 10121 22 23 2./15 26 2111119 JO 31
o.
o.
II
, 1 119 10 \I 11)1l Ii Oil 1'117 I' 19 1il11l 111J 1.115
2
2
•.
•.
•.
•.
0
3•
G.
••
O~
°
j'
JI Jil31 JI J9 401.1 .1 4J ,,1,1 4, ., ""9 !ill II I111J 14 51 IiIII \I 19 60111 til 'l &1161 &; '7
•••
0.0
.~
o.
0;'
o.
3.
4.
/*
after the last C matrix.
121'3" 111'1" Ii 19
~ii]
3.
I" 511\1 52153 I' II \tilll Ii 19 6I~1 til 6J .. 11i6 66 6111169 10 11 12113 "
Since this is the last example for CATLIN, we now put a blank
card and a
161" Ii 19 80 I
4.' 3.' 2.' 1.' :
1 J .1 I , 7 119 10 II 1111l 14 II 16117 18 19 10121 1113 1.125 26 1111119 3D 31 321333. 35 Ji!l1 JIll %1 '1 '3 ,,1,1 " 41 ..
(VII)
G.O
1,1 71 11113 " II
321)) J4 J53613/ JIll 4+1 .24J ,,1'5 ., " ..I" !ill II I111J 14 1156)11 \I 19 601" til 6J ..1M II 1111)69 /0 11
3.
.~
0.0
11169
151611l~
-,
I
I
I
I
I
I
_I
I
I
I
I
I
I
I
-,
I
31
USE OF LINCAT
The cards that are necessary to run the program are the following
(0) JOB CONTROL CARDS
These are necessary to call and to execute the program.
(I) PARAMETER CARD
This card specifies the problem and the type of analysis
desired.
(II) DATA CARDS (optional)
The data is entered by populations.
(III) THE A* MATRIX
(IV) THE K MATRIX (optional)
(V) THE X MATRIX (optional)
(VI) THE C MATRIX (optional)
(VII) A blank card signaling the end of data and a card with a '/ ' in
column I and a
'*'
in column 2.
More than one problem can be entered at a time.
All that is neces-
sary to do this is to place the cards for sections (I) through (VI) for
one problem behind the cards for sections (I) through (VI) of the preceding
problem.
After the last problem, place the cards for section (VII).
DESCRIPTION OF THE CARDS
(0) JOB CONTROL CARD
There are seven job control cards needed to use this program.
The
first card (the JOB CARD) identifies who is using the program, hence it
will be different for each user.
The next six cards call and cause the
program to execute and these cards must be exactly as shown here.
32
JOB CARD
It must have the following form:
Iljobname
b JOB b account code, 'programmer name', REGION=240K b
T=(minutes,seconds),P=nnn
The following is a description of the symbols on the job card:
II
Slashes in columns 1 and 2.
jobname
Start in column 3.
Maximum of 5 alphanumeric
characters and the first must be alpha.
b
Blank.
JOB
Identifies the card as a job card.
b
Blank.
account code
This contains three levels (source.department.
charge-number) separated by periods.
No blanks
are permitted in this field.
,'programmer name'
Maximum of 15 characters is permitted for the programmer name.
The name must be enclosed in single
quotes and must be in the form:
'last name, first initial b second initial'
If you cannot fit your full name just use the first
15 characters.
,REGION-240K
Must be exactly as shown.
b
Blank.
minutes
T=
(minutes ,seconds)
(,seconds)
Parentheses are required only if seconds are
given.
T=l should be sufficient time for most
problems using this program.
I
I
-,
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-,
I
33
,P=nnn
This tells the number of pages of output.
For
most problems P=lOO should be sufficient.
999 is
the maximum number of pages that one can use.
Here are two examples of a job card.
rID 415 6 I 819 10 11 1/11314 15 16111 18 19 :0121 22 13 21115 262/1812930 31 32133 34 3536131 3lll'J 40141 42 4l 44145 " 41 48149 511 51 51153 5' 55 56151 \9 60161 f>7 ~1 "'16;" 61 l>1l169 10 II 111)) 11 1\ ~uJ
//EXAMP JOB UHC ••• S304~,·STOH£R,T C',REGIDH-24Ok Tel.p-tOO
\8
I T 3 415 6 /
/ /TEST
il9~i 15161111819 201211113 241~/6 2/181~ 30 313213334353613/ J8 39 .01.1 '143 441.5.647 4814951151521535'55561515' 5' 601" 61636'1656667 "169 10 II
J[JJ
"IIJ ,:.71 761~
utfC.l. S3022, • ALEXMDEtmSA"DE- , REG IOtf-24 OK T-(, 30hP~O
Note that some of the guidelines here are for convenience, but unless
one is familiar with programming these guidelines should be adhered to.
The remaining six cards must be exactly as shown here.
I 2 3 4 5 6 1 8 9 1011 12
Ill' '15
16 1/ 18 19 20 21 21232' 252627282930 31 3233 34 35 36 3/ 38 l'J 4041 4243 44 45 46 '7 48 49 511 51 52 53 54 55. 5617 58 59 60 61 f>7 6J 64 65666/68 69 /0/1 72 )) I,' 7516 71 7< /9 00
//JOJLIB DD DSttAI£=UHC.I~rem.GRIZZLE.ll~T,DISP=(DLD,PASS),
//
Ut1IT=DISK,YDLUI1E=SER=lmCl11 .
//
EXEC PG"aCATDAT
//fT03fOOl DD SYSOUTgA;DCI=(RECf"=UA,BLKSIZE=133.LRECL=133)
//fT02fOOl DB SVSOUT=I,DCB=(RECf"=FB,IlKSiZE=80,LRECL=80)
//fT01FOOl
DD •
11 2 3 ,15 6 7 8 19 10 11 11113 liC":15--16""11--/:::'18--19'""10""12--11--2723'-""24""125--16'""'2-:-/2'""81--29-30--31--3=*--3--34--35-36"-137-J8-J9-,orI
41-'/-'-3«'1-'5c
•
--46--47:-:,:r814~9::-50-;751--52"'1\:-:357"4::-51::-561rc;,/-;;58:-:5-;;-96O;;;]1-;:-61-;::;62-;63:-:6-;r.416~\ 6-;::-6-;;-677068:);;169;-;/:;;"01~1-;:;721[";;73-:;:";-;7;-;\7:;rol~77-;;"-:;:!iii'J~'o
These job control cards are good only at Triangle Universities
Computation Center, Research Triangle Park, North Carolina.
34
(I) PARAMETER CARD
There are eight numbers on this card and these numbers describe
the problem.
in its field.
Each number has a five column field and is right justified
(FORMAT (1615)).
Columns
1 to
Information Contained
5
6 to 10
The number of responses (r).
The number of populations (s).
11 to 15
Rank of the A* matrix (u).
16 to 20
This number is one if you wish to use least squares
analysis and zero otherwise (MM).
21 to 25
This number is one if the function f(p) is logarithmic,
and zero if f(p) is linear (ML).
26 to 30
The number of sets of contrasts to be tested by least
squares analysis (NC).
31 to 35
This number is one if the K matrix is the identity
matrix and zero otherwise (IK).
36 to 40
This number is one if you wish to reanalyze the data
entered in the preceding problem and zero otherwise
(ISW) •
(II) DATA CARDS (optional)
These cards contain the actual data.
Each number has a ten column
field, and the number may be punched anywhere in its field as long as the
decimal point is punched.
The data is entered by populations with each
population starting on a new card.
If any element is zero, replace it by
a small number, e.g., l/r, 0.01 etc. depending on the size of the other
numbers in the data.
(FORMAT (8FlO.0)).
I
I
-.
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-.
I
35
(III) The A* (uxr) matrix
The A* matrix is entered by rows with each row starting on a new
card.
Each element of the A* matrix has a five column field and the
number may be anywhere within its field as long as the decimal point is
punched.
(FORMAT (16F5.l».
(IV) The K (tx(u*s»
matrix (optional)
If f(p) is a linear function, i.e., the number in column 25 of the
parameter card is one, go to (V).
If the function is logarithmic and
the number in column 40 of the parameter card is one, i.e., K is the
identity matrix, go to (V).
If f(p) is logarithmic and K is not the
identity matrix, the rank (t) of K matrix, and the K matrix are entered.
It'
is on one card and is right justified in the first five columns of
the card.
(FORMAT (1615».
The next cards contain the K matrix entered
by rows with each row starting on a new card.
Each element has a five
column field and the decimal point must be punched in this field.
(FORMAT (16F5.l».
(V) The X «u*s)xv) matrix (optional)
If the least squares analysis is not desired, i.e., the number in
column 20 of the parameter card is zero, go to (VII).
If least squares
analysis is to be used, the rank (v) of the X matrix, and the X matrix
are entered.
The first card of this section contain v entered in the
first five columns and right justified in this field.
(FORMAT (1615».
The next cards contain the X matrix entered by columns with each
column starting on a new card.
Each element has a five column field and
the number may be punched anywhere within its field as long as the decimal point is punched.
(FORMAT (l6F5.l».
If the logarithmic model is
36
used, X is a (txv) matrix.
(VI) The C (dXv) matrix (optional)
This set of cards enters the rank (d) of the C matrix and the C
matrix.
There will be as many sets here as was specified in columns 31
to 35 of the parameter card which states the number of sets of contrasts
to be tested.
these columns.
d is entered in columns 1 to 5 and right justified in
(FORMAT (1615».
The next cards contain the C matrix by
rows with each row starting on a new card.
Each element has a five
column field and may be punched anywhere in its field as long as the
decimal point is punched.
(FORMAT (16F5.l».
(VII) If there are no more problems to analyze, place a blank card here
and a card with a 'I' in column one and an
'*'
in column two.
If there
-.
I
I
I
I
I
I
el
are more problems, go to (I).
EXAMPLES OF LINCAT
Example 4
The analysis of data collected on several populations (groups, factors) has many analogies with the analysis of variance.
can be exploited usefully in many situations.
These analogies
We start with the basic
m~l
I~)=X~
and choose I(£) and X to suit our purpose.
I
I
The data shown in Table 4
will be used to illustrate this method of analysis.
The data in Table 6, which are a tabulation of patients' time to
discharge from three hospitals after surgery, were collected by the
I
I
I
I
I
I
I
-.
I
37
Veterans Administration Cooperative Duodenal Ulcer Study Group.
The
operations are for duodenal ulcer.
Table 6
Days Unti 1 Discharge From Hospital After Surgerv
Hospital 1
Days Until Discharge
o-
A
Surgical Procedure
B
C
D
14
26
31
28
27
15 - 21
7
4
5
7
22 - 28
1
2
1
2
29+
2
2
4
1
36
39
38
42
11.0
10.3
11.6
10.7
Total
Mean
Hosp~ta
1 2
Days Until Discharge
A
Surgical Procedure
B
C
D
0 - 14
25
29
27
29
15 - 21
10
12
5
10
22 - 28
2
2
2
4
29+
5
3
7
2
42
46
41
45
13.5
12.3
13.5
12.2
Total
Mean
Hosp~ta 1 3
Surgical Procedure
Days Until Discharge
A
B
C
D
0 - 14
9
11
17
6
15 - 21
15
12
8
22
22 - 28
3
0
0
3
29+
1
2
1
1
28
25
26
32
12.7
14.3
11.4
17.0
Total
Mean
38
The mean, which is only approximate, is computed by
7 Pil + 18 Pi2 + 25 P + 32 P
and is the f (E) used in the analysis.
i4
i3
7 is the midpoint of
to 14; 18 is the midpoint of 15 to 21; 25 is the
°
midpoint of 22 to 28; 32 is used as the midpoint of the last interval.
In this example s = 12 and r = 4.
The f(p) is constructed by
choosing
7, 18, 25, 32,
0,
0,
0,
0,
0,
7, 18, 25,
0,
0,
0,
0,
0,
0,
0,
°
32
0,
0,
0,
0,
0,
0,
°
°
A
l2x48
0,
0,
°
7, 18, 25, 32
Then set
An
~-
tion in each population, i.e.,
where here A*
[A*]
[0]
[0 ]
[0
[A*]
[0 ]
[0
[0
[A*]
[7, 18, 25, 32].
-.
I
I
I
I
I
I
el
= XS
This example is perfect for the program LINCAT as we have the same func-
A
I
I
I
I
I
I
I
I
I
-.
I
39
X corresponds to an additive model involving hospital and treatment effects
1
1
1
1
1
1
1
1
1
1
1
1
X =
0 1 0 1
0 0 1 0
0 0 0 1
0 -1 -1 -1
1 1 0 0
1 0 1 0
1 0 0 1
1
1
1
1
0
0
0
0
-1
-1
-1
-1
1 -1 -1 -1
-1 1 0 0
-1 0 1 0
-1 0 0 1
-1 -1 -1 -1
and
Here
and
~
is the mean effect; a
1
and a
2
are the differential hospital effect
8 , 8 , 8 , are the differential treatment effects.
123
effect has been omitted in the reparameterization.
A
calculated by -a
l
-a
2
=a
3
.
Its estimate is easily
The fourth treatment effect can be compared
in a similar way.
The estimated parameters are
A
]..l
12.74, a
The third hospital
-0.12, 8
1
l
-0.85.
0.62
40
Using the following C matrices to compute the sums of squares, one can
construct an "Anova" table like the usual one except the sums of squares
are the test statistics.
C Hospital =
C Treatment =
(
(
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
)
)
These yield:
Ana 1 iTS1S
Source of Variation
0
f
Varlance Ta bl e
Sums of Squares
Degrees of Freedom
Hospitals
22.51
2
Treatment
3.32
3
10.88
6
Error
The error term is not significant at the .05 level.
This is inter-
preted to mean that an additive model having only mean, hospital, and
treatment effects fit the data adequately.
The difference among hospitals
is large as is suggested by examining the approximate means.
The following paragraphs contain a detailed description of card
preparation for running this example with the program.
(I) PARAMETER CARD
r
=4
since there are four responses (number of days until dis-
charge.
s
= 12 since there are twelve populations (Hospital 1, Process A
to Hospital 3, Process D.
I
I
-.
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-.
I
41
u
=
MM
1 as the rank of the A* matrix is 1.
1 since we wish to use least squares analysis.
ML = 0 since the f(p) is a linear function.
NC
1K
2 since we wish to test two hypotheses.
=
1SW
0 since the K matrix isn't used here.
0 since there is no data already entered in the preceding
problem to reanalyze.
Each of these numbers has a five column field and each must be
right justified in its field.
fD)
rol21
.15 6 7 819 10 II 12j1314 15 16117 18 19
..
IT 3 .15
12
1
1
22 23
(FORMAT (1615)).
2'1~ 26 17 18129 30 31 31133 ~ 3536137313' 1OI.1 424344145 '6 ., 411.' 50 51 5115354555615768 59 60161 62 63 6416566 61 68169 7011 72113 '4 7576177 " 7980
O· -2
0
6 7 819 10 II 11113 14-15 16117 18 19 10111 11131.125161718119 JI1 31 31133 ~ 35 Jil37 38 3<J .01.1 41 43 44145 46 47 41149 50 51 51153 5' 55 5615/ 58 59 60161 61 63 6416566 61 68169 70 II 71113 14 1516177 78 19 '0
(II) DATA CARDS
The data are now entered by populations, with each population
starting on a new card.
Each element may be anywhere within its ten
columns and must have the decimal point punched.
Note there are two
zeros in the data, and these have been replaced by 0.01.
(FORMAT
(8F10.0)).
Columns
1 to 10
26.0
31.0
28.0
27.0
25.0
29.0
27.0
29.0
9.0
11.0
17.0
6.0
11 to 20
7.0
4.0
5.0
7.0
10.0
12.0
5.0
10.0
15.0
12.0
8.0
22.0
I
-- 0
21 to 30
1.0
2.0
1.0
2.0
2.0
2.0
2.0
4.0
3.0
0.01
0.01
3.0
31 to 40
2.0
2.0
4.0
1.0
5.0
3.0
7.0
2.0
1.0
2.0
1.0
1.0
I
I
I
42
-.
(III) The A* (uxr) matrix
The A* (uxr) matrix is now entered by rows with each row starting
on a new card and each number having five columns.
must be punched.
]
(FORMAT (16F5.l».
18.0 25.0 32.0
1.0
I ,1
The decimal point
4 5 6 7 • 9 10 11 12 13 1."5 16 17 18 192021 22 23 24 2S 26 11 28 29 30 31 32 33 34 3536 37 38 39 4041 dl 43 44 4S 46
~I 4849 !IO 51 52 5] ~4 55 56 5~ 58 59 60 61 62
6J 64 b5 f>ti 61 68 69 IG 11 12 73 74 15/6 i' 78 19 80
(IV) The K matrix
Since we have a linear model (ML
is no
need for a K matrix.
= 0 on the parameter card) there
GO TO (V).
(V) The X «u*s)Xv) matrix
The rank of the X matrix (v) and the X matrix are now entered.
v
=
6~
so in column five a '6' is punched.
(FORMAT (1615».
Then the X
el
matrix is entered by columns with each element having a five column field
and the decimal point punched.
first column are presented.
The cards containing the rank and the
The others are entered in the same manner.
(FORMAT (16F5.l».
[IT 3
415 6 7 819 10 II 111131415 16117 18 19 10111 1113141151617 18119 30 31 3*;
~
3536137 3! 39 40141 41 43 44145 46 47 48149 5051 51153 54 555615758 59 60161 61 63 6416566 61 68169 7071 11173 74 /576111 78 /9 80
I
6
1.0
IT
1.0
1.'
1.'
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
3 415 6 7 819 10 II 11113 Ii 15 16117 18 19 10111 1113141151617181193031 31133 34 3536137 3839 40141 41 43 44145 46 47 48149 50 51 5115354 555615/585960161 61 63 64165 66 67 68169 70 71 11173 /4 7576111 78 /9::ill
(VI) The C (dxv) matrix
Since we wish to test two hypotheses (NC
card)~
there will be two sets of cards here.
=2
on the parameter
Each set contains a card
with the rank of the C matrix and then the cards containing the C matrix
itself.
The rank is entered in the first five columns and is right
I
I
I
I
I
I
I
I
I
I
I
I
I
-.
I
43
(FORMAT (1615».
justified in its field.
each row starting on a new card.
and also has the decimal point.
CCf~. '15
The C matrix is by rows with
Each element has a five column field
(FORMAT (16F5.1».
6 / 819 10 II 1111J 1115161171819101,112 13 1'1151617 28119 30 313213334 353613738 39 .0141 '2 '3 ,,1,1 '6 ,/ ..1'9 10 5152113" 55
161\~.2
63 6416166 67 68169 70 Ii 11173 /. 75761;' ;S 79801
2
0.0
1.0
0.0
8.0
0.0
0.0
1.
o.
o.
1.0
o.
o.
1.
Example 5
The data on 42 subjects, shown in Table 3, are used as an example.
The subjects were given drugs A, Band C.
Some had a favorable response
to a single drug, some to two and some to all three.
The patterns of
response and the number of subjects showing each pattern are shown in
Table 3.
44
Table J
Tabulation of Response to Drugs A, Band C
a d eno t es un f avora bl e response )
Pattern of Response
A
B
Number
Expected Probabili ty
C
(1 deno t es f avora bl e response,
1
1
1
6
'lT
1
1
a
16
'lT
1
a
1
Z
'lT
a
1
1
Z
'IT 4
1
a
a
4
'ITs
a
1
a
4
'IT 6
a
a
1
6
'IT]
a
a
a
6
'ITs
Number favorable
2S
28
16
T
T
l
Z
1
Z
J
46
E(T )
l
E(T )
Z
These data are considered as a single multinomially distributed
sample of 46 in which each sample unit exhibits one of eight patterns of
The hypothesis can be formulated in terms of cell probabil-
i ties as
which simplifies to
-.
I
I
I
I
I
I
_I
T
J
If the three drugs are equally effective
response.
I
I
I
I
I
I
I
I
I
-.
I
45
Then choose
o.
A test of this hypothesis is produced easily by choosing
A
=
[~
1
0 -1
1 -1
0
1
o -1
0
1 -1
~] .
Then
46
1241
.5406
[ -.4101
-.4101]
.5406 •
and
/ . [£1 (p). £2(P)] (AV(p)A,)-l
(:~~~~)
= 6.58
which has a X2-distribution with two degrees of freedom if the null hypothesis is true.
2
Cochran's Q test yields X
these two tests are not known.
= 8.47.
The relative merits of
We introduce the competitor here to show
how the general method can be used to produce tests for a variety of problems which might be considered non-standard.
The following paragraphs contain a detailed description of card
preparation for running this example with the program.
I
I
46
-,
(I) PARAMETER CARD
r
= 8 since there are eight responses.
s
= 1 since there is one population.
u
=
2 as the rank of the A* matrix is two.
MM
=
0 since we are only interested in testing H:
o
o
An
and
this doesn't require the least squares analysis.
ML
o
since f(p) is a linear function.
NC
o
since the least squares analysis isn't used there are no
sets of contrasts to be tested.
1K
0 since the logarithmic model isn't used, there is no need
for the K matrix.
o
1SW
since we are not going to reanalyze the data from the
preceding problem.
Each number has a five column field and is right justified in its
field.
(FORMAT (1615».
I T 3 415 6 7 819 10 11 11113 14 15 16117 18 19 10121 11 13 2411516 17 18119 3Q 31 311333. 35361373839 .01.1 '1 43 «145 '6 .7 '81'9 50 51 51153 5' 5556157 585960161 62 63 6416566 67 68169 7071 71173 74 7576177 76
8
. 1
2
I T 3 .15 6 7 819 10 11
111131~·lflliIiiY
O·
0
O· 0
,~ 80
I
0
191011111131')151617 18119 3Q 313113334 35361373839.01414143 «145 .6474814950 515115354555615758596016161636416566 67 68169 707'!TI73 74 7516177 78
7~
(II) DATA CARDS
The data are entered by populations with each population starting
on a new card.
Each element has a ten column field and has the decimal
point punched.
(FORMAT (8FlO.O».
In this example there is only one
population with eight responses so the data fits on one card.
I T 3 .15 6 7 819 10 11 1111314 15 16117 181910111 1113 1.11516 17 18119 3Q 31 31133 34 3536137 3839 40141 .1 '3 «1.5 46 47 481.9 50 51 5115354 55
6.0
16.0
2.0
2.0
4.0
4.0
561~
58 59 60161 62 63 641656667 68169 70 II 71173 74 1576177 " 7980
6.0
6.0
I
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-,
I
47
(III) The A* (uxr) matrix
The A* matrix is entered by rows with each row beginning on a new
card.
point.
D::::f>
Each element has a five column field and must have the decimal
(FORMAT (16F5 .1» .
115 6 7 819 10 11 11113 1415 16117 18 19 10111 111311125 16 17 18119 30 31 32133 31 3S 3613738 3'110111 1113 .. liS 16 47 18llnO II 11153 illS 16117 1119 60161 61 63 64161 Ii 61 68169 10 II 71173 " 11 16111 Ii
l~
0.0 1.0 0.0 -1.'1.0 '.8 -1.0 0.8
0.0
1.0
-1.' 0.'
•••
1~'
-1.0 •••
Since the least squares analysis isn't needed, go to (VII).
(VII) Since this is the last example, place a blank card after the A*
matrix and then place the
'*
card.
/[TT341'6781910111211JI'11161J718191012121231411516171811930313213334353613738394oI41414344145"471814950515115J5'55\61575~5960161616J64I6\666168169701111I!J147516111'~
48
ORDER OF CARDS
(0) Job control cards
(I) Parameter card
(II) Data cards (optional)
(III) The A matrix (optional)
(IV) t, rank of the K matrix}
The K matrix
(optional)
(V) v, rank of the X matrix}
(optional)
The X matrix
Repeat as{<VI) d, rank of the C matrix}
(optional)
often as
The C matrix
desired.
Sections (I) through (VI) may be repeated as often as desired.
(VII) A blank card followed by a card with a 'I' in column 1 and
a '*' in column 2.
I
I
-,
I
I
I
I
I
I
_I
I
I
I
I
I
I
I
-.
I
SUMMARY
CATLIN
In this program, the number of responses (r) times the number of
populations (s) must be less than or equal to 65.
(I) PARAMETER CARD
This card contains 9 numbers, each number receiving a 5 column
field and each number is right justified in its field.
Cols.
1 to
Cols.
6 to lO--contain the number of populations (s).
(FORMAT (1615».
5--contain the number of responses (r).
Cols. 11 to l5--contain u, the rank of the A matrix.
Cols. 16 to 20--contain MM which is zero if least squares analysis is not
desired and one otherwise.
Cols. 21 to 25--contain ML which is zero if your function F(p) is linear
and one if it is logarithmic.
Cols. 26 to 30--contain IG which is one if A
=
I and zero otherwise.
Cols. 31 to 35--contain NC which is the number of sets of contrasts to
be tested by least squares analysis.
Cols. 36 to 40--contain IK which is one if K
= I and zero otherwise.
Cols. 41 to 45--contain 1SW which is one if you wish to reanalyze the
data read in the preceding problem and zero otherwise.
(II) DATA CARDS (optional)
This set of cards contains the data entered by populations.
50
Co1s.
1 to 10--contain the first element of the population with the
decimal point punched.
Co1s. 11 to 20--contain the second element of the population, with the
decimal point punched, etc.
Start each population on a new card.
If a population takes more than 1 card, continue the population on
a new card.
E.g., if there are 10 elements in the population the first
card in this set will have the first 8 elements in columns 1 to 10,
11 to 20, etc.; the 9th and 10th elements will be in columns 1 to 10 and
11 to 20 respectively on the second card in this set.
Then the next popu-
lation will be started on the third card in this set.
(FORMAT (8F10.0».
(III) The A (ux(r*s»
If IG
= 1,
If IG
=
matrix (optional)
0, this set of cards contains the A matrix, and the matrix
Each row starts on a new card.
Card 1 in this
section.
1 to 5--contain the first element of the row with the decimal
point.
Co1s.
-,
I
I
I
I
I
I
go to (IV).
is entered by rows.
Co1s.
I
I
6 to 10--contain the second element of the row with the decimal
point included, etc.
If a row takes more than one card, it is handled in the same manner
as the populations are handled, i.e., say row 1 contains 18 elements,
then in card 1
Co1s.
1 to
5--contain the first element of the row.
Co1s.
6 to 10--contain the second element of the row, etc.
el
I
I
I
I
I
I
I
-.
I
51
On card 2
Gols.
1 to
5--contain the 17th element of the row.
Gols.
6 to 10--contain the 18th element of the row.
Start row 2 on a new card.
(FORMAT (16F5.l».
(IV) The K (tXu) matrix (optional)
If ML
0 go to (V).
If ML = 1 and IK = 1 go to (V).
If ML
1 and IK
0, this set of cards contains the rank (t) of
the K matrix, and then the K matrix itself.
The K matrix is read by
rows with each row starting on a new card, and with the decimal point
punched in the number.
in Gols. 1 to 5.
Gard 1 in this section contains the value of t
t is right justified in its 5 column field.
(FORMAT
(1615».
The K matrix is entered in exactly the same way as the A matrix in
(III).
(FORMAT (16F5.l».
(V) The X (uxv) matrix (optional)
If MM
=
1, this set of cards contains the rank (v) of the X matrix,
and then the X matrix.
The X matrix is entered by columns with each col-
umn starting on a new card, and with the decimal point punched in the number.
Gard 1 in this section contains the value of
v is right justified in its 5 column field.
V
in Gols. 1 to 5.
(FORMAT (1615».
The X
matrix is entered by columns with each column starting on a new card and
each element in the column having the decimal point punched.
E.g., if
the first column has 17 elements, the second card in this section would
be
52
-,
5--contain the first element in the column.
Cols.
1 to
Cols.
6 to lO--contain the second element in the colunm, etc.
Cols. 76 to 80--contain the 16th element in the column.
The third card
Cols.
1 to
5--contain the 17th element in the colunm.
The next column would start on a new card.
(FORMAT (16F5.l)).
(VI) The C (dxv) matrix (optional)
This set of cards contains the rank (d) of the C matrix, and the
C matrix itself.
The C matrix is entered by rows with each row starting
on a new card, and with the decimal point punched in the number.
Card 1 in this section contains the value of d in Cols. 1 to 5.
d is right jus tified in its 5 colunm field.
(FORMAT (1615».
The C
matrix is then entered in exactly the same manner as the A matrix in
section (III).
(FORMAT (16F5.l».
There will be NC such sets of cards.
(VII) If there are more problems to analyze, go to (I); if not put a
blank card in and a /* card.
LINCAT
In this version, the number of populations (s) multiplied by the
rank (u) of A* must be less than or equal to 65, and the number of responses (r) must be less than or equal to 65.
restriction that the A* matrix must look like
I
I
This program has the
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-,
I
53
[A*]
[0 ]
[0
[0 ]
[A*]
[0
[0 ]
[0 ]
[A*]
A
That is, the functions across the populations must be the same.
(I) PARAMETER CARD
The first card contains 8 numbers, each number receiving a 5 column
field and each number being right justified in its field.
Co1s.
1 to
Co1s.
6 to 10--contain the number of populations (s).
(FORMAT (1615».
5--contain the number of responses (r).
Co1s. 11 to 15--contain the rank (u) of the A* matrix.
Co1s. 16 to 20--contain a 1 if least squares analysis is desired, and a
o
otherwise.
Cols. 21 to 25--contain a 1 if your function f(p) is logarithmic and a
o
if the function is linear.
Cols. 26 to 30--contain the number of sets of contrasts (NC) to be tested
by least squares analysis.
Cols. 31 to 35--contain a 1 if K
=I
and a 0 otherwise.
Cols. 36 to 40--contain a 1 if you wish to reanalyze data entered in the
preceding problem and a 0 otherwise.
(II) DATA CARDS (optional)
Same as for CATLIN.
(III) The A* (uxr) matrix
This set of cards contains A* entered in the same manner as A is
54
entered in CATLIN.
(IV) The K (tx(u*s»
matrix (optional)
Same as for CATLIN.
(V) The X «u*s)xv) matrix (optional)
Same as for CATLIN.
(VI) The C (dxv) matrix (optional)
Same as for CATLIN.
(VII) Same as for CATLIN.
I
I
-.
I
I
I
I
I
I
el
I
I
I
I
I
I
I
-.
I
DESCRIPTION OF THE OUTPUT
This program uses double precision arithmetic.
The capital letter
'D' following numbers in the output signifies the double precision and
also means that the number preceding the 'D' is to be multiplied by lOx
where X is the number following 'D'.
E.g. ,
0.92283 D-02 means
0.0092283
-0.27846 D 00 means
-0.27846
0.20697 D 01 means
2.0697
The rest of this section assumes that the introduction has been
read.
1. FREQUENCY TABLE (SXR)
This is the n .. 's (i denotes the population and j denotes the
~J
category of response) printed out by populations with a maximum of twelve
numbers to a line.
Note:
if ISW is 1 on the parameter card, i.e., a new analysis of
the data from the preceding problem, the frequency table is omitted and
the following message is printed:
NEW ANALYSIS OF THE SAME DATA
2. PROBABILITY TABLE (SXR)
This is the printout of the p .. 's where p ..
~J
~J
n . .In..
~J
~
These are
56
also printed out by populations with a maximum of twelve numbers to a
line.
3. CONTRAST MATRIX (uxRS)
This is the A matrix written out by rows with a maximum of sixteen
numbers to a line.
4. F(P)
LINEAR MODEL
This is the product of the A matrix and the £ vector, i.e.,
F(£)
= A£.
It is printed across the line with a maximum of eight numbers
to a line.
If the logarithmic model is being used,S. and 6. are printed out.
If
the linear model is used,S. and 6. are skipped.
I
I
-,
I
I
I
I
I
I
_I
5. K MATRIX (TxU)
This is the K matrix written out by rows with a maximum of sixteen
numbers to a line.
6. F(P)
LOG MODEL
This is the product of the K matrix and the natural logarithm of
A£, i.e., F(£)
=K
log A£.
It is printed across the line with a maximum
of eight numbers to a line.
7. VARIANCE COVARIANCE MATRIX
If a linear model is being used, the variance covariance matrix
is
where V(£) is the variance covariance matrix of £.
I
I
I
I
I
I
I
-,
I
57
If the logarithmic model is used, the variance covariance matrix
is
where D is defined on page 7.
8. The following message is printed if you are using a linear model and
A has rank greater than (r-l)*s or if you have a logarithmic model and
the rank of K is greater than (r-l)*s, as this causes a singular variance
covariance matrix.
THIS PROBLEM IS BEING STOPPED NOW FOR ONE OF TWO REASONS.
1. A LINEAR MODEL IS BEING USED AND THE A MATRIX HAS RANK GREATER THAN
(R-l)*S.
2. A LOGARITHMIC MODEL IS BEING USED AND THE K MATRIX HAS RANK GREATER
THAN (R-l)*S.
THESE CAUSE A SINGULAR MATRIX TO BE INVERTED
9. CHI-SQUARE
DF
=
This is the chi-square value for the test H:
a
F(£)
O.
DF stands for the degrees of freedom of the test.
If the chi-square value is greater than or equal to one, P
is printed.
=
P gives the level of the test.
If least squares analysis is not used, this is the end of the output.
If it is used though, we have the following:
58
10.
DESIGN MATRIX
This is the X matrix printed by rows with a maximum of sixteen
numbers to a line.
11.
ESTIMATED MODEL PARAMETERS
We are now fitting a model
F (E)
=
X!..
These estimated parameters are the estimates of~ printed across the
line with a maximum of eight numbers to a line.
12.
VARIANCE COVARIANCE MATRIX OF THE ESTIMATED MODEL PARAMETERS
This is
[X' (V(£))-lx]_l.
It is printed by rows with a maximum of eight numbers to a line.
13.
CHI-SQUARE DUE TO ERROR=
~.
If the chiis also
square value is greater than or equal to one, P =
printed with P being the level of the test.
14.
F(R)
(type) MODEL
(type) is LINEAR if a linear model is used and LOG if a logarithmic
model is used.
This is a repeat of what was displayed earlier, and is
displayed again just for the user's convenience.
15.
F(R) PREDICTED FROM FITTED MODEL
After finding the estimates of
dict F(E)'
~
from F (E) =
X~,
we can now pre-
This is the predicted F(E) printed across the line with a
maximum of eight numbers to a line.
-.
I
I
I
I
I
I
el
DF=
This is the test of the fit of the model F(E)
I
I
I
I
I
I
I
I
I
-.
I
59
16.
F(P) - F(P) PREDICTED
= RESIDUAL
This is the difference between the true F(E) and the predicted
F(E).
It is printed across the line with a maximum of eight numbers
to a line.
17.
C MATRIX
This is the C matrix printed by rows with a maximum of sixteen
numbers to a line.
18.
ESTIMATED MODEL CONTRAST
This is the estimated value of
C~.
It is printed across the
line with a maximum of eight numbers to a line.
19.
STANDARD DEVIATIONS OF THE ESTIMATED MODEL CONTRASTS
The standard deviation is calculated as the square root of the
diagonal elements of
C[X' (V
(.e.» -1
X] -lC' •
The standard deviations are in the same order as the estimated model
contrasts with a maximum of eight numbers to a line.
20.
CHI-SQUARE
=
DF
=
This is the chi-square value of the test Ho : C~
chi-square value is greater than or equal to one, P
=
= Q.
If the
is also
printed with P being the level of the test.
17, 18, 19, and 20 are repeated NC times for each problem.
I
I
-.
DISCLAIMER
Although this program uses double precision arithmetic and has
been checked out, no warranty, expressed or implied, is made to the
accuracy and functioning of the program.
by the author.
No responsibility is assumed
If any problems are found, contact the Biostatistics
Department, University of North Carolina, Chapel Hill, North Carolina.
I
I
I
I
I
I
el
I
I
I
I
I
I
I
eI
I
REFERENCES
Bartlett, M. S. [1935J. Contingency table interactions.
Roy. Statist. Soc., Supplement, 1, 248-252.
Journ. of the
Bhapkar, V. P. [1966J. A note on the equivalence of two test criteria
for hypotheses in categorical data. J. Amer. Stat. Assoc. §l, 228-235.
Bhapkar, V. P. and Koch, Gary G. [1968J. Hypotheses of "no interaction"
in multidimensional contingency tables. Technometrics 10, 107-123.
2
Berkson, Joseph [1968J. Application of m~n~mum logit X estimate to a
problem of Grizzle with a notation on the problem of no interaction.
Biometrics 24, 75-95.
Cochran, W. G. [1955J. The comparison of percentages in matched samples.
Biometrika 12, 356-366.
Goodman, L. A. [1963bJ. On Plackett's test for contingency table interactions. Journ. of the Roy. Statist. Soc., Series B, 25, 179-188.
Goodman, L. A. [1964cJ. Simultaneous confidence intervals for contrasts
among multinomial populations. Ann. Math. Stat., 35, 716-725.
Kastenbaum, M. A. and Lamphiear, D. E. [1959J. Calculation of chi-square
to test the no three-factor interaction hypothesis. Biometrics~, 107-115.
Lewis, J. A. [1968J. A program to fit constants to multiway tables of
quantitative and quantal data. Applied Statistics, ll, 33-42.
2
Neyman, J. [1949J. Contribution to the theory of the x test. Proceedings
of the Berkeley Symposium on Mathematical Statistics and Probability,
239-273. University of California Press, Berkeley and Los Angeles.
Plackett, R. L. [1962J. A note on interactions in contingency tables.
Journ. of the Roy. Stat. Soc., Series B, 24, 162-166.
Rao, C. R. [1963J. Criteria of estimation in large samples.
tions to Statistics, 345-362. Pergamon Press, New York.
Contribu-
Roy, S. N. and Kastenbaum, M. A. [1956J. On the hypothesis of "no interaction" in a multi-way contingency table. Ann. Math. Statist. 12, 749-757.
Wald, A. [1943J. Tests of statistical hypotheses concerning several
parameters when the number of observations is large. Trans. Amer. Math.
Soc. 54, 426-482.
© Copyright 2026 Paperzz