1! Program GEN9A.BAS Version 1 June, 1976
This is the data generator for Unit 9A: Latin Square, Solution Shifts
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 RANDOM
110 N=4:A=3:B=3:C=3
115 &:INPUT"WHAT IS YOUR NAME";Z1$
120 Z1$=Z1$+".XDS"
125 OPEN Z1$ AS FILE 1
130 Q=12
135 DIM #1,A2(16),A2$(2)
140 DIM A(12),D(9,4),X(3),Y(3),Z(3),B(9),I(3,3),T1(3),T2(3)
145 A2(0)=12:A2$(1)="9A"
150 A2$(0)=""
155 GOTO 500
160 A2(I)=A(I) FOR I=1 TO Q
165 CLOSE 1
170 CHAIN "INTXSM"
500 MAT READ I
510 DATA 1,2,3,2,3,1,3,1,2
512 FOR J=1 TO A: FOR K=1 TO A
514 READ P(J,K)
516 NEXT K: NEXT J
518 DATA 5,8,8,3,6,6,2,4,4
530 FOR I=1 TO N:FOR J=1 TO A:FOR K=1 TO B
540 X=0
550 X=X+RND FOR Y=1 TO 12
560 X=INT((X-6)*2+P(J,K))
565 IF X<1 THEN 540
570 D(B*(J-1)+K,I)=X
580 B(B*(J-1)+K)=B(B*(J-1)+K)+X
590 T=T+X
600 T2=T2+X^2
610 X(J)=X(J)+X
620 Y(K)=Y(K)+X
630 Z(I(J,K))=Z(I(J,K))+X
640 NEXT K:NEXT J:NEXT I
650 A(1)=T^2/N/A/B
660 A(2)=T2-A(1)
670 X=0:Y=0:Z=0
680 FOR J=1 TO A
690 X=X+X(J)^2
700 Y=Y+Y(J)^2
710 Z=Z+Z(J)^2
720 NEXT J
730 A(3)=X/N/A-A(1)
740 A(4)=Y/N/A-A(1)
750 A(5)=Z/N/A-A(1)
760 X=0
770 X=X+B(J)^2 FOR J=1 TO A*B
780 A(6)=X/N-A(3)-A(4)-A(5)-A(1)
790 A(7)=A(2)-A(3)-A(4)-A(5)-A(6)
800 E=A(7)/A/A/(N-1)
810 A(8)=A(3)/(A-1)/E
820 A(9)=A(4)/(A-1)/E
830 A(10)=A(5)/(A-1)/E
840 A(11)=A(6)/(A-1)/(A-2)/E
850 A(12)=1
860 &:&"LATIN SQUARE":&
900 &,"B 1","B 2","B 3"
905 &
910 FOR J=1 TO 3
920 &"A";J,
930 FOR K=1 TO 3
940 &"C";I(J,K),
950 NEXT K
955 &
960 FOR I=1 TO 4
970 &,D(3*(J-1)+1,I),D(3*(J-1)+2,I),D(3*(J-1)+3,I)
980 NEXT I:&:NEXT J
990 &:&
9998 GOTO 160
9999 END