1 '*********************************************************************
3 '***********  mosier.BAS  ********************************************
5 '*********************************************************************
6  ' ---------------05-01-90---------------------------------------------------
7  ' ---------------------------------------------------------------------------
8   PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT
27 DIM A(46,13),HEADER$(20),SNAME$(20),N(20,20),NN(20,20),AVN(20,20)
93   OPEN "I",#1,"MOSIER.IN"
94   OPEN "O",#2,"MOSIER.OUT"
95   OPEN "O",#3,"JUNK.OUT"
100  INPUT #1,TITLE$
200  INPUT #1,NCOL,NSCALES
220  FOR I=1 TO NSCALES
230  INPUT #1,SNAME$(I)
250  NEXT I
295  II=0:I=0
300  II=II+1
400  INPUT #1,HEADER$:IF HEADER$="-" THEN GOTO 850
500  FOR I=1 TO 3
550  ISTART=1+(I-1)*NCOL
570  IF ISTART>1 THEN ISTART=ISTART-1
600  N(II,I)=VAL(MID$(HEADER$,ISTART,NCOL))
610  PRINT #3,"ISTART NCOL ";ISTART,NCOL:PRINT #3,HEADER$
620  PRINT #3,"N(II,I) II I=  ";N(II,I),II,I
700  NEXT I
800  GOTO 300
850  II=0
855  INPUT #1,HEADER$:PRINT "HEADER=";HEADER$:IF HEADER$="-" THEN GOTO 900
860  II=II+1:PRINT "II=";II
870  FOR I=1 TO II
872  ISTART=1+(I-1)*NCOL
874  IF ISTART>1 THEN ISTART=ISTART-1
876  NN(II,I)=VAL(MID$(HEADER$,ISTART,NCOL))
878  NEXT I
880  GOTO 855
900 PRINT #2,"RELIABILITY OF COMPOSITE FROM MOSIER'S FORMULA":
910 PRINT #2,"            BY Ron D. Hays"
920 PRINT #2,"                 RAND     ":PRINT #2," ":
930  PRINT #2,TITLE$
940  PRINT #2,"-------------------------------------------------------------------------------"
950  PRINT #2," WEIGHT     SD    ALPHA   SCALE"
951  PRINT #2,"-------------------------------------------------------------------------------":ILINE=15+2*NSCALES
952   IF NCOL<9 THEN NCL=9:ELSE NCL=NCOL+1
959  FOR II=1 TO NSCALES
960  FOR I=1 TO 3
961   PRINT #2,USING "##.#### ";N(II,I);
962   IF I< 3 THEN GOTO 964
963   PRINT #2,USING " &";SNAME$(II);:PRINT #2, " "
964   NEXT I
965   NEXT II
968   III=1
969   PRINT #2," "
970   PRINT #2,"CORRELATIONS AMONG SCALES"
971  PRINT #2,"-------------------------------------------------------------------------------":ILINE=15+2*NSCALES
972  FOR II=1 TO NSCALES
973  FOR I=1 TO II
974   PRINT #2,USING "##.#####  ##  ##";NN(II,I);
980   NEXT I
982   PRINT #2," "
984   NEXT II
1000  FOR II=1 TO NSCALES
1010  N1=(N(II,1)*N(II,1)*N(II,2)*N(II,2))+N1
1022  N2=(N(II,1)*N(II,1)*N(II,2)*N(II,2)*N(II,3))+N2
1030  NEXT II
1040  FOR II=1 TO NSCALES-1
1050  FOR I=II+1 TO NSCALES
1060  D2=(N(II,1)*N(I,1)*N(II,2)*N(I,2)*NN(I,II))+D2
1070  NEXT I
1080  NEXT II
1090  RATIO=(N1-N2)/(N1+(2*D2))
1100  RELY=1-RATIO
1120  PRINT #2,"-------------------------------------------------------------------------------":ILINE=15+2*NSCALES
1130  PRINT #2,USING "RELIABILITY OF COMPOSITE SCALE = #.###";RELY
1122  PRINT #2," "
3000 CLOSE
3999 SYSTEM