EPA-670/4-75-004b April 1975 FORTRAN PROGRAMS FOR ANALYZING COLLABORATIVE TEST DATA PART II: SCATTER DIAGRAMS By Elmo C. Julian METHODS DEVELOPMENT AND QUALITY ASSURANCE LABORATORY Program Element No. 1HA327 NATIONAL ENVIRONMENTAL RESEARCH CENTER OFFICE OF RESEARCH AND DEVELOPMENT U.S. ENVIRONMENTAL PROTECTION AGENCY CINCINNATI, OHIO 45268 ------- REVIEW NOTICE The National Environmental Research CenterCincinnati ha reviewed this report and approved its publication. Mention of trade names or commercial products does not constitute endorsement 01 recommendation for use. i i ------- FOREWORD Man and his environment must be protected from the adverse effects of pesticides, radiation, noise and other forms of pollution, and the unwise management of solid waste. Efforts to protect the environment require a focus that recognizes the interplay between the components of our physical environmentair, water, and land. The National Environment Research Centers provide this multidisciplinary focus through programs engaged in studies on the effects of environmental contaminants on man and the biosphere, and a search for ways to prevent contamination and to recycle valuable resources. This work provides a method for understanding the deeper meaning of interlaboratory collaborations. This work also represents one effort to achieve a more complete knowledge of the effectiveness of various analytical methods. A. W. Breidenbach, Ph.D. Director National Environmental Research Center, Cincinnati i i i ------- ABSTRACT A FORTRAN program for IBM 1130 designed to plot three pairs of data sets in three scatter diagram on one page is described. These data stem from inter]aboratory studies of chemical analytical methods. I V ------- PREPACK These program systems for general statistics and plotting of data scatter diagrams are programmed in Fortran 1130. These program systems are designed to be executed on IBM 1130, Version 2, Modification 11, Core Size 16K. General statistics are obtained on data from interlaboratory method studies through the program, COLST. These statistical approaches are based on a procedure described by Youden (1). In his procedure, a closely related pair of samples, A and B, for example, are analyzed by each of the participating laboratories. The data from all of the participants for each of the samples are subjected to the statistical program, COLST. The data from each sample pair are plotted, values of A versus values of B. In this particular plot program, SCAT, the data from three pairs of samples are used for making three plots, or diagrams, which are drawn on a single page. This presentation of data provides a vivid display for purposes of comparison. The general statistics program was adapted from a data summarization program written in Fortran IV (2). This program was adapted to the 1130 Model and expanded to provide for data input in any one of several forms of decimal expression, data screening, and the application of a statistical t-test to expose outliers and to leave a reduced vector of "retained" data. The plotter program, SCAT, utilizes the plotter routines as supplied by IBM. ------- TABLE OF CONTENTS Foreword ill Abstract iv Preface v Acknowledgements vif References vli MAIN PROGRAM: SCAT Introduction 1 Use 1 Description 1 SUBROUTINES: TGDU U TV«t 5 REALT 7 CONV2 9 RETN 10 PAIR 11 XYTRM 13 PRPAU 15 PRPBU 16 PROPC 17 OPTS 18 ABCD 19 FIGURE Figure 1 22 APPENDICES Appendix I 23 Appendix II 25 ------- ACKNOWLEDGEMENTS The assistance of staff members of the Computer Services and Systems Division, NERC, Cincinnati, is greatly appreciated. The encouragement of John A. Winter, Chief, Quality Assurance & Laboratory Evaluation Branch, Methods Development and Quality Assurance Laboratory, NERC. Cincinnati, is also greatly appreciated. REFERENCES 1. Youden, W.J.,Statistical Techniques for Collaborative Tests, AOAC, Washington, D.C.(1967). 2. Larson, K.E.,Ed.,The Summarization of Data, Journal of Quality Technology, 1^6 8 (1969) . 3. IBM Systems Reference Library, IBM 1130/1800 Plotter Subroutines, Form C26-3755-2, Third Edition, June 1969. v i i ------- ------- INTRODUCTION The program, SCAT, was designed to provide for the plotting of paired sets of data. This program treated data from interlaboratory method studies carried out by this agency. For designing the study and for analysis of the data, suggestions of Youden were used (1). The main program for statistics made use of a program listing edited by Larson (2). The main plotting program, SCAT, has made use of plotter subroutines of IBM Systems Reference Library (3). USE This program produced a plotter output of three paired sets of data from interlaboratory method studies. In addition, a printed output provided the list of valid data from each data vector, the paired data listing from pairs of data vectors, extreme values of matched data pairs which were not plotted, and list of plotted data pairs. The plotter output consisted of grids with tick marks, two true value lines, one parallel to the abscissa and the other parallel to the ordinate, plotted data points, and a complete set of labels and values marking the ordinate and abscissa scales on the sides and bottoms of the grids. DESCRIPTION The main program, SCAT, utilizes 12 subroutines through which data were screened and edited by the removal of statistically rejected data, the pairing of two data vectors, the application of an arbitrary upper limit for plotting, and the plotting of the data. The plotting steps are shown under 'USE'. The main program used the same input data as the statistics program of PART I utilizing for data screening the subroutine, REALT. INPUT REQUIREMENTS Variable Purpose Format Dl Number of user units per tick mark of scale F10.3 for first grid (grid A) D2 Number of user units per tick mark of scale F10.3 for second grid (grid B) D3 Number of user units per tick mark of scale F10.3 for third grid (grid C) TV(I) Vector of six true values F10.3 NFOR Number of data values rejected by the t-test 14 in PART I ------- FAL(I) Vector containing laboratory identification 13 numbers of rejected data values NFN(I) Vector containing analyst identification num- Al bers of rejected data values. The number of elements in vectors FAL and NFN equals the value of NFOR. CXY The arbitrary upper limit of the paired F10. data which is to be plotted Q A dummy variable used to pass one card which At* was used in a previously unrelated program. OUTPUT REQUIREMENTS The main program/ SCAT, produces no output. Output comes from certain subroutines which the main program calls. C SCAT INTEGER AA(120),AAR(120),AR(120),ARR(120),FAL(120), 1 ANAR(120),ANR(120),ANBR(120),ANA(120) DIMENSION NX(120)/TA(120)/NAR(120)/TAR(120)/AT(120)/ 1 NB(120),TB(120),XC(120),NRR(120),TBR(120),RT(120),YC(120), 2 NFN(120),X(120)/Y(120),XP(120),₯9(120),XZ(120),YZ(120), 3 TV(6) IPUT=2 IOUT=5 READ(IPUT,lO REAn(IPUT,3) 01,02,03 REAn(IPUT,3) (TV(I),1=1,6) CALL TGDl* CALL TVU(TV,01,02,03) DO 10 MAA=1,3 READdPUT,5) CALL REALT(AA,NX,TA,ANA,AT,NRA) READ(I PUT,5) CALL REALT(AB,NB,TR,ANR,RT,NRB) C READdPUT,!) NFOR READ(IPUT,2)(PAL(I),1=1, NFOR) CALL RETN(AA,NX,TA,ANA,NRA,AAR,NAR,TAP,ANAR,NPAP,FAL,NPN,NFOR) READ(IPUT,1) NFOR REAO(I PUT,2)(PAL(I),NFNd ), 1=1,NFOR) CALL RETN(AB,NR,TR,ANR,NRR,ARR,N*R,ARP.,NRPR,FAL,NFN,NFOP) CALL PAIRCAARfNARjTARfANAPfNRAPjASRjNPPjTR& REAO(IPUT,3) CXY CALL XYTRM(X,Y,CXY,XZ,YZ,L,NA,XC,YC,Nr, IOUT) GO TO (101,102,103),MAA 101 CALL PRPU(01,XZ,YZ,NA,XP,YP) GO TO 110 102 CALL PRPRU(D2,XZ,YZ,N^,XP,YP) GO TO 110 103 CALL PROPC(03,XZ,YZ,N/\,XP,YP) 110 CALL nPTS(XP,YP,NA) READdPUT,6) Q ------- .0 CONTINUE CALL ABCD FORMAT(14) 2 FORMAT(13,A1) 3 FORMAT(F10.3) FORMAT(//////////) 5 FORMAT(//) 3 FORMAT(A4) CALL EXIT END ------- SUBROUTINE TGD4 This subroutine plots the grid lines for three scatter plots. IBM plotting routines are found elsewhere.(2) The four cycle loops, DO 10 ..., DO 20 ..., DO 30 ..., are helpful in producing plots of good quality when the ball-point pen is used for plotting. SUBROUTINE TGD4 CALL FPLOT(1,0.0,0.0) CALL SCALF(0.75,0.75,0.0,0.0) C GRID A DO 10 MAA=1,4 CALL FGRID(0,0.0,6.0,1.00,4) CALL FGRID(1,4.0,6.0,1.00,4) CALL FGRID(2,4.0,10.0,1.00,4) CALL FGRID(3,0.0,10.0,1.00,4) 10 CONTINUE C GRID B CALL SCALF(0.75,0.75,0.0,6.0) DO 20 MAA=1,4 CALL FGRID(0,5.0,6.0,1.00,4) CALL FGRID(1,9.0,6.0,1.00,4) CALL FGRID(2,9.0,10.0,1.00,4) CALL FGRID(3,5.0,10.0,1.00,4) 20 CONTINUE C GRID C CALL SCALF(0.75,0.75,5.0,6.0) DO 30 MAA=1,4 CALL FGRID(0,0.0,0.0,1.00,4) CALL FGRID(1,4.0,0.0,1.00,4) CALL FGRID(2,4.0,4.0,1.00,4) CALL FGRID(3,0.0,4.0,1.00,4) 30 CONTINUE RETURN END ------- SUBROUTINE TV4 This subroutine plots the true value lines for the three pairs of samples in the three grids, respectively. No data are returned to the main program by this subroutine. INPUT REQUIREMENTS Variable Purpose TV(I) True value vector; six true values, one for each sample. Dl Number of user units per tick mark of scale for samples 1 & 2 D2 Number of user units per tick mark of scale for samples 3 & 4. D3 Number of user units per tick mark of scale for samples 5 & 6. SUBROUTINE TV4 DIMENSION TV(6) AX=TV(1)/D1 AY=TV(2)/D1 BX=TV(3)/D2 BY=TV(4)/D2 CX=TV(5)/D3 CY=TV(6)/D3 AY=AY+6.0 BX=BX+5.0 BY=BY+6.0 C PLOT AX,AY DO 40 MAA=1,4 CALL FPLOT(-2,AX,6.0) CALL FPLOT(-1,AX,10.0) CALL FPLOT(-2,0.0,AY) CALL FPLOT(-1,4.0,AY) 40 CONTINUE C PLOT BX,BY DO 50 MAA=1,4 CALL FPLOT(-2,BX,6.0) CALL FPLOT(-1,BX,10.0) CALL FPLOT(-2,5.0,BY) CALL FPLOT(-1,9.0,BY) 50 CONTINUE C PLOT CX,CY DO 60 MAA=1,4 CALL FPLOT(-2,CX,0.0) ------- CALL FPLOT(-1,CX,4.0) CALL FPLOT(-2,0.0,CY) CALL FPLOT(-1,4.0,CY) 60 CONTINUE CALL FPLOT(1,0.0,0.0) RETURN END Note that the DO loops with four cycles are used, with the use of ball point pens, to make a much brighter and even line or character than is made with only one passage of the pen. ------- SUBROUTINE REALT The purpose of this subroutine is to screen the raw data as punched. The raw data may consist of censored data or blanks instead of data in valid form for this analysis. The number of data cards may be unknown. A card with numbers other than zero punched in card column 80 follows the data deck. Testing of fields such as censor sign or the absence of a decimal point is accomplished through character comparison. A valid raw data vector is created by this subroutine. This raw data vector is printed followed by count of input data and a count of output data. Subroutine CONV2 is used to convert the validated raw data into a real data vector, T. INPUT REQUIREMENTS Variable Purpose Format ALAB(I) Numerical identification of laboratory 13 NNYL(I) Numerical identification of analyst Al L(I) Data censor (Greater than or less than) Al J(I) Integer portion of data element 14 M(I) Decimal point of data element Al K(I) Decimal portion of data element 12 AN(I) Symbol: D = Different method Al Blank = Official method of test ST(I) Unused literal field A2 KOUNT(I) Field used for 'stop' card 12 OUTPUT REQUIREMENTS Variable Purpose Format AL(I) Numerical identification of laboratory 13 NN(I) Numerical identification of analyst Al T(I) Element of the raw data vector F10.2 ANA(I) Method type, all blank A2 SUBROUTINE REALT (AL,NN,T, ANA, A1IB,NR) INTEGER AL(120),ALAB(120),AN(120),ANA(120) DIMENSION HNYL(120),L(120),J(120),M(120),K{120),ST(120), 1 NN(120),JJ(120),KK(120),T(120),KOUNT{120),AMB(120) C FOR TRACE METAL DATA ANALYSIS... UNKNOWN CARD COUNT. C PLACE 9'S CARD AFTER EACH INDIVIDUAL DATA DECK. IPUT=2 IOUT=5 C INPUT DATA 1=0 NR=0 19 1=1+1 NG=I-1 ------- READ(IPUT,1) ALAB(I) ,NNYL(I) ,L(I) ,J(I) ,M(I) ,K(I) ,AN(I) ,ST(I) , 1 KOUNT(I) IF(KOUNT(I)) 10,10,99 10 IF(L(I)-16448) 19,11,19 11 IF(M(I)-16448) 21,19,21 21 IF(AN(I)-16448) 19,20,19 20 NR=NR+1 AL(NR) = ALAB(I) NN(NR) = NNYL(I) JJ(NR) = J(I) KK(NR) = K(I) ANA(NR) = AN (I) ANB(NR) = ST(I) GO TO 19 C 99 WRITE(TOUT,71) DO 40 1=1,NR CALL CONV2(JJ,KK,T,NR) WRITE (IOUT, 31) AL(I) ,NN(I) ,T(I) ,ANA(I) 40 CONTINUE WRITE(IOUT,32) NG,NR C FORMAT" STATEMENTS 1 FORMAT(I3,A1,1X,I4,A1,I2,A1,62X,A2,I2) 31 FORMAT(1H ,13,Al,5XfF10.2,A1) 32 FORMAT(1HO,5X,'INPUT DATA COUNT = ',14,' WITH NULL VALUES'/1H , 1 5X,1OUTPUT DATA COUNT = ',14,' CONSOLIDATED REAL DATA1///) 71 FORMAT(1H ) RETURN END ------- SUBROUTINE CONV2 The purpose of this subroutine is to convert a validated input number, entered as an integer variable followed by a literal character (the decimal point) and followed by a second integer number. The data were entered by this format, I4,Al,I2, for the purpose of screening the data. Censored data and missing data were removed from the gross input data vector. This subroutine takes the two integers and converts these to the decimal number. INPUT REQUIREMENTS Variable Purpose J(I) Integer to the left of the decimal point K(I) Integer to the right of the decimal point OUTPUT REQUIREMENTS Variable Purpose T(I) Output valid data vector N Number of data elements to be converted SUBROUTINE CONV2(J,K,T,N) DIMENSION J(120),K(120),T(120) DO 10 1=1,N A = J(I) B = (FLOAT(K(I)))/100. T(I) = A + B 10 CONTINUE RETURN END ------- SUBROUTINE RETN This subroutine isolates the retained data. The raw data are sorted by reading in an integer that represents the number of cards to follow. These cards identify the laboratory identification number and the analyst identification number for each case of rejected data. The retained data vector is returned to the main program. INPUT REQUIREMENTS Variable Purpose AL(I) Numerical identification of laboratory NN(I) Numerical identification of analyst T(I) Data element ANA(I) Unused literal vector NR Count of input data values NFOR Count of rejected data values PAL(I) Numerical identification of laboratory, rejected values NFN(I) Numerical identification of analyst, rejected values OUTPUT REQUIREMENTS Variable Purpose RAL(I) Numerical identification of laboratory, retained values NCN(I) Numerical identification of analyst, retained values RT(I) Retained data element ANR(I) Unused literal vector L Count of retained data values SUBROUTINE RETN(AL,NN,T,ANA,NR,RAL,NCN,RT,ANR,L,PAL,NFN,NFOR) INTEGER AL(120) ,FAL(120) ,RAL(120) DIMENSION NN(120),T(120),RT(120),ANA(120),ANR(120),NCN(120), 1 NFN(120) L=0 DO 10 1=1,NR DO 11 K=1,NFOR IF(AL(I)-FAL(K)) 11,13,11 13 IF(NN(I)-NFN(K)) 11,10,11 11 CONTINUE L=L+1 RAL(L)=AL(I) NCN(L)=NN(I) RT(L)=T(I) ANR(L)=ANA(I) 10 CONTINUE RETURN END 10 ------- SUBROUTINE PAIR This subroutine compares two vectors of retained data and pairs these data, value-by-value in terms of laboratory number and analyst number. Thus, the paired data set will then consist of a single laboratory number, a single analyst number and two data values, the first from vector one and the second from vector two. INPUT REQUIREMENTS Variable Purpose AL(I) Numerical identification of laboratory, vector one NN(I) Numerical identification of analyst, vector one T(I) Data element, vector one NRX Number of data values, vector one ANA(I) Literal vector, vector one ALY(I) Numerical identification of laboratory, vector two NNY(I) Numerical identification of analyst, vector two TY(I) Data element, vector two NRY Number of data values, vector two ANY(I) Literal vector, vector two OUTPUT REQUIREMENTS Variable Purpose X(I) Paired data vector, set one Y(I) Paired data vector, set two L Number of paired data values An output listing "Data Retained and Paired With L Elements" is produced. SUBROUTINE PAIR(AL,NN,T,ANA,NRX,ALY,NNY,TY,ANY,NRY,X,Y,L) INTEGER AL(120),ALY(120) DIMENSION NN(120),T(120),NNY(120),TY(120),X(120),Y(120),ANA(120), 1 ANY(120) IOUT=5 L=0 DO 10 1=1,NRX DO 11 K=1,NRY IFAL(I)-ALY(K)) 11,12,11 12 IF(NN(I)-NNY(K))11,13,11 13 L=L+1 X(L)=T(I) Y(L)=TY(K) 11 CONTINUE 10 CONTINUE 11 ------- WRITE(IOUT,30) WRITE(IOUT,31) L WRITE(IOUT,32)(X(I),Y(I),1=1,L) 30 FORMAT(1H1) 31 FORMAT(1H ,'DATA RETAINED AND PAIRED WITH I,I4,1 ELEMENTS1///) 32 FORMAT(1H ,2F10.3/) RETURN END 12 ------- SUBROUTINE XYTRM This subroutine utilizes an arbitrary upper plotting limit for both vectors, X and Y, in order that data greater than this limit will not be plotted outside the arbitrary grid limits. The paired data not plotted as well as the paired data to be plotted are printed. INPUT REQUIREMENTS Variable Purpose X(I) Data vector, set one Y(I) Data vector, set two CXY Upper limit or cut-off for both X and Y vectors N Integer count of data elements in each vector OUTPUT REQUIREMENTS Variable Purpose XC(I) Data vector, subset one which exceeds upper limit YC(I) Data vector, subset two which exceeds upper limit XZ(I) Data vector, subset one less than or equal to upper limit YZ(I) Data vector, subset two less than or equal to upper limit NA Integer count of data elements to be plotted SUBROUTINE XYTRM(X,Y,CXY,XZ,YZ,N,NA,XC,YC,NC,IOUT) DIMENSION X(120) ,Y(120) ,XZ(120) ,Y7,(120) ,XC(120) ,YC(120) NA=0 NC=0 DO 10 1=1,N IF(X(I)-CXY) 11,11,9 11 IF(Y(I)-CXY) 12,12,9 9 NC=NC+1 XC(NC)=X(I) YC(NC)=Y(I) CO TO 10 32 NA=NA+1 XZ(NA)=X(I) YZ (NA)=Y(I) 10 CONTINUE WRITE(IOUT,30) WRITE(IOUT,31) IF(NC) 55,55,60 60 DO 40 1=1,NC WRITE(IOUT,32) XC(I),YC(I) 40 CONTINUE 55 WRITE(IOUT,30) WRITE(IOUT,33) 33 ------- DO 50 1=1,NA WRITE(IOUT,32} XZ(I)fYZ(I) 50 CONTINUE WRITE(IOUT,30) 30 FORMAT(1H1) 31 FORMAT(///1H ,'MATCHED DATA PAIRS NOT PLOTTED1//1H , 1 ISXr'X'^Xf'Y1//) 32 FORMAT(1H ,5X,2F10.2) 33 FORMAT(///1H ,'PLOTTED DATA PAIRS'//1H , 1 ISXf'X'^Xf'Y RETURN END 14 ------- SUBROUTINE PRPA4 The plotted data vectors from samples vary in scale of values from sample to sample. Every element in every vector pair is proportioned to a common scale for plotting purposes. In addition, any necessary coordinate translation is also accomplished. This subroutine proportions the paired data values which are to be plotted in the first of the three grids, grid A. Grid A is located in the upper left-hand quadrant of the page. The data elements in the X's and Y's are each divided by Dl (see subroutine TV4). In addition, the value, 6.0, the coordinate correction, is added to every value of Y. INPUT REQUIREMENTS Variable Purpose Dl Number of user units per tick mark of scale for the first two samples from which data are to be plotted X(I) Data vector, set one Y(I) Data vector, set two NA Integer count of data elements to be plotted OUTPUT REQUIREMENTS Variable Purpose XP(I) Data elements which have been proportioned and adjusted, set one YP(I) Data elements which have been proportioned and adjusted, set two SUBROUTINE PRPA4(D1,X,Y,NA,XP,YP) DIMENSION X(120),Y(120),XP(120),YP(120) DO 10 1=1,NA XP(I)=X(I)/D1 YP(I)=Y(I)/D1 YP(I)=YP(I)+6.0 10 CONTINUE RETURN END 35 ------- SUBROUTINE PRPB4 This subroutine proportions the paired data values which are to be plotted in the second of the three grids, grid B. Grid B is located in the upper right-hand quadrant of the page (see Figure 2a). The data elements in the X's and Y's are each divided by D2 (see subroutine TV4). In addition, the value, 6.0, is added to every value of X and the value 5.0 is added to every value of Y. INPUT REQUIREMENTS Variable Purpose D2 Number of user units per tick mark of scale for samples three and four from which data are to be plotted. X(I) Data vector, set one (sample three) Y(I) Data vector, set two (sample four) NA Integer count of data elements per set to be plotted OUTPUT REQUIREMENTS Variable Purpose XP(I) Data elements which have been proportioned and adjusted, set one YP(I) Data elements which have been proportioned and adjusted, set two SUBROUTINE PRPB4(D2,X,Y,NA,XP,YP) DIMENSION X(120),Y(120),XP(120),YP(120) DO 10 1=1,NA XA(I)=X(I)/D2 YP(I)=Y(I)/D2 XP(I)=XP(I)+5.0 YP(I)=YP(I)+6.0 10 CONTINUE RETURN END 16 ------- SUBROUTINE PROPC This subroutine proportions the paired data values which are to be plotted in the third of three grids, grid C. Grid C is located in the lower left-hand quadrant of the page (see Figure 2A). The data elements in the X's and Y's are each divided by D3 (see subroutine TV4). No further adjustments to the data values are necessary. INPUT REQUIREMENTS Variable Purpose D3 Number cf user units per tick mark of scale for samples five and six from which data are to be plotted X(I) Data vector, set one (sample five) Y(I) Data vector, set two (sample six) NA Integer count of data elements per set to be plotted OUTPUT REQUIREMENTS Variable Purpose XP(I) Data elements which have been proportioned, set one YP(I) Data elements which have been proportioned, set two SUBROUTINE PROPC(D3,X,Y,NA,XP,YP) DIMENSION X(120),Y(120),XP(120),YP(120) DO 10 1=1,NA XP(I)=X(I)/D3 YP(I)=Y(I)/D3 10 CONTINUE RETURN END 17 ------- SUBROUTINE DPTS This subroutine plots the three sets of data points in grid A, grid B and grid C. At this time, a small correction must be made to every data element in order to properly center the plot character, an asterisk. INPUT REQUIREMENTS Variable Purpose X(I) Data vector to be plotted Y(I) Data vector to be plotted NA Integer count of data elements to be plotted per vector OUTPUT REQUIREMENTS All output is directed to the plotter. SUBROUTINE DPTS(X,Y,NA) DIMENSION X(120),Y(120),AX(120),AY(120) CALL FPLOT(0,0.0,0.0) IPUT=2 IPLT=7 READ(IPUT,1) MAC DO 5 1=1,NA AX(I)=X(I)-0.05 AY(I)=Y(I)-0.05 5 CONTINUE DO 20 1=1,NA DO 10 MAA=1,4 CALL FCHAR(AX(I),AY(I),0.1,0.1,0.0) WRITE(IPLT,1) MAC 10 CONTINUE 20 CONTINUE CALL FPLOT(1,0.0,0.0) 1 FORMAT(Al) RETURN END 18 ------- SUBROUTINE ABCD This subroutine prints the labels necessary to the plot. Vectors of labels are inputed as well as the coordinate position of each label. See reference (3) for details regarding the input data for this subroutine. INPUT REQUIREMENTS Variable Purpose L(I) Literal vector from seven card input LBIG Largest literal vector LSML Smallest literal vector X Starting location of label in user's units, X-axis Y Starting location of label in user's units, Y-axis H Height and width of character to be plotted. A Theta, the angle, in radians, which the base line of the plotted characters makes with the X-axis SUBROUTINE ABCD DIMENSION L(560),LBIG(41) ,LSML(20) IPUT=2 IOUT=5 IPLT=7 CALL SCALP(0.75,0.75,0.0,0.0) C INPUT LITERALS READ(IPUT,1) (L(I) ,1=1,80) READ(IPUT,1) (L(I) ,1=81,160) READ(IPUT,1) (L(I) ,1=161,240) READ(IPUT,1) (L(I) ,1=241,320) READ(IPUT,1) (L(I) ,1=321,400) READ(IPUT,1) (L(I) ,1=401,480) READ(IPUT,1) (L(I) ,1=481,560) READ(IPUT,6) (LBIG(I) ,1=1,49) READ(IPUT,7) (LSML(I) ,1=1,20) WRITE (IOUT, 99) (L(I) ,1=1,560) 99 FORMAT (1H (80A1/1H )) C READ PARAMETERS AND PLOT LITERALS 1=81 DO 100 LIST=1,40 READ(IPUT,2) X,Y,H,A DO 200 MAA=1,4 CALL FCHAR(X,Y,H,H,A) WRITE (IPLT, 92) (L(NET) ,NET=1,J) 200 CONTINUE 19 ------- 1=1+12 100 CONTINUE READ(IPUT,2) X,Y,H,A DO 11 MAA=1,4 CALL FCHAR(X,Y,HrH,A) WRITE (IPLT, 41) (LBIG(K) ,K=1,49) 11 CONTINUE READ(IPUT,2) X,Y,H,A DO 12 MAA=1,4 CALL FCHAR(X,Y,H,H,A) WRITE (IPLT, 20) (LSML(K) ,K=1,20) 12 CONTINUE C WRITE(IOUT,5) 1 FORMAT ( 80 Al) 2 FORMAT (4F10.0) 6 FORMAT (49A1) 7 FORMAT ( 2 OA1) 41 FORMAT (49A1) 20 FORMAT (20A1) 5 FORMAT (1H1, 'END OF PLOT EXECUTION1////) 92 FORMAT ( 12 Al) RETURN END 20 ------- Appendix I shows an outline of the configuration of data cards for the program, SCAT, and for subroutines, REALT and ABCD. The data input is designed to use a data card configuration already in existence. Therefore, cards not used by this program system are just passed through the reader or read with dummy variables. Section A. indicates the input of 19 cards (10 passed and 9 read). The input data consist of three scale parameter cards and six 'true1 values. Section B. inputs data from three pairs of samples through the subroutine, REALT. Data from each sample is followed by a card having '55* punched in cc-79 and 80. After the preceding card, the first 'REJECTS' card is read. This card bears the number, N, of data points which have been rejected by the t-test. This card is followed by N cards inputing the identification number of the laboratory and analyst. The card punched with the asterisk merely inputs the plotting symbol. Section C. inputs all labels necessary for plot identification and scale value for all plots. Figure 1 shows a typical plot as produced by this system. 21 ------- LOW LEVEL 45- 30- 15- n. 0 LU _J Q. S » * * * ..*... m SAMPLE 5 I 1 15 30 45 60 MEDIUM LEVEL 160 i- I n OL 120+| 10 80-- 40- * ' 40 80 SAMPLE 2 -H 120 160 HIGH LEVEL 450- 300- 150- Ui OL s * . *_ 1 ^ f m SAMPLE 1 J 1 150 300 450 600 FIGURE 1. Recovery of arsenic from distilled water micrograms per liter 22 ------- APPENDIX I CONFIGURATION OF DATA CARDS FOR PROGRAM, SCAT A. HEADER DATA (1) Pass 11 literal cards. (2) Read 3 data cards (D1,D2,D3). (3) Read 6 data cards (TV(1) , . . . ,TV(6) ) . B. SIX SAMPLES OF DATA TO BE PLOTTED Sample one: Data to be plotted. (1) Pass 3 data cards. (2) Read CONFIGURATION for subroutine, REALT. Sample two: Data to be plotted. (3) Pass 3 data cards. (4) Read CONFIGURATION for subroutine, REALT. Samples one & two: Processing of data to be plotted. Sample one: Control data for subroutine, RETN. (5) Read 1 data card (NFOR). (6) Read NFOR data cards (FAL(I),NFN(I)). Sample two: Control data for subroutine, RETN (7) Read 1 data card (NFOR) . (8) Read NFOR data cards (FAL(I),NFN(I)). Samples one & two: Control data for subroutine, XYTRM. (9) Read 1 data card (CXY). Dummy read. (10) Pass 1 data card. Sample three: Data to be plotted. (11) Pass 3 data cards. (12) Read CONFIGURATION for subroutine, REALT. Sample four: Data to be plotted. (13) Pass 3 data cards. (14) Read CONFIGURATION for subroutine, REALT. 23 ------- Samples three & four: Processing of data to be plotted. Sample three: Control data for subroutine, RETN. (15) Read 1 data card (NFOR). (16) Read NFOR data cards (FAL(I),NFN(I)). Sample four: Control data for subroutine, RETN. (17) Read 1 data card (NFOR). (18) Read NFOR data cards (FAL(I),(NFN(I). Samples three & four: Control data for subroutine, XYTRM. (19) Read 1 data card (CXY). Dummy read. (20) Pass 1 data card. Sample five: Data to be plotted. (21) Pass 3 data cards. (22) Read CONFIGURATION for subroutine, REALT. Sample six: Data to be plotted. (23) Pass 3 data cards. (24) Read CONFIGURATION for subroutine, REALT. Samples five & six: Processing of data to be plotted. Sample five: Control data for subroutine, RETN. (25) Read 1 data card (NFOR). (26) Read NFOR data cards (FAL(I),NFN(I)). Sample six: Control data for subroutine, RETN. (27) Read 1 data card (NFOR) . (28) Read NFOR cards (FAL(I),NFN(I)). Dummy read. (29) Pass 1 data card. C. LABELS FOR THREE PLOTS (1) Read CONFIGURATION for subroutine, ABCD. 24 ------- APPENDIX II SCHEMATIC CONFIGURATION OF DATA DECK QUALITY ASSURANCE & LABORATORY EVALUATION BRANCH, MDQARL EPA METHOD STUDY 7, TRACE METALS ANALYSES FOR ARSENIC IN WATER ALL DATA, EPA & NON-EPA LABORATORIES UNACCEPTABLE DATA, EPA & NON-EPA LABORATORIES ACCEPTABLE DATA, EPA & NON-EPA LABORATORIES STATISTICS ON DATA, EPA & NON-EPA LABORATORIES RECOVERY OF INCREMENT FROM DISTILLED WATER (blank card) (blank card) MATCHED & PAIRED DATA, EPA & NON-EPA LABORATORIES . . Al 15. 40. 150. 29. 20. 80. 67. 292. 266. A2 A3 29.0 AMPUL 5 INCREMENT Bl 29 UG/LITER ARSENIC 1011 32. AS05D 1021 30. DMAS05D 1031 8.0 AS05D 1061 18. AS05D 1901 24, AS05D B2 5031 26. DMAS05D 5041 000.23 AS05D 55 (in cc-79,80) 20.0 AMPUL 6 INCREMENT 20 UG/LITER ARSENIC B3 25 ------- 1011 26. AS06D * * 4401 AS06D ... B4 * * 5041 00o!o AS06D 55 (in cc-79,80) 0001 REJECTS ASO5D B5 1000 REJECTS AS05D B6 0001 REJECTS AS06D B7 4702 REJECTS AS06D B8 60 B9 * X 0506 BIO 2 80.0 ... Bll AMPUL 2 INCREMENT = 80 UG/LITER ARSENIC 1011 78. AS02D 4801 AS02D ... B12 * * » 5041 6s! AS02D 55 (in cc-79,80) 2 67.0 ... B13 AMPUL 3 INCREMENT = 67 UG/LITER ARSENIC 1011 70. AS03D * 4411 68. DMAS03D ... B14 * 5041 53! AS03D ! 55 (in cc-79,80) 0003 REJECTS AS02D B15 26 ------- 1371 REJECTS AS02D 3291 REJECTS AS02D ... B16 4641 REJECTS AS02D 0004 REJECTS AS03D 1131 REJECTS AS03D 1371 REJECTS AS03D 3291 REJECTS AS03D ... B18 4641 REJECTS AS03D 160 B19 * X 0203 B20 2 292.0 ... B21 AMPUL 1 INCREMENT « 292 UG/LITER ARSENIC 1011 405. AS01D * * * * 4371 1000.0DMAS01D ... B22 » 5041 27l! ASOlD ! 2 266. ... B23 AMPUL 4 INCREMENT = UG/LITER ARSENIC 1011 295. AS04D 4441 199. AS04D ... B24 * 5041 229. AS04D ! 0003 REJECTS ASOlD B25 2911 REJECTS ASOlD 1102 REJECTS ASOlD ... B26 1371 REJECTS ASOlD 0003 REJECTS AS04D 27 ------- 2911 REJECTS AS04D 1371 REJECTS AS04D ... B28 4641 REJECTS AS04D 600 B29 * X 0104 B30 FIGURE 1 LOW LEVEL MEDIUM LEVELHIGH LEVEL SAMPLE 1 .. SAMPLE 2 SAMPLE 3 SAMPLE 4 SAMPLE 5 SAMPLE 6 0 15 30 45 60 0 15 30 45 60 0 40 80 120 160 0 40 80 120 160 0 150 300 450 600 0 150 300 450 600 RECOVERY OF ARSENIC FROM DISTILLED WATER MICROGRAMS PER LITER 3.33 12.06 0.2 0. 0.0 12.67 .1 0. 5.0 10.67 .1 0. 0.0 4.67 .1 0. 2.67 0.18 .1 0. 7.67 6.13 .1 0. 5.20 8.67 .1 1.57079 0.2 2.67 .1 1.57079 2.67 6.13 .1 0. 0.2 8.67 .1 1.57079 -.08 5.73 .1 0. 0.84 5.73 .1 0. 1.84 5.73 .1 0. 2.84 5.73 .1 0. 3.84 5.73 .1 0. -.26 6.00 .1 0. -.40 7.00 .1 0. -.40 8.00 .1 0. ... Cl -.40 9.00 .1 0. -.40 10.00 .1 0. 4.92 5.73 .1 0. 5.84 5.73 .1 0. 6.84 5.73 .1 0. 7.79 5.73 .1 0. 8.79 5.73 .1 0. 4.74 6.00 .1 0. 4.60 7.00 .1 0. 4.60 8.00 .1 0. 4.46 9.00 .1 0. 4.46 10.00 .1 0. -.08 -0.22 .1 0. 0.79 -0.22 .1 0. 1.79 -0.22 .1 0. 28 ------- 2.79 -0.22 .1 0. 3.79 -0.22 .1 0. -.26 0.00 .1 0. -.53 1.00 .1 0. -.53 2.00 .1 0. -.53 3.00 .1 0. ... Cl (Ctd) -.53 4.00 .1 0. 1.87 11.67 .1 0. 3.33 11.40 .1 0. 29 ------- TECHNICAL REPORT DATA (Please read Instructions on the reverse before completing) 1 REPORT NO. 2. EPA-670/4-75-004b 4. TITLE AND SUBTITLE FORTRAN PROGRAMS FOR ANALYZING COLLABORATIVE TEST DATA PART II: SCATTER DIAGRAMS 7. AUTHOR(S) Elmo C. Jul ian 9. PERFORMING ORGANIZATION NAME AND ADDRESS National Environmental Research Center Office of Research and Development U.S. Environmental Protection Agency Cincinnati, Ohio U5268 12. SPONSORING AGENCY NAME AND ADDRESS Same as above 3. RECIPIENT'S ACCESSION-NO. 5. REPORT DATE April 1 975 ; 1 ssu ing Dat e 6. PERFORMING ORGANIZATION CODE 8. PERFORMING ORGANIZATION REPORT NO. 10. PROGRAM ELEMENT NO-]_HA327 ROAP 24AEL; Task 006 11. CONTRACT/GRANT NO. 13. TYPE OF REPORT AND PERIOD COVERED 14. SPONSORING AGENCY CODE 15. SUPPLEMENTARY NOTES See Part I, EP A- 6jQ/k - 1 5- 00 Aa 16. ABSTRACT A FORTRAN program for IBM 1130 designed to plot three pairs of data sets in three scatter diagrams on one page is described. These data stem from interl aboratory studies of chemical analytical methods. 17. KEY WORDS AND DOCUMENT ANALYSIS a. DESCRIPTORS FORTRAN, Data, Scatter diagrams 13. DISTRIBUTION STATEMENT RELEASE TO PUBLIC b. IDENTIFIERS/OPEN ENDEDTERMS Programs, Collabora- tive test 19. SECURITY CLASS (This Report) UNCLASSIFIED c. COSATI Field/Group 21. NO. OF PAGES 38 22. PRICE EPA Form 2220-1 (9-73) 30 S. GOVERNMENT PRINTING OFFICE-1975-657-592/5350 Region No. 5-H ------- ------- ------- |