COMPUTERS

AND

BIOMEDICAL

Exact

RESEARCH

(1975)

8,423-446

and Asymptotic

Methods for the Combination of 2x 2 Tables DONALD

National

Cancer

G. THOMAS

Institute,

Bethesda,

Maryland

20014

Received January 16,1974 A FORTRAN program for computing the conditional maximum likelihood estimate of the combined odds ratios (also called relative risks or cross-product ratios) from a set of 2 x 2 tables is given. Exact tests for the main effect and interation as well as exact confidence limits are given. Optionally, these results may be computed asymptotically. The program is illustrated with a numerical example. INTRODUCTION

Frequently with biological data, it is desired to compare two treatments with regard to proportion response in the presence or absence of a particular attribute. This becomes a 2 x 2 table analysis or a test for the difference between two proportions. Further, the subjects may be stratified or grouped into sets of 2 x 2 tables by a covariate, for example, age or sex. Consider the data from an experiment testing the possible carcinogenic effect on mice of a fungicide Avadex as reported by Innes et al. (9). These data were cited by Gart (8) with an excellent discussion of the analysis. The strata are the four sexstrain categories of two strains of mice (Table I). TABLE ANALYSIS

OF FOUR

SUBGROUPS

OF MICE FED

X Males

FOR ENHANCED

THE FUNGICIDE

X Females

no tumor

tumor

no tumor

Treatment

12

Control

74

4 5

14 84

1

tumor

FREQUENCY

OF PULMONARY

TUMORS

AVADEX

Y Males

Y Females

no tumor

tumor

14 80

4 10

no tumor

tumor

--__2 3

14 79

1 3

It is well known that simply summing over the strata may yield misleading sumover the groups.

mary 2 x 2 tables when sample sizes and response vary considerably Copyright IQ 1975 by Academic Press, Inc. All rights of reproduction in any form reserved. Printed in Great Britain

423

424

DONALD

G. THOMAS

We have two matched, independent series of binomial variates ,I;. 1,. with probability of positive responsespji, (qji = I - pji), and sample sizes n,iS respectively. forj= I, 2; i= 1, 2, . . ., k. In the exact analyses we consider the case where all marginals in the resulting 2 x 2 tables are fixed. Thus we let .Y, Z- Yi = ~1,: j=l , ?-3 ..., k, and the data itself may be written in the notation given in Table 7. (Cap X’s denote variates and x’s data.) TABLE

2

NOTATION

Sample Sample Totals

I II

-

i-

ai = l,li - xi c; = n2i - mi + -4-i n,i + n,i - mi

bi =.Y; di = mi -- xi ml

The odds ratios (also called relative risks or cross-product $i

=

~Pli~Zi)l(PZiYli)~

Totals

for

i=

ratios) are 1,2,....k,

and are assumed constant over all tables, i.e., $i = II/, for all i. The unconditional maximum likelihood estimator of the odds ratio for each individual table is

This program computes the conditional maximum likelihood estimate of the common odds ratio II/ and an exact test for the main effect ($ = 1) assuming no interaction. (Note, in our example the null hypothesis is that the treatment has no effect on tumors and if this is true, the common odds ratio will not be different from one. In order to make this test, we assume that there is no interaction between the treatment and the strata, i.e., the odds ratios for each table are not different from one another.) An exact test of the “no interaction” assumption r,Gi= li/ (against the alternative ll/j # $j for some i # ,) is given under the additional constraint that I-xi = ZXi. This is an exact test for interaction in a2 Y 2 x ii table. An option is provided to compute one- or two-tailed confidence limits for @ with equal or unequal probabilities in each tail. Also, tail probabilities for a given set of confidence limits may be computed. The program may be used on a single table where all results can be computed except the interaction. In part, this is an extension of Thomas (12) to the case of combined tables. Optionally these results may be computed by asymptotic methods, since in large samples the calculation of the exact results may require very large amounts of

COMBINATION OF 2 X 2 TABLES

425

computer time and yield answers almost identical with those given by the approximate methods. METHODS

1. Point Estimation of $ (Assuming tji = t+b) The exact conditional noncentral distribution Ijfitxii i-1

of the Xt’s, Gart (7), is

mi3$),

where (Fisher (6); Cornfield (4))

and Xi = max(mi - n,,,O), . . ., min(nri,ml) for i = 1, . . ., k. For a point estimate of II/, the maximum of the conditional likelihood, Birch (2) showed this to be the solution to the polynomial equation X. = E(X. jmi; $,I),

where

X*

$,,,I is used.

=ZiXi.

Mueller’s iteration scheme of successive bisection and inverse parabolic interpolation is used to solve this equation. A starting value for this iteration process is obtained from $mnh= ,i

Lxitn2i - Yi>/n. il/jl

bitnli

- xi)in. il,

wherey = m - x and IZ. 1= nri + n2i given by Mantel and Haenszel (II). This estimate is used as the starting value in order to obtain the asymptotic maximum lielihood estimate of rj ($O,,,J from a modification of the iterative solution of the Extended Cornfield Method as illustrated by Gart (8, p. 161). 2. Confidence Intervalfor $-Exact Conditional Exact’ lower tjl and upper $2 confidence limits on rl/ with confidence coefficient at least 1 - a (a = a1 + a2) are found by the iterative solution of the two polynomial equations given by Gart (7) (j()

C

eR1

lfIfitj,I%$d f=l

= a1

and

1 Readers should not be mislead by the use of the word “exact.” Since this is a discrete problem, we do not obtain a predetermined confidence coefficient of exactly 1 - a but rather 1 - a’, where a’ i a and a’ depends on the fixed marginal totals. The results are exact in the sense that the confidence coefficient is al least I- a, and thus is always conservative.

426

DONALDG.THOMAS

where RI is the set of all k-fold partitions of X. such that X. = 2 ,ji 3 X. and R, is the similar set such that i- 1 x. = $ ji 6 s. , i=-

1

Starting values for the iteration process are found by the iterative solution of the Extended Cornfield Method, using logit limits as a first approximation, as suggested by Gart (8). The iteration appears to proceed best using the interpolation formula analogous to that given by Gart (8, p. 161) tjj = tJOexp{(log$,

- logtJ,)[log(-loga)

- log(-logx,)], [log (-log a,> - log (-log &Al ;?

where initially tj, is the Cornfield estimate with associated probability ctx,and I,&,,is l.OS$, with probability Q. For the next iteration either $, or $, and its associated probability is replaced with I,&~and its probability. The $ with max j~x- $1 is the one replaced. This process continues until la - B,j < EQO and l(~,&~+,- $i)/$i-, / K E where Eis taken as 0.01 in the program. For two sided confidence intervals, the usual practice is to choose ~1,= x2 = x 2 where CIis appropriately small, say 0.05 for 95 % confidence intervals or 0.01 for 99 “;, intervals. For a one-tailed upper 95 % limit, choose c(i = 0, cx2= 0.05. 3. ConJidence Interpal Estimate jbr $-Asymptotic The approximate limits are computed using the Iterative Solutions of the Extended Cornfield Method which were used as starting approximations for the exact method. See Gart (8, p. 161) for details of this method. He gives a numerical example illustrating the computations with the Avadex data. 4. Exact Testfbr I/I = 1 (No Main Effect) The exact test for the main effect is obtained by first computing the exact test is found by evaluating

$nlL. If $ml > 1.

given implicitly by Cochran (3, p. 446) and explicitly by Cox (5) and Gart (8, p. 1%). When $ < 1, we evaluate the sum over region R2 where RI and Rz are as defined previously. 5. Asymptotic Test jbr $ = 1 The asymptotic test for the main effect, i.e., testing $ = 1, is found by computing the normal deviate z = (lx. - E(X.)/ - 1/2)/[v(x.)]“‘1,

2 X 2 TABLES

COMBINATIONOF

427

where

E(X.)= i$lE(xi>= I?

nli

mi/n.

i

i=t

and,

V(X.) = 2 V(Xi) isI =

i$l

nli%i

mib.

i -

mi)/[$i(fi.

i -

111

given in this form by Mantel and Haenszel (II) (a modification

of Cochran (3)).

6. Exact and Asymptotic Test for I,!I~= 1 Since the test for main effect assumes no high-order iteration, i.e., the odds ratio is constant over the k tables, a test of this assumption may be useful. The exact probability for interaction (see Bartlett (I), Lancaster (IO), p. 265) and Zelen (13)) is computed from (ji)eR*

i=l

where R is the set ofj, such that zj, = x. and R” is a subset of R such that ji obey the inequality

The asymptotic chi-square

test for interaction

is found by computing

&_Pl = til [Xi - E(Xi)]“/V(Xi)

the approximate

- [X. - E(X.)12/ V(X.)

given by Zelen (13). PROGRAMSTRUCTURE

Figure 1 is a very general flowchart of the problem (it does not correspond exactly with the implementation of the program). Subroutine parameters are defined as follows : SUBROUTINE

OUTPUT(NTAB,T,NPB,PLT,PRT,NL)

This subroutine checks validity of data and prints most answers. Formal parameters NTAB T NPB

Integer scalar Integer vector Integer scalar

number of tables, up to 20, to be combined values of tables (ai, bi,ci,di, etc.) number of sets, up to 10, of probabilities for evaluating confidence limits

428

DONALD

G. THOMAS

COHPUTE EXACT PROB FOR GIVEN LIMITS

1

COWUTE pm1 C EXACT TEST FOR MAIN EFFECT

+

COMPUTE EXACT PKOB OF INTERACTION > COMPUTE APPROXIMATE PROB OF INTERACTION

+

FIG. 1. General flow chart.

PLT

Real vector

probability in left tail for confidence limit (left limit not computed if PLT = 0)

probability in right tail for confidence limit (right limit not computed if PRT = 0) NL < 1 find exact limits NL Integer scalar NL = 1 PLT and PRT contain limits and probability is required NL > 1 find approximate limits SUBROUTINE EDIT(T,IS) PRT

Real vector

This subroutine eliminates all tables which have marginal totals of zero, computes individual odds ratios, and reorients tables if necessary to prevent all odds ratios being infinite.

COMBINATION

OF

2

X

2 TABLES

429

Formal parameters : T Integer vector values of tables IS Integer scalar =1 on entry =2 on exit, if tables were reoriented to prevent all odds ratios being infinite; otherwise unchanged SUBROUTINE CMB2X2(T,ALPHAL,ALPHAU,PSIl,PSI2,IFAULT) This subroutine makes all approximate calculations and sets up calls to other subroutines for exact solutions as required. Formal Parameters

T ALPHAL ALPHAU PSI1 PSI2 IFAULT

Integer vector Real scalar Real scalar Real scalar Real scalar Integer scalar

values of tables probability in lower tail probability in upper tail lower confidence limit upper confidence limit fault indicator =0 if dimension of F( ) is large enough to process this set of tables otherwise >1500 and equal to the required dimension of F( ) for this set

Other Parameters of Interest

P PSI

PIACT F

MFACT APML ACC Auxiliary

CSOL(H) CFUNl(FV)

Real scalar in COMMON BLOCK BKl, contains probability for main effect test Real vector of dimension N + 1 in COMMON BLOCK BKl, contains odds ratios of each table and PSI(N + 1) contains conditional maximum likelihood estimate of $ Real scalar in COMMON BLOCK BKl contains probability for interaction test Real vector of dimension 1500 in COMMON BLOCK BK3, used to store a table of logarithms of factorials for evaluating binomial coefficients. Integer scalar in COMMON BLOCK BK2 equal to maximum dimension ofF0 Real scalar in DATA statement of CMB2X2 which controls accuracy of iteration of rj,r (.s= 0.001) Real scalar in DATA statement of CSOL, controls accuracy of iteration for exact limits (E = 0.01) Algorithms

Supplied (Not Used in Approximate

Computations)

Iteration routine used to obtain exact confidence limits. Function used to evaluate the exact noncentral distribution Xi%.

of the

430

DONALD

FCT(FV) INTACT(T)

G. THOMAS

Function usedto compute I,&,,,~. Used to compute exact test for interaction.

Other Algorithms Required Normal distribution function (not required for exact calculations). Computes probability that a random variable distributed N(0, 1) is O, ~11 Number of probabilities (confidence next Compute all results exactly, including NL l Compute all results approximately, confidence limits IL =o Don’t read title card Read title card $0

limits) to be read in M pairs of confidence tail probabilities including

for

M pairs of

(b) Probability (Conjidence Limit) Card M of these cards are required where I = 1, M < 11. PLT(1) Contains tail probability for lower confidence limit if NL < 0 or lower confidence limit if NL > 0 PRT(1) Same as PLT(1) except applies to upper limit If either PLT or PRT are zero, one tailed limits are obtained (evaluated). If both are zero, no limits are calculated. (c)

Number of Tables Card

N > 0 Number of tables up to 20 to be combined N 6 0 Program will read a new Option Control Card next Input resumes with the Number of TablesCard after the first set of tables has been processed unless NL = 0 whereupon the Option Control Card is the next input card.

432

DONALDG.THOMAS

(d) Title Curd (optional) FORMAT(7A4) If IR = 0 on Option Control Card, a title up to twenty-eight characters long i> required here. (e) Table Card (N required) The entries in the tables to be combined are supplied on these cards, first row followed by second row, one table per card, e.g. al

h

a,

b2 c2 d2

cl

4

etc. NUMERICALEXAMPLE

The deck set up for the Avadex data is Input : I) 2)

3) 4) 5) 6) 7) 8) 9) 10) Continue output: Individual

2 -1 0 (Two sets of exact limits, no title) .025 .025 (For 95 % confidence limits) .005 .005 (For 99 % confidence limits) (Four tables to be combined) 4 12 4 74 5 (Tables) 14 2 84 3 (Tables) 14 4 80 10 (Tables) 14 1 79 3 (Tables) (Return to Option Control Card) 0 2 00 (Two sets of approximate limits, no title) with lines (2-8).

Odds Ratios : 4.9333 4.0000 2.2857 1.8810 Conditional Maximum Likelihood Estimate of Psi = 3.0482 Exact Test for Main Effect, P = 0.0072 Exact Test for Interaction, P = 0.9379 Exact Confidence Limits for Combined Tables 95.0% Limits 1.243451 1, APPROXIMATE LIMIiS REQUIRAD IF NL = 1, FIT & PR'I CONIAXN LIHUS G PROB. IF NL < 1. READ IN M PRObLBILIPIES IF N 63. 3611. 365. 366.

DONALD

G. THOMAS

C C

i'Jl(:1+1)=0. 8

c

FOR

9

10

11

I)'? 8 1=1,3 IS.;..(I)=0 I F (ALPI'AL.rT. 0. ) I " Iy ( 1 ) = 1 lF(;ILPI'AU.cT.O.) l?"(z)=1 IF(iiLL.GT.l.A~:i!.~.LT.~..~:i~~.'!!!.'!~.") !I!? 17 1x=1,3 !-‘2=0. IF(IaI!(IX).E~!.O) C'l -1'1 17

JnP=l iP(Ix.NE.3) GO TO 9 ASYnPTOTIC flAXIMUl’l LIKELiHOOLl P;L=PSIEIH PO=. 9*PGI GO TO 13 PGL=PG*EXP(S;(IX)*X2*SY) PO=(l.+.l*SG(IX))*PGL SO TO 13

f“!‘(3)-1

EjTIMATE

OF PSI

z1=20

Pl=Po Po=P;L JMP=1 GO TO 13 IF(AdS (Zl-ZO) .LT.l.OZ-4) ;O TO 17 P2=ALOG(FO)-(ZO+SG(i~~*X2~*(ALO~(P1)-AIOG(FC~~/(Z1-ZG~ 12=zxp (P2) iF(ABSiZl;SG(IX)*X2).LP.abS(Za+SG(IX)*X2))

GO TO 12

z1=zo 12

Pl=Po iF(ABS((Pl-P2)/P2).LI.l.~~-4)

23

Ti?

17

PO=?2 c

C

IilPhOVE INITIAL METHOD 13 J=C zx=o. v=c'. ia5

i4

UC

3b

39 15 16

17

16

ESTIMA'IcS

BY il'~i;.APIliE

SCLUTION

3F

EXTENDED

I=l,Nll.h

J=J+f A=l.-PC b=NL(J) -i-l(J)+N 1 (J)*PO+M(J)*?U C=-PO*Nl (J) *N (J) IF(ABS(A).GT.l.E-12) ;O TO 14 X=-C/B GO TO 15 i?=SQRT(B*B-4. *A*C) IF(B.GT.0.) GO TO 40 X=(R-B) /(2.*A) GO ro X=-2.*C/

3e

(B+R) iP((X.GE.Bl(J)).AND.(X.id.B2(Jl IF(B.LT.0.) 30 TO 39 X=-(B+R)/(Z.*A) 3~ CALL NDTF (-ZG,P,D) i?(h.;d,.l) GO TO 35 ~L=XL-(XD-EX)**L/VX IClXZ.il.C.1 GO ?Ct 3.+

UUl. 11112. uu3. u44. CUF.. L!*fr, liti-. uug. L?9. tse. 115 1. c52. US?. UjU. 4'5. Ujh. L57. u5a. L54. t!FC. 4c5. 462. US?. LOU. U6C. u55. 057. uca. 059. 117r. u71. 072. L-l?. 4711, 47 5. U76. 1177. u-a. 57'3. L&3.

G3 T O 30 I FAULI=L I~(NiL.LO.1)

G. THOMAS

FIACT=l.-PIhCI FSIl=L?Ill

c

CSOI

9/2>/7U SUBFdUTINE CSCL(t!) DIMtNSiON P (2),ZM(2),~(L~,n~=(ii COMMON/BK~/P,~~ACT,~S~(~~),~IA,~I~,~~,~~~~,~~ C)M~G~/BKq/~LEHA2,Z(i),i~d,i; LJUaLZ PRECISION r* UiiTh AcC/.ol/,z~(l),Ls(il/.~Jul,.o~~~/ IF(KLL.LI.1) 20 TO i H=CFONl(ALPHAZ) iF(MX.N6.!Z) d=l.-L!

66 ~3 a 1 P3 4 i=l,2 d=z(;)

;(i)=CFUhl(H) IF(i.EQ.2) GO ?C i r~(a(l).Ll..ooo'.oF.n[l).~;..~~~~~ L L r(A(1) .G?.C.) GO TJ ai.; (I) =r? . ;ij 10 4 .7 nLG(I)=AiOG(-AL@G(A(il)) ii H(i)=hL.OG(Z(I)) A;=is,G(-PLOG(AIPHA2,) 5 L=l

L(?)=z(!)"z~( 3

TN:&??:

COMBINATION 4139. 49c. 4?1. UQ2. L93. “00, lio5. 436. 1197. 1108. (199. 500. 501. 502. 5c3. 5GU. ‘OS. 5C6. cc7. 569. 5c9. 510. 511. 512. 513. 51 u. 515. 516. 517. 518. 5’s. 52C. c21. 5i?. 523. ‘2U. ‘25. 52f. F27. 526. F29. E!G. 531. 532. 5??. 53u. 535. 536. 537. 538. 5 39. 510. 5L’. 512. 5113. 5411. 5cs. EU6. 5u7. 5U6. 549.

C

C

OF

2

X

2

441

TABLES

IF(ABS(A(2)-ALPHt.2) .LT.bbS (A(l)-4LPH’AZ)) L=2 IF(ABS((Z(2)-Z(l),/Z(L)).GZ.AC;) GO T O 6 IF (ABS (A (I) -ALPHEZ) .iI. .l*,C:) G3 T O 7 6 H=(W(l)-W(2))+(AL-AL;(1))/(Ai;(i)-4L;(2))+~(1~ H;=hKP(H) A’i’=CFUNl (HT) hrL=ilLoG (-ALOG (AT)) L=3-L k(L) =AT ALG(L)=ATL w(L)=H Z(L)=HT GO TJ 5 7 H=Z(L) 8 FxITU5.N hNi, CFUNl 9/25/7u FUNCTZON CFUNl(FV) DiHtNSION DS(2),D(2),DX(2),S:i:ir;(2),DN(2),CFlJNX(2),DH(26) COMMON/BK~/P,FIACT,PSi(2~~ ,fiX,bZ, N,NLL,N4 COfi~ON/BK3/P(1500),X~,bl(~~),~2(2~) ,b3(20) ,M(2C) COMtlON/bX~/ALPHA2,Z (2) ,LIB, LT EOUBLL PRECISION F,G,D,3k’,0H,D;C,DN,DF,DS,D?,DX,CFUNX,SCALE,DL, 1 FLAT?GZ IITLGEfc Bl,B2,P3 CATA DPC/172.DO/,FLAn;~/l.~~7~/,DXo/O.DO/ G=DLOG(uBIE(PV)) COIIPUTI. DdNCflINATOE DO 1 1=1,2 D.s (I) =o; LO DN (I) =G. CO CFUNX(I) =O.DO IX=1 ;P(P.;L.o.) ;o T O 2 iF(~~i(N+l).LT.l.C.ANu.LI.fid.~) IX=2 I?(PSi(N+l).GP.l.O.LB~.~I.~Q.I) IX=2 JX=G IJ=-1 DJ 0 i=l,F .SCALu(l)=C.DO SCAX(2) =C.DO D(1) =O.DC' D(2) =O.LC rl=al(I) +1 12=&z (I) +: DO 5 K=Il,IZ B3 (i)=K-1 IF (L1ti.GT.C) B3(T)=il+iZ-d-F GC 'IO lb DO 5 J='I,IX D?=dfi(I)-DX(J)-SCALh(J) IF(DABS(DP).GP.DPC) ZO li) 17 IF (D (J) .S?.FLAE;E) ;O IO 17 L)(J) =0 (J) +DtXS (D7) CON:INUE DS(l)=r)S (l)+DH(I) JX=JX+83(I) DN(l)=DC(l)+SCALE(l) .ZT.C.DO) DN(l)=U;~(l)+OLsG(D(1)) IFLU(l) IF(IP.NE.2) GO T O 6 DS (2) =DS (2) +DH (I)-DX (21

,Nl

(2C,)

,N2(20)

DONALD

c

JS(J)=DT I,J)+~H(IJ-~A(J, uP=l)s (J) -3N (J) ;. IF (3P.L” .-3r‘;j -J : CFUNI[(J) =CFli’TX (J)+liihr’(r., d : L Iv ; 1 N iJ E CiillPUTf ?‘hi-I’Lr h5 i=N DX (LJ ZbJ (T) =:i. ;J=l Jx=.Jx+lLF US(IJ=DS (I)-D?(I) iE(IX.tu.2) DS(~)=DS(LI-J~(LI+~A(~)

iL

JX=JI-b? bJ(i)=Zl(T) 1.3 I?(:-1.LL.C) IJ=l

c c

G. THOMAS

bVraLlJd’I-’

(i)+:-’

(I) ‘Yn

3iSC:IhL

1u

;iA=hl (I)+1 143=h’1 (:)-:?[I)+: t,i=b>(I) + 1 hD=NL(I) +l ~i=RZ(~)-*(I)+Ei(i)+l hF=d(:)-E3(Z)+l cx (L)=a3(l)*G

15

~5 ii)=& IF(lX.i,~.fl A=:-)

“Cm 1z

C~iEFE;~lclr,J

(i)+cs(z) DS{?)=DS(Ll+un(-i-uh(Li

COMBINATION 611. 612. 613. 614. 615. 616. 617. flR. fl?.’ 62C. 621. 622. 623. 62U. f25. 626. 62-I. 62e. 629. 630. 631. 632. 633. F3U. 635. 636. 637. 638. 639. 64C. t41. 642. EU3. FUh. cc5. tuti. CUT. 608. fU0. b?(. tjl. 652. 653. 650. 655. 656. 05-J. 65R. 659. f t 0. 661. 662. Eh.5. 66L. 665. Ff.6. 6-l. fi;A. 6hY. flC. 671.

17

Ir'(D(J).LE.O.DO)GO DL=DSOG(D(J)) iF(DP+DPC.LT.DL);O SCALd(d)=SCALa(J)+DP LJP=DL-DP D(J) =l .DO IP(DP.Gd.-DPC)GO GO T O

Id 19 C C

OF

2

X

2

443

TABLES

TO ld TO 5

TO 4

5

SCALn(J)=SCALE(J)+DP D(J) =l.DO GO T O FE’IUXN t.ND

5

FCT g/25/74 iHIS FUNCTION

USED

1*0 FIRD

Mb~iflUd

LIKELIHOOD

ESTINATE

C

FIJNCPIOK ECT(FV) CGhMON/EK1/P,PIACT,PSi(2l),a~,~~z,~,NLL,N~ CO~~~ON/BK3/F(l50C~),X~,~l(LD),BL(23),~~(20),M(20),61(2t),N2(2~~

D0UBl.c.

PRECISIGN

F,G,U(~),UJ,U~C,CX(~),SCALE(~),DP,DR,DTIDL,FLA~~~

INTtG3R B1.32.63 LATA 3PC/172.DO/,FLA~;b/l.3374/.DX(1)/O.D0/ G=DLJG(DBLE (FV))

rx=cl. IJO

4 I=l,N

SCALZ(1)

[email protected]

SCALE(Z)=O.DO D(1) =O.LG

D(I)=G.DS Il=BI (I) +* i2=!32 (I) +l DO 3 K=Il,I2 NA=Nl(I)+l NE=Nl(I)-K+2 ND=N2(I)+l

NE=II(I)-M(i)+K Ni=x(i)-K+2 KI(=K-7

DJ=KK DR=F(NA)-F(NB)-F(K)+F($D)-Z(tiil-F(NF)+DJ*G i3=1

IF(KK.EQ.0) G'l TO 1 13=2 DX(Z)=DLOS(DJ) DO 3 L=l.i3 uP=Jh+DX(L)-SCALE(L) IF(DABS(DP).GT.DPC) GO Ii, r) IF(D(L).;T.FLARGE) GO I'0 t "(L)=D(L)+DEXP(DP) CJNTINUE IF(D(Z).EQ.O.DO) GC i0 5 tiP=3(2) /L(l) DJ=SCALE(2) -SCALE (1) IF(uJ.iQ.O.DO) GO T3 4 PP=fi.c,XR(LJ+DLOG (D(2))-3L3G(D(ljl BX=hX+DP FiT=lUU.+ (tiX-XD) 63 C

IU

d

;DJUS'I SCALE 6 iF(D(L).LE.O.DO) DL=DLJG(D(L))

GO I3

7

f

OF PST

444

DONALD

672. 673. 670. 675. 676. 617. 676. 670. 69C. 681. 6e2. 683. 6911. 665. 6ac. 687. bY6.

613. 6qa. f?5. tC6. f??. 696. F "0. 7co. 7Cl. 7c 2. 703. 71)c. 7c5.

7

?25. 726. 727. 718. 720. 7jr, 531. 732.

g/25/7& SlJBF3U'iINE

:J

1)

TC L

INTACT(")

DiMENSION

T(80)

~~flMO~/~Kl/?,~IACT,P~i~~l),~~,~~,~~,h~~,~~ C~MfiCN/6K3/~(l5OO),Xu.til(~~l,bi(2C),E3(2~l,dT

(20)

LJUEii PRrCISION F,PO,~~,U,~IL,~P,DR,DS,D~,DPC,SCAL~,FL~=G~ ;N:fi;dii 'Y,Bl,B2,B3,58i,~ DATA UPi/l72.Do/,FLAiG~/l.~~7~~ SCALa=O.0C IOM~OIAi'ION TO? OBSbPVZu I;t.~ii fJ=L D3 J=b . D3 1 1=1,x4,4 J=J+l x=:(:+1) NA=Nl (J) +l

BB=bl (3)-X+> NC=X+ 1 dD=NL(J)+l NIY,=B2(J)-MT(J)+X+l dF=M‘LJ) -X+1

c

1 FG=Fj;F'(~h)-P(NB)-FIh~~+~~~~)-~(~~l-F(~F] iGM2iJTE INIEEACTION Dl=o.oo i.2=0.3c hll=.V-1 NLL=H-2

C

7’2. 713. ilb. 7:s. 7 16. 717. 7:b. 715. 72c. 72'. 122. 723. 7211.

;O

rBD INTb,i

7"b. 7c7. 7ce. 5C?. 7' r . -11.

IF(DP+0PC.LT.DL) S;ALti(L)='CALE(L)+D? UP=CL-DZ c(L)=l.dc IF (DP.Gti.-DPC)GO GO "0 3 SCALt(L)=SZALZ(L)+Di D(L)=l.ufi

G. THOMAS

GaTAiN sti=i,

MINII*.FL

A-TUPLE

It.diiTiJN

Dj (8)=al (P) ~13 2 i=l,Nll 33 (I) =i31 (I) L 3N=s:l*b3 (I, 3 x=?l-ss Lu 5 K=l,h I=N+l-K

C

;F(X.GI.EZ(I)) d3(i)=X PiiOCsSS ?HL MINIMAL u

GO 13 7 33 (i) =ai

;F(K.Q.h)

i

5

PA?EiIIUN

(i)

GO 'TO 16

X=X-a~UI+BlU-1)

NO FARTilIONS PIACT= ti3 -3 17* t

GO TJ Y

t3(N)=B3(K)

IF(E3(N).L'!.Bl(N)) L,(N-l)=B3(N-l)+l la(aj[N-l).;T.B2(N-')I

EXIS? -?

Gj

I3

13 SO IO

13

,M1(2(1),:jd(

COMBINATION

OF

2

X

2

TABLES

7 bs=L.JG 53 8 J-1.1 11=E3(Jl

733. 734.

735.

J,=lYl(J)+l X5=61 (J)

736, 737. 73e. 73?. 70 c.. 7L 1. 7cz.

-X+1 Y.:=X+ 1 oir=liL(J) tl N~=NL(J)-MT(J)+Xtl .vb=n!(J)-X+1 3j=~S+?(sl)-:(N~)-F(H3)tS(N~)-P(~E)-F(NF)

8

7i.3.

Lk=uS->-ZLE

7ull. 'ic5. 7Ub. 7L7. lL!$. 7x0. 55c. 751. 752. 753.

;I(IJAD,(D~I.GT.DPC) I?(DL.GZ.EL?FGE) uI=b2xP (DF) DL=IILtDT ;?(Ds.Ln.EC) GJ

?J

LDJUSI

GO PO 3 GO ;3 9 Dl=Dl+DI

6

5ZA5E

Y I'(r,Z.;fi.O.DC)

so

uL=lILclG(Di) :?(JP+DPC.LT.DL) SLnLo=S;AL2tD? U.-=iJ'-DP

T O 11

65

;2

d

Lz=l.lx

;F(LE.LT.-!2?C)

757. 75e.

;O

TO

IL

-jO

7f 0, 7&l. ‘62. 763. Tell. 765. 'itc. 767. 7b8. 7'9. 773. 771. 772. 7'3. 7111. 775. 776. 517 * 7'8. -7,.2.

763. 787. -e2. 763. 58fi. 785. -9c.

iI(D?tD~C.k.DL)

L9=D,-3P ul=C. uo If'(D,.iT.-OK) li 11

12 13

SO

r,n

"0

iii

1~

lu

ul=DiXF'(Di) I~(Dj.l,.FC)Ll=Jltl.Ov so 13 b

E~BL~=SZ~LE+DF DL=l.tiC GJ iL) 1J [email protected] GU :o 10 Ii(N.iy.2) GO T O L3 15 K=l,N22 r=tiLL+ 1-K dd(i)=a3(1)+1

16

;F(63(i).;T.B2(11) ;3 PO 15 jti=o i)C. 14 J=l,Nll IF(J.GT.I) 83(J)=Bl(J) lb &1=58+83(J) IF(S?ltdq (N).LS.rl) ;u TO 3 15 ;OIITINUE 10 PiBCr=dl/LZ 17 r.~.Zui.N t iD

445

446

DONALD G. THOMAS ACKNOWLEDGMENT

I thank Dr. John J. Cart for his assistance in the preparation of this paper. REFERENCES M. S. Contingency table interactions. J. R. Srutisr. SW. B 2,248-252 (1935). W. The detection of partial association, I: The 2 x 2 case. J. R. Statist. Sue. B. 26, 313-324 (1964). 3. COCHRAN, W. G. Some methods for strengthening the common tests. Biometrics 10, 417-45 L (1954). 4. CORNFIELD,J. A statistical problem arising from retrospective studies. Proc. Third Be&e/e! Symp. 4,135-148 (1956). 5. Cox, D. R. A simple example of a comparison involving quanta1 data. Biumetriku 53,215~2.X (1966). 6. FISHER, R. A. The logic of inductive inference. J. R. Sturiu. Sot. A 98, 39-54 (I 935 L 7. GART, J. J. Point and interval estimation of the common odds ratio in the combination r!! 2 x 2 tables with fixed marginals. Biometrika 57,471-475 (1970). 8. GART, J. J. The comparison of proportions: A review of significance tests, confidence intervals and adjustments for stratification. Recieu> Znfern. Statist. Zn.ct.39, 148-169 (1971’). Y. INNES, J. R. M., ULLAND, B. M., VALERIO, M. G., PETKUCELI.I, L., FISHBEIN, L., HART, E. R., PALLOTTA, A. J., BATES, R. R., FALK, H. L., GART, J. J., Kum, M.. MITCHELL, I., AYD Pmms. J. Bioassay of pesticides and industrial chemicals for tumorigenicity in mice: a preliminary note. J. Nat. Cuncer Inst. 42, 1101-1114 (1969). 10. LANCASTER, H. 0. The Chi-Squared Distribution, p. 265. Wiley, New York. II. MANTEL, N. AND HAENSZEL. W. Statistical aspects of the analysis of data from retrospective studies of disease. J. Nat. Cancer Inst. 22, 719-748 (1959). Z2. THOMAS, D. G. Algorithm AS 36-Exact confidence limits for the odds ratio in a 2 x 2 table. Appl. Sfatist. 20, 105-110 (1971). 13. ZELEN, M. The analyses of several 2 x 2 contingency tableb. Biumerrika 58. 129~-137 (1971 J. 1. 2.

BARTLETT, BIRCH, M.

Exact and asymptotic methods for the combination of 2 times 2 tables.

COMPUTERS AND BIOMEDICAL Exact RESEARCH (1975) 8,423-446 and Asymptotic Methods for the Combination of 2x 2 Tables DONALD National Cancer G...
994KB Sizes 0 Downloads 0 Views