Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50144/twoway.bas
There are 2 other files named twoway.bas in the archive. Click here to see a list.
00010	DIMV(72,12),T(13,13)
00020	PRINT
00040	READI1,I2,I3
00100	GO TO 850
00110	LETD1=I2-1
00112	LETD2=I1-1
00114	LETD3=D1*D2
00116	LETM=I3*I1
00118	LETN=I3*I2
00120	IFI1>12THEN990
00122	IFN>72THEN990
00124	LETD4=I2*I1-1
00126	LETD5=I2*I1*(I3-1)
00128	LETD6=I2*M-1
00130	LETD7=M-I1
00132	LETT1=0.
00134	LETT2=0.
00136	LETT3=0.
00138	LETG=0.
00140	LETS1=0.
00142	FORI=1TO13
00144	FORJ=1TO13
00146	LETT(I,J)=0.
00148	NEXTJ
00150	NEXTI
00152	FORI=1TOI2
00154	FORJ=1TOI1
00156	LETL=(I-1)*I3+1
00158	LETL1=L+I3-1
00160	FORK=LTOL1
00162	READV(K,J)
00200	DATA 174.0,173.0,173.5,173.0,172.0,173.
00201	DATA 171.5,171.0,173.0,173.5,171.0,172.5
00300	LETT(I,J)=T(I,J)+V(K,J)
00310	LETG=G+V(K,J)
00320	LETS1=S1+V(K,J)^2
00330	NEXTK
00340	LETT(I,13)=T(I,13)+T(I,J)
00350	LETT(13,J)=T(13,J)+T(I,J)
00360	LETT1=T1+T(I,J)^2
00370	NEXTJ
00380	NEXTI
00390	LETF=G^2/(D6+1)
00400	LETS2=S1-F
00410	LETS3=T1/I3-F
00420	FORI=1TOI2
00430	LETT2=T2+T(I,13)^2
00440	NEXTI
00450	FORJ=1TOI1
00460	LETT3=T3+T(13,J)^2
00470	NEXTJ
00480	LETS3=T1/I3-F
00490	LETS4=T2/M-F
00500	LETS5=T3/N-F
00510	LETS6=S3-S4-S5
00520	LETS7=S2-S3
00530	PRINT
00540	PRINT"A  N  A  L  Y  S  I  S     O  F     V  A  R  I  A  N  C  E"
00550	PRINT
00560	PRINT
00570	PRINT"  SOURCE","SUM SQUARES"," DF","MEAN SQUARE","F-RATIO"
00580	PRINT
00590	IFI3=1THEN750
00600	IFI2=1THEN810
00610	PRINT"ROW MEANS",S4,D1,S4/D1
00620	PRINT
00630	PRINT"COLUMN MEANS",S5,D2,S5/D2
00640	PRINT
00650	PRINT"INTERACTION",S6,D3,S6/D3
00660	PRINT
00670	PRINT"  SUB-TOTAL",S3,D4
00680	PRINT
00690	PRINT"RESIDUAL",S7,D5,S7/D5
00700	PRINT
00710	PRINT"      TOTAL",S2,D6
00720	PRINT
00730	PRINT
00740	GOTO1000
00750	PRINT"ROW MEANS",S4,D1,S4/D1,S4*D2/S6
00760	PRINT
00770	PRINT"COLUMN MEANS",S5,D2,S5/D2,S5*D1/S6
00780	PRINT
00790	PRINT"RESIDUAL",S6,D3,S6/D3
00800	GOTO710
00810	PRINT"COLUMN MEANS",S5,D2,S5/D2,S5*D7/(S7*D2)
00820	PRINT
00830	PRINT"WITHIN COLUMNS",S7,D7,S7/D7
00835	PRINT
00840	GOTO710
00850	PRINT
00851	PRINT"THIS PROGRAM CALCULATES AN ANALYSIS OF VARIANCE FOR 1-WAY OR"
00852	PRINT"2-WAY CLASSIFICATIONS, WITH REPLICATION OF EACH CELL IF PRESENT."
00853	PRINT"TO USE, TYPE THE FOLLOWING:"
00854	PRINT
00855	PRINT"   100 DATA COLS,ROWS,REPS"
00856	PRINT"            (COLS = NUMBER OF COLUMN CLASSES, 12 OR LESS."
00857	PRINT"             ROWS = NUMBER OF ROW CLASSES, 12 OR LESS.  LET"
00858	PRINT"                    ROWS=1 FOR A 1-WAY CLASSIFICATION."
00859	PRINT"             REPS = NUMBER OF REPLICATIONS PER CELL, NOT TO"
00860	PRINT"                    EXCEED 72 DIVIDED BY THE NUMBER OF ROWS.)"
00865	PRINT
00870	PRINT"   200 DATA THE TABLE ENTRIES"
00875	PRINT"            (CONTINUE ON LINES 201-299 AS NEEDED.  THE INPUT"
00880	PRINT"             IS SUPPLIED IN THE FOLLOWING ORDER:  ALL REPS FOR"
00885	PRINT"             COL1,ROW1, THEN ALL REPS FOR COL2,ROW1 AND SO ON"
00890	PRINT"             FOR ALL COLUMN CLASSES, THEN THE SAME FOR ROW2,"
00895	PRINT"             ROW3, AND SO ON UNTIL ALL ENTRIES HAVE BEEN GIVEN.)"
00900	PRINT
00905	PRINT"THEN TYPE 'RUN'."
00907	GOTO1000
00990	PRINT
00991	PRINT
00992	PRINT"TABLE SUPPLIED IS TOO LARGE.  MUST HAVE COLS<13 AND"
00995	PRINT"ROWS*REPS<73.  YOU WILL NEED A LARGER PROGRAM."
01000	END