Trailing-Edge
-
PDP-10 Archives
-
decuslib10-01
-
43,50144/mulreg.bas
There are 2 other files named mulreg.bas in the archive. Click here to see a list.
10 DIMV(9,61),F(6),G(6),U(6),H(6),B(6),S(6,6),T(6,6)
11 LETR=0
12 LETR=R+1
13 LETF(R)=0
15 LETG(R)=0
16 LETU(R)=1
17 LETH(R)=0
18 LETB(R)=0
19 LETJ=0
20 LETJ=J+1
21 LETT(R,J)=0
22 LETS(R,J)=0
23 IFJ<6THEN20
24 IFR<6THEN12
25 LETI=0
27 LETJ=0
28 LETJ=J+1
29 LETV(I,J)=1E37
30 IFJ<61THEN28
31 LETI=I+1
32 IFI>9THEN27
33 LETL=0
40 LETI=0
50 LETI=I+1
60 READV(0,I)
70 IFV(0,I)<>1E37THEN50
80 LETP=I-1
100 GOTO2000
109 DATA 1E37
110 LETU(1)=0
120 LETU(2)=0
130 LETU(3)=0
140 LETU(4)=0
150 LETU(5)=0
160 LETU(6)=0
170 FORJ=6TO1STEP-1
171 IFU(J)=1THEN173
172 NEXTJ
173 LETQ=J
174 FORK=1TOQ
175 FORI=1TOP
176 READV(K,I)
177 NEXTI
178 NEXTK
179 FORI=1TOP
181 LETX1=V(1,I)
182 LETX2=V(2,I)
183 LETX3=V(3,I)
184 LETX4=V(4,I)
185 LETX5=V(5,I)
186 LETX6=V(6,I)
187 GOSUB210
191 LETV(1,I)=W1
192 LETV(2,I)=W2
193 LETV(3,I)=W3
194 LETV(4,I)=W4
195 LETV(5,I)=W5
196 LETV(6,I)=W6
197 NEXTI
200 LETL=1
201 READM
202 IFL<>1THEN205
203 LETN=Q
204 GOTO435
205 LETN=M
206 GOTO435
210 LETW1=X1
220 LETW2=X2
230 LETW3=X3
240 LETW4=X4
250 LETW5=X5
260 LETW6=X6
270 RETURN
435 IFP>NTHEN455
440 PRINT"*** THE NUMBER OF OBSERVATIONS MUST EQUAL OR EXCEED THE"
445 PRINT" NUMBER OF VARIABLES."
450 GOTO5000
455 FORI=1TON
460 FORJ=1TOP
465 IFV(I,J)<>0THEN490
470 NEXTJ
475 LETI=I+1
480 PRINT"*** ALL OBSERVATIONS OF VARIABLE ";I;" ARE ZERO"
485 GOTO5000
490 NEXTI
495 FORI=0TON
500 LETF(I)=0
505 FORJ=0TON
510 LETS(I,J)=0
515 NEXTJ
520 NEXTI
525 FORK=1TOP
530 FORI=0TON
535 LETF(I)=F(I)+V(I,K)/P
540 FORJ=0TON
545 LETS(I,J)=S(I,J)+V(I,K)*V(J,K)
550 NEXTJ
555 NEXTI
560 NEXTK
565 FORI=0TON
570 FORJ=0TON
575 LETT(I,J)=S(I,J)-P*F(I)*F(J)
580 NEXTJ
585 NEXTI
590 FORJ=0TON
595 LETG(J)=SQR(T(J,J)/P)
600 NEXTJ
610 GOSUB1000
620 FORI=1TON
625 LETB(I)=0
630 FORJ=1TON
635 LETB(I)=B(I)+T(0,J)*T(I,J)
640 NEXTJ
645 NEXTI
650 LETA1=F(0)
655 LETW5=0
660 FORI=1TON
665 LETA1=A1-B(I)*F(I)
670 NEXTI
675 FORI=1TOP
680 LETV(7,I)=A1
685 FORJ=1TON
690 LETV(7,I)=V(7,I)+B(J)*V(J,I)
693 NEXTJ
695 LETV(8,I)=V(7,I)-V(0,I)
700 LETV(9,I)=100*V(8,I)/V(7,I)
705 LETW5=W5+V(8,I)^2
710 NEXTI
715 IF(P-N-1)<>0THEN745
720 LETW2=0
725 LETS2=0
730 LETW3=1
735 LETR2=1
740 GOTO795
745 LETW4=W5/(P-N-1)
750 LETW1=T(0,0)/(P-1)
755 IFW4>=W1THEN770
760 LETW4=W4
765 GOTO775
770 LETW4=W1
775 LETR2=1-W4/W1
780 LETW3=1-W5/T(0,0)
785 LETS2=SQR(W4)
790 LETW2=SQR(W5/P)
795 PRINT
800 PRINT
805 FORJ=1TON
810 LETH(J)=B(J)*(G(J)/G(0))
815 NEXTJ
820 PRINT" M U L T I P L E R E G R E S S I O N A N A L Y S I S"
825 PRINT
830 PRINT
835 PRINT"VARIABLE","REGR COEFF","BETA COEFF","MEAN VALUE","STD DEV"
840 PRINT
845 PRINT" 0 (DEP VAR)",A1;"(= CONSTANT)",F(0),G(0)
850 PRINT
855 FORI=1TON
860 PRINTI,B(I),H(I),F(I),G(I)
863 NEXTI
865 PRINT
870 PRINT" UNADJUSTED STD ERROR OF ESTIMATE =";W2
875 PRINT" STD ERROR (ADJUSTED FOR D.F.) =";S2
880 PRINT
885 PRINT" UNADJUSTED INDEX OF DETERMINATION =";W3
890 PRINT" INDEX (ADJUSTED FOR D.F.) =";R2
895 PRINT
900 PRINT
905 PRINT" (NOW TYPE '7' FOR ACTUAL VERSUS CALCULATED VALUES OF"
910 PRINT" THE DEPENDENT VARIABLE, OR '3' TO STOP.) WHICH ";
915 INPUTQ
920 IFQ<>7THEN5000
925 PRINT
930 PRINT
935 PRINT"Y-ACTUAL","Y-CALCULATED","DIFFERENCE","PCT. DIFF."
940 PRINT
945 FORI=1TOP
950 PRINTV(0,I),V(7,I),V(8,I),V(9,I)
955 NEXTI
960 GOTO5000
1000 FORK=1TON
1010 FORJ=1TON
1030 IFJ=KTHEN1050
1040 LETT(K,J)=T(K,J)/T(K,K)
1050 NEXTJ
1060 LETT(K,K)=1/T(K,K)
1070 FORI=1TON
1080 IFI=KTHEN1140
1090 FORJ=1TON
1100 IFJ=KTHEN1120
1110 LETT(I,J)=T(I,J)-T(I,K)*T(K,J)
1120 NEXTJ
1130 LETT(I,K)=-(T(I,K)*T(K,K))
1140 NEXTI
1150 NEXTK
1160 RETURN
2000 PRINT
2100 PRINT"LIST 'MULTEX*' FOR INSTRUCTIONS ON USING THIS PROGRAM"
4999 DATA 0
5000 END