Program g08dafe ! G08DAF Example Program Text ! Mark 24 Release. NAG Copyright 2012. ! .. Use Statements .. Use nag_library, Only: g08daf, nag_wp ! .. Implicit None Statement .. Implicit None ! .. Parameters .. Integer, Parameter :: nin = 5, nout = 6 ! .. Local Scalars .. Real (Kind=nag_wp) :: p, w Integer :: i, ifail, k, ldx, n ! .. Local Arrays .. Real (Kind=nag_wp), Allocatable :: rnk(:,:), x(:,:) ! .. Executable Statements .. Write (nout,*) 'G08DAF Example Program Results' Write (nout,*) ! Skip heading in data file Read (nin,*) ! Read in the problem size Read (nin,*) k, n ldx = k Allocate (x(ldx,n),rnk(ldx,n)) ! Read in data Read (nin,*)(x(i,1:n),i=1,k) ! Display title Write (nout,*) 'Kendall''s coefficient of concordance' Write (nout,*) ! Display data Write (nout,*) 'Data values' Write (nout,*) Write (nout,99999)('Comparison ',i,' scores ',x(i,1:n),i=1,k) ifail = 0 Call g08daf(x,ldx,k,n,rnk,w,p,ifail) ! Display results Write (nout,*) Write (nout,99998) 'Kendall''s coefficient =', w Write (nout,99998) ' Significance =', p 99999 Format (1X,A,I1,A,10F5.1) 99998 Format (1X,A,F8.3) End Program g08dafe