* G11SAF Example Program Text * Mark 14 Revised. NAG Copyright 1989. * .. Parameters .. INTEGER NIN, NOUT PARAMETER (NIN=5,NOUT=6) INTEGER IPMAX, LDCM, NSMAX, LDEXPP, LW, LDX PARAMETER (IPMAX=10,LDCM=2*IPMAX,NSMAX=1024,LDEXPP=IPMAX, + LW=4*IPMAX*(IPMAX+16),LDX=NSMAX) * .. Local Scalars .. DOUBLE PRECISION CGETOL, CHI, RLOGL, SIGLEV INTEGER I, IDF, IFAIL, IP, IPRINT, ISHOW, J, MAXIT, N, + NITER, NS, OUTCHN LOGICAL CHISQR, GPROB * .. Local Arrays .. DOUBLE PRECISION A(IPMAX), ALPHA(IPMAX), C(IPMAX), + CM(LDCM,2*IPMAX), EXF(NSMAX), EXPP(LDEXPP,IPMAX), + G(2*IPMAX), OBS(LDEXPP,IPMAX), PIGAM(IPMAX), + W(LW), XL(NSMAX), Y(NSMAX) INTEGER IOB(NSMAX), IRL(NSMAX) LOGICAL X(LDX,IPMAX) * .. External Subroutines .. EXTERNAL G11SAF, X04ABF * .. Executable Statements .. WRITE (NOUT,*) 'G11SAF Example Program Results' OUTCHN = NOUT * Skip heading in data file READ (NIN,*) READ (NIN,*) IP, N, NS CALL X04ABF(1,OUTCHN) IF (IP.GT.0 .AND. IP.LE.IPMAX .AND. NS.GE.0 .AND. NS.LE.NSMAX) + THEN DO 20 I = 1, NS READ (NIN,*) IRL(I), (X(I,J),J=1,IP) 20 CONTINUE GPROB = .FALSE. DO 40 I = 1, IP A(I) = 0.5D0 C(I) = 0.0D0 40 CONTINUE * ** Set IPRINT > 0 to obtain intermediate output ** IPRINT = -1 CGETOL = 0.0001D0 MAXIT = 1000 CHISQR = .TRUE. ISHOW = 7 IFAIL = -1 * CALL G11SAF(IP,N,GPROB,NS,X,LDX,IRL,A,C,IPRINT,CGETOL,MAXIT, + CHISQR,ISHOW,NITER,ALPHA,PIGAM,CM,LDCM,G,EXPP, + LDEXPP,OBS,EXF,Y,XL,IOB,RLOGL,CHI,IDF,SIGLEV,W,LW, + IFAIL) * END IF END