# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : STCHIS.FOR

C

C THIS SUBROUTINE COMPUTES ANY NUMBER OF M BY N CONTINGENCY TABLES.

C

DIMENSION X(1), R(1)

SUM = 0.0

DO 50 I = 1,M

IJ = I

DO 50 J = 1,N

SUM = SUM + X(IJ)

50 IJ = IJ + LLR

CHI2 = 0.0

KLLR = 0

DO 60 J = 1,N

C = 0.0

DO 20 II = 1,M

IIJ = KLLR + II

20 C = C + X(IIJ)

DO 10 I = 1,M

IJ = KLLR + I

XX = X(IJ)

IF (J.NE.1) GO TO 40

R(I) = X(IJ)

IJJ = I + LLR

DO 30 JJ = 2,N

R(I) = R(I) + X(IJJ)

30 IJJ = IJJ + LLR

40 E = R(I) * C/SUM

XXME = XX - E

10 CHI2 = CHI2 + XXME*XXME/E

60 KLLR = KLLR + LLR

IDF = (M-1)*(N-1)

RETURN

END

Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/