1! Program GEN3B.BAS Version 1 June, 1976 This is the data generator for Unit 3B: Two-way ANOVA, Anticipatory 2! Department of Psychology Lawrence University Appleton, Wisconsin, 54911 (414) 739-3681, Ext. 464 3! Copyright (C) 1975, 1976 by Francis Campos. General permission to copy or modify, but not for profit, all or part of this document or the software described herein is hereby 4! granted, provided that this copyright notice is given, and reference is made to the fact that reproduction privileges were granted by permission of Francis Campos, Lawrence University. 5! Although every effort has been made to insure the accuracy and usefulness of this document and the software described herein, neither the author(s), Lawrence University, nor its funding 6! sources make any warranty, expressed or implied, with respect to the performance or features of same on equipment which Lawrence neither owns nor controls. 7! This program is one of the twenty-one BASIC-PLUS programs and eighteen virtual core files that comprise the CASANOVA package for Computer ASsisted instruction in ANalysis Of 8! VAriance. The package is coded for use on a PDP 11/40, 45 or 70 computer operating under RSTS/E, V6A-02. Those who wish to adapt the package to other systems and/or programming languages are 9! urged to consult the BASIC-PLUS Language Manual, published by the Digital Equipment Corporation, Maynard, Massachusetts, 01754, as well as the Instructor's Manual for CASANOVA, provided by Lawrence. 105 RANDOMIZE 110 A=2: B=2: N=5: M=0 115 &:INPUT"WHAT IS YOUR NAME";Z1$ 120 Z1$=Z1$+".XDS" 125 OPEN Z1$ AS FILE 1 130 Q=19 135 DIM #1, A2(32),A2$(2) 140 DIM A(19),D(4,6),I(2,2),A1(2),B(2) 145 A2(0)=19:A2$(1)="3A" 150 A2$(0)="" 155 GOTO 500 160 A2(I)=A(I) FOR I=1 TO Q 165 CLOSE 1 170 CHAIN "INTXLG" 500 A1(1)=0:A1(2)=0:B(1)=0:B(2)=0 510 FOR I=1 TO A:FOR J=1 TO B 520 READ I(I,J):NEXT J:NEXT I 530 DATA 4.6,4.3,7.2,7.8 540 FOR I=1 TO A*B:FOR J=1 TO N:FOR L=1 TO 12 545 D(I,J)=D(I,J)+RND 550 NEXT L 555 D(I,J)=(D(I,J)-4)/4 557 NEXT J: NEXT I 560 FOR I=1 TO N:FOR J=1 TO A:FOR K=1 TO B 570 D(B*(J-1)+K,I)=INT(10*D(B*(J-1)+K,I)+I(J,K))/10 580 NEXT K:NEXT J:NEXT I 585 PRINT 587 PRINT,"TWO WAY COMPLETELY RANDOMIZED ANOVA" 590 PRINT" RUNNING SPEED IN FEET/SECOND" 595 PRINT:PRINT,"A1 B1","A1 B2" 600 FOR I=1 TO N 610 PRINT,D(1,I),D(2,I) 615 NEXT I 620 PRINT:PRINT,"A2 B1","A2 B2" 630 FOR I=1 TO N 640 PRINT,D(3,I),D(4,I) 650 NEXT I 700 MAT I=ZER:MAT A1=ZER 710 FOR J=1 TO A:FOR K=1 TO B:FOR I=1 TO N 720 I(J,K)=I(J,K)+D(B*(J-1)+K,I) 730 S=S+D(B*(J-1)+K,I)^2 735 NEXT I 740 C=C+I(J,K):NEXT K:NEXT J 750 A(1)=C^2/A/B/N 760 A(2)=S 770 A(3)=A(2)-A(1) 780 FOR J=1 TO A:FOR K=1 TO B 790 B(K)=B(K)+I(J,K) 800 A1(J)=A1(J)+I(J,K) 810 NEXT K:NEXT J 820 A(4)=A(4)+A1(J)^2/A/N FOR J=1 TO A 830 A(5)=A(4)-A(1) 840 A(6)=A(6)+B(K)^2/A/N FOR K=1 TO B 850 A(7)=A(6)-A(1) 860 FOR J=1 TO A:FOR K=1 TO B 870 A(8)=A(8)+I(J,K)^2/N 880 NEXT K:NEXT J 890 A(9)=A(8)-A(1)-A(5)-A(7) 900 A(10)=A(3)-A(5)-A(7)-A(9) 910 A(11)=A*B*N-1 920 A(12)=A(5)/(A-1) 930 A(13)=A(7)/(B-1) 940 A(14)=A(9)/(A-1)/(B-1) 950 A(15)=A(10)/A/B/(N-1) 960 A(16)=A(12)/A(15) 970 A(17)=A(13)/A(15) 980 A(18)=A(14)/A(15) 990 A(19)=1 9998 GOTO 160 9999 END