* G04BBF Example Program Text * Mark 16 Release. NAG Copyright 1992. * .. Parameters .. INTEGER NIN, NOUT PARAMETER (NIN=5,NOUT=6) INTEGER NMAX, NTMAX, NBMAX, TMAX, LDTABL, LDC PARAMETER (NMAX=30,NTMAX=6,NBMAX=10,TMAX=4,LDTABL=TMAX, + LDC=NTMAX) * .. Local Scalars .. DOUBLE PRECISION GMEAN, TOL INTEGER I, IBLOCK, IFAIL, IRDF, J, N, NT * .. Local Arrays .. DOUBLE PRECISION BMEAN(NBMAX), C(LDC,NTMAX), EF(NTMAX), R(NMAX), + TABL(LDTABL,5), TMEAN(NTMAX), + WK(NTMAX*NTMAX+NTMAX), Y(NMAX) INTEGER IREP(NTMAX), IT(NMAX) * .. External Subroutines .. EXTERNAL G04BBF * .. Executable Statements .. WRITE (NOUT,*) 'G04BBF Example Program Results' * Skip heading in data file READ (NIN,*) READ (NIN,*) N, NT, IBLOCK IF (N.LE.NMAX) THEN READ (NIN,*) (Y(I),I=1,N) READ (NIN,*) (IT(I),I=1,N) TOL = 0.000005D0 IRDF = 0 IFAIL = -1 * CALL G04BBF(N,Y,IBLOCK,NT,IT,GMEAN,BMEAN,TMEAN,TABL,LDTABL,C, + LDC,IREP,R,EF,TOL,IRDF,WK,IFAIL) * IF (IFAIL.LT.0) GO TO 40 WRITE (NOUT,*) WRITE (NOUT,*) ' ANOVA table' WRITE (NOUT,*) WRITE (NOUT,*) + ' Source df SS MS F', + ' Prob' WRITE (NOUT,*) WRITE (NOUT,99998) ' Blocks ', (TABL(1,J),J=1,5) WRITE (NOUT,99998) ' Treatments ', (TABL(2,J),J=1,5) WRITE (NOUT,99998) ' Residual ', (TABL(3,J),J=1,3) WRITE (NOUT,99998) ' Total ', (TABL(4,J),J=1,2) WRITE (NOUT,*) WRITE (NOUT,*) ' Efficiency Factors' WRITE (NOUT,*) WRITE (NOUT,99999) (EF(I),I=1,NT) WRITE (NOUT,*) WRITE (NOUT,99997) ' Grand Mean', GMEAN WRITE (NOUT,*) WRITE (NOUT,*) ' Treatment Means' WRITE (NOUT,*) WRITE (NOUT,99999) (TMEAN(I),I=1,NT) WRITE (NOUT,*) WRITE (NOUT,*) ' Standard errors of differences between means' WRITE (NOUT,*) DO 20 I = 2, NT WRITE (NOUT,99999) (C(I,J),J=1,I-1) 20 CONTINUE END IF 40 CONTINUE * 99999 FORMAT (8F10.2) 99998 FORMAT (A,3X,F3.0,2X,3(F10.2,2X),F9.4) 99997 FORMAT (A,F10.2) END