1! Program GEN6A.BAS Version 1 June, 1976 This is the data generator for Unit 6A: Mixed Within & Between, Risky 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=3: B=2: N=4 115 &:INPUT"WHAT IS YOUR NAME";Z1$ 120 Z1$=Z1$+".XDS" 125 OPEN Z1$ AS FILE 1 130 Q=13 135 DIM #1, A2(16),A2$(2) 140 DIM A(13),D(9,4),T(9),S(4),N(4,3),A1(3),B(3),I(3,3) 145 A2(0)=13: A2$(1)="6A" 150 A2$(0)="" 155 GOTO 500 160 A2(I)=A(I) FOR I=1 TO Q 165 CLOSE 1 170 CHAIN "INTXSM" 500 READ A1(J) FOR J=1 TO A 502 READ B(K) FOR K=1 TO B 504 FOR J=1 TO A:FOR K=1 TO B 506 READ I(J,K):NEXT K:NEXT J 508 DATA 0,0,0,0,0,.5,.5,.5,.3,.5,.3 510 FOR J=1 TO A: FOR K=1 TO B: FOR I=1 TO N 515 Z=A1(J)+B(K)+I(J,K) 520 X=0 525 FOR L=1 TO 9 530 IF RND>Z THEN 540 535 X=X+1 540 NEXT L 545 X=INT(X) 547 IF X>9 OR X<1 THEN 520 550 D(B*(J-1)+K,I)=X 555 NEXT I:NEXT K:NEXT J 557 MAT A1=ZER: MAT B=ZER: MAT I=ZER 560 FOR J=1TO A: FOR K=1 TO B: FOR I=1 TO N 565 X=D(B*(J-1)+K,I) 570 T=T+X:T2=T2+X^2 580 N(I,J)=N(I,J)+X:A1(J)=A1(J)+X 590 B(K)=B(K)+X:I(J,K)=I(J,K)+X 600 NEXT I:NEXT K:NEXT J 610 C=T^2/A/B/N:A(1)=C 620 A(2)=T2-C:X=0 630 FOR I=1 TO N: FOR J=1 TO A 640 X=X+N(I,J)^2 650 NEXT J:NEXT I 660 A(3)=X/B-C:X=0 670 X=X+A1(J)^2 FOR J=1 TO A 680 A(4)=X/N/B-C 690 A(5)=A(3)-A(4) 700 A(6)=A(2)-A(3) 705 X=0 710 X=X+B(K)^2 FOR K=1 TO B 720 A(7)=X/N/A-C:X=0 730 FOR J=1 TO A: FOR K=1 TO B 740 X=X+I(J,K)^2 750 NEXT K:NEXT J 760 A(8)=X/N-C-A(4)-A(7) 770 A(9)=A(6)-A(7)-A(8) 775 Z1=A(4)/(A-1) 780 Z2=A(5)/A/(N-1) 785 A(10)=Z1/Z2 790 E=A(9)/A/(N-1)/(B-1) 800 A(11)=A(7)/E 810 A(12)=A(8)/(A-1)/(B-1)/E 820 A(13)=1 880 PRINT 890 &,,"PRETEST","POSTTEST" 895 &:&,,"B1","B2":& 900 FOR J=1 TO A: FOR I=1 TO N 910 PRINT"A";J,"SUBJECT";4*(J-1)+I,D(B*(J-1)+1,I),D(B*(J-1)+2,I) 920 NEXT I:& 930 NEXT J 9998 GOTO 160 9999 END