# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : STMLRG.FOR

C

C PURPOSE...STMLRG CALCULATES THE N MULTIPLE REGRESSION COEFFICIENTS

C FOR A SET OF M OBSERVATIONS.

C

DIMENSION X(1),A(1)

N1 = N + 1

DO 3 J = 1,N1

JSCRIP = (J -1)*IROW

DO 3 I = 1,J

JSCRIP = JSCRIP + 1

3 A(JSCRIP) = 0.

DO 4 I = 1,N1

JSCRIP = (I - 1)*IROW + N1

4 A(JSCRIP) = 0.

JIROW = N*IROW + N1

DO 6 INDEX = 1,M

DO 1 J = 1,N

JSCRIP = (J -1)*IROW + N1

J1 = (J -1)*IROWX + INDEX

A(JSCRIP) = A(JSCRIP) + X(J1)

JSCRIP = JSCRIP - N1

DO 1 I = 1,J

JSCRIP = JSCRIP + 1

I1 = (I -1)*IROWX + INDEX

1 A(JSCRIP) = A(JSCRIP) + X(J1)*X(I1)

N11 = N*IROWX + INDEX

A(JIROW) = A(JIROW) + X(N11)

IIROW = N*IROW

DO 6 I = 1,N

IIROW = IIROW + 1

I1 = (I -1)*IROWX + INDEX

6 A(IIROW) = A(IIROW) + X(I1)*X(N11)

XM = M

XM = 1./XM

DO 2 J = 1,N1

JSCRIP = (J-1)*IROW

JIROW = (J-1)*IROW + N1

DO 2 I = 1,J

IF(I.EQ.N1) GO TO 5

IIROW = (I-1)*IROW + N1

JSCRIP = JSCRIP + 1

2 A(JSCRIP) = A(JSCRIP) - A(JIROW)*A(IIROW)*XM

5 DO 7 I = 1,N

JSCRIP = (I-1)*IROW

ISCRIP = I

INDEX = I - 1

DO 7 J = 1,INDEX

JSCRIP = JSCRIP + 1

A(ISCRIP) = A(JSCRIP)

7 ISCRIP = ISCRIP + IROW

CALL YENBOB(A,IROW,N)

SUM = 0

DO 8 I = 1,N

IIROW = N*IROW + I

JIROW = (I - 1) * IROW + N1

8 SUM = SUM + A(IIROW)*A(JIROW)

IIROW = N*IROW + N1

I = N*IROW + N1

A(I) = XM*(A(IIROW)-SUM)

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/