1! Program GEN2A.BAS Version 1 June, 1976
This is the data generator for Unit 2A: One-way ANOVA, Response Bias
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 N=5:A=3:M=2.5
115 &:INPUT"WHAT IS YOUR NAME";Z1$
120 Z1$=Z1$+".XDS"
125 OPEN Z1$ AS FILE 1
130 Q=12
135 DIM #1, A2(32),A2$(2)
140 DIM A(19),D(6,6),A1(6)
145 A2(0)=13: A2$(1)="2A"
150 A2$(0)=""
155 GOTO 500
160 A2(I)=A(I) FOR I=1 TO Q
165 CLOSE 1
170 CHAIN "INTXLG"
500 READ A1(J) FOR J=1 TO A
502 DATA -1,0,1
505 FOR I=1 TO N: FOR J=1 TO A
507 X=0
510 X=X+RND FOR L=1 TO 12
520 X=INT(X+M+A1(J)-6)
530 IF X>5 OR X<1 THEN 510
535 D(I,J)=X
540 NEXT J:NEXT I
550 FOR I=1 TO N:FOR J=1 TO A
560 A(1)=A(1)+D(I,J):A(2)=A(2)+D(I,J)^2
570 NEXT J:NEXT I
580 A(1)=A(1)^2/N/A
590 A(3)=A(2)-A(1)
600 MAT A1=ZER
605 FOR I=1 TO N: FOR J=1 TO A
610 A1(J)=A1(J)+D(I,J)
620 NEXT J: NEXT I
630 A(4)=A(4)+A1(J)^2 FOR J=1 TO A
635 A(4)=A(4)/N
640 A(5)=A(4)-A(1)
645 A(6)=A(3)-A(5)
650 A(7)=A*N-1: A(8)=A-1: A(9)=A*(N-1)
655 A(10)=A(5)/A(8): A(11)=A(6)/A(9)
660 A(12)=A(10)/A(11)
680 &"ONE-WAY ANALYSIS OF VARIANCE (ANOVA)
690 PRINT: PRINT,,"DATA"
695 PRINT,"A1","A2","A3"
700 FOR I=1 TO 5
710 &,D(I,1),D(I,2),D(I,3)
720 NEXT I
998 GOTO 160
999 END