* G01DDF Example Program Text * Mark 14 Revised. NAG Copyright 1989. * .. Parameters .. INTEGER NMAX PARAMETER (NMAX=20) INTEGER NIN, NOUT PARAMETER (NIN=5,NOUT=6) * .. Local Scalars .. DOUBLE PRECISION PW, W INTEGER I, IFAIL, J, N LOGICAL CALWTS * .. Local Arrays .. DOUBLE PRECISION A(NMAX), X(NMAX) * .. External Subroutines .. EXTERNAL G01DDF, M01CAF * .. Executable Statements .. WRITE (NOUT,*) 'G01DDF Example Program Results' * Skip heading in data file READ (NIN,*) CALWTS = .TRUE. READ (NIN,*) N IF (N.GT.0 .AND. N.LE.NMAX) THEN DO 20 J = 1, 2 READ (NIN,*) (X(I),I=1,N) IFAIL = 1 * CALL M01CAF(X,1,N,'A',IFAIL) * IF (IFAIL.NE.0) THEN WRITE (NOUT,*) WRITE (NOUT,99999) ' ** M01CAF returned with IFAIL = ', + IFAIL GO TO 40 END IF * IFAIL = 1 * CALL G01DDF(X,N,CALWTS,A,W,PW,IFAIL) * IF (IFAIL.NE.0) THEN WRITE (NOUT,*) WRITE (NOUT,99999) ' ** G01DDF returned with IFAIL = ', + IFAIL GO TO 40 END IF * WRITE (NOUT,*) WRITE (NOUT,99998) 'For sample number ', J, + ', value of W statistic = ', W WRITE (NOUT,99997) + ' Significance level is ', PW CALWTS = .FALSE. 20 CONTINUE END IF 40 CONTINUE * 99999 FORMAT (1X,A,I5) 99998 FORMAT (1X,A,I1,A,F7.4) 99997 FORMAT (1X,A,F8.4) END