Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap2_198111 - decus/20-0026/kolm.smp
There are 2 other files named kolm.smp in the archive. Click here to see a list.
C                                                                       KOLM  10
C     ..................................................................KOLM  20
C                                                                       KOLM  30
C        SAMPLE MAIN PROGRAM FOR THE KOLMOGOROV-SMIRNOV TEST-KOLM       KOLM  40
C                                                                       KOLM  50
C        PURPOSE                                                        KOLM  60
C           (1) READ THE CONTROL CARD FOR A ONE OR TWO SAMPLE TEST      KOLM  70
C           (2) READ THE SAMPLE DATA AND DETERMINE THE SAMPLE SIZES     KOLM  80
C           (3) PRINT RESULTS                                           KOLM  90
C                                                                       KOLM 100
C        REMARKS                                                        KOLM 110
C           THE USER SHOULD NOTE THE REMARKS GIVEN IN SUBROUTINES       KOLM 120
C           KOLMO, KOLM2, AND SMIRN, AND THE MATHEMATICAL DESCRIPTIONS  KOLM 130
C           FOR THESE SUBROUTINES.                                      KOLM 140
C                                                                       KOLM 150
C        SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED                  KOLM 160
C           KOLMO                                                       KOLM 170
C           KOLM2                                                       KOLM 180
C           SMIRN                                                       KOLM 190
C           NDTR                                                        KOLM 200
C                                                                       KOLM 210
C        METHOD                                                         KOLM 220
C           REFER TO SUBROUTINES KOLMO, KOLM2, AND SMIRN                KOLM 230
C                                                                       KOLM 240
C     ..................................................................KOLM 250
C                                                                       KOLM 260
C     THE FOLLOWING DIMENSIONS MUST BE GREATER THAN THE NUMBER OF DATA  KOLM 270
C     ELEMENTS IN THE TWO SAMPLES, M AND N                              KOLM 280
C                                                                       KOLM 290
         DIMENSION X(501),Y(501)                                        KOLM 300
C                                                                       KOLM 310
C     ..................................................................KOLM 320
C                                                                       KOLM 330
         DIMENSION TITLE(5),D(12),TIT1(20),DIST(5,3)                    KOLM 340
C                                                                       KOLM 350
C     ..................................................................KOLM 360
C                                                                       KOLM 370
    1 FORMAT(5A4,3I1,5(F1.0,2F5.0))                                     KOLM 380
    2 FORMAT(//'CC.21, CONTROL CARD, INCORRECT, OR SAMPLE SIZE IS TOO LAKOLM 390
     1RGE.  JOB IGNORED.')                                              KOLM 400
    3 FORMAT(12F6.0)                                                    KOLM 410
    4 FORMAT(1H1,5A4)                                                   KOLM 420
    5 FORMAT(//2H A,I2,' SAMPLE TEST WAS REQUESTED')                    KOLM 430
    6 FORMAT(20A4)                                                      KOLM 440
    7 FORMAT(//(10F10.3))                                               KOLM 450
    8 FORMAT(//' SORTED SAMPLE ONE FOLLOWS')                            KOLM 460
    9 FORMAT(//' THE HYPOTHESIS THAT THE SAMPLE IS FROM A(N) ',4A4,  ' DKOLM 470
     1ISTRIBUTION')                                                     KOLM 480
   10 FORMAT(//' SORTED SAMPLE TWO FOLLOWS')                            KOLM 490
   11 FORMAT(//' THE HYPOTHESIS THAT THE TWO SAMPLES ARE FROM THE SAME PKOLM 500
     1OPULATION CAN BE REJECTED WITH (ASYMPTOTIC)',/,' PROBABILITY OF BEKOLM 510
     2ING INCORRECT OF ',F6.3,'.  THE STATISTIC Z IS ',E12.4,' FOR THESEKOLM 520
     3 SAMPLES.')                                                       KOLM 530
   12 FORMAT(//,' THE SIZE OF SAMPLE',I3,' IS',I4,'.')                  KOLM 540
   13 FORMAT(//,' NOTE THE REMARKS CONCERNING ASYMPTOTIC RESULTS AND SAMKOLM 550
     1PLE SIZE IN SUBROUTINE SMIRN')                                    KOLM 560
   14 FORMAT(//,' AT LEAST ONE (S) ENTRY PARAMETER FOR THE SUBROUTINE KOKOLM 570
     1LMO WAS INCORRECT.'/' THE TEST FOR THE ASSOCIATED CONTINUOUS PDF WKOLM 580
     2AS IGNORED.')                                                     KOLM 590
   15 FORMAT(A4)                                                        KOLM 600
   16 FORMAT(//,' THIS JOB CALLS FOR THE USE OF A PREVIOUSLY READ SAMPLEKOLM 610
     1, AND THE PREVIOUS JOB WAS IGNORED BECAUSE OF ERRORS.'/ ' JOB IGNOKOLM 620
     2RED.')                                                            KOLM 630
   17 FORMAT(//,' FIRST CARD IN JOB DECK (JOB CONTROL CARD) IS INCORRECTKOLM 640
     1.')                                                               KOLM 650
   18 FORMAT(1H ,' WITH MEAN',F13.4,' AND VARIANCE',F13.4)              KOLM 660
   19 FORMAT(1H ,' WITH MEDIAN',F13.4,' AND FIRST QUARTILE',F13.4)      KOLM 670
   20 FORMAT(1H ,' IN THE INTERVAL',F13.4,' TO',F13.4,' INCLUSIVE')     KOLM 680
   21 FORMAT(1H ,' CAN BE REJECTED WITH PROBABILITY',F6.3,' OF BEING INCKOLM 690
     1ORRECT.  THE STATISTIC Z',/,'  IS',E12.4,' FOR THIS SAMPLE.')     KOLM 700
   22 FORMAT(//,'  THE JOB WITH TITLE ',5A4,' WAS COMPLETED.')          KOLM 710
C                                                                       KOLM 720
C        READ DISTRIBUTION NAMES AND JOB CONTROL CARD                   KOLM 730
C                                                                       KOLM 740
      IFL=0                                                             KOLM 750
      READ(5,15)DASH                                                    KOLM 760
      READ(5,6)TIT1                                                     KOLM 770
C                                                                       KOLM 780
C        SELECT PROGRAM CONTROLS                                        KOLM 790
C                                                                       KOLM 800
  100 READ(5,15,END=999)DAS2                                            KOLM 810
      IF(DASH-DAS2)101,102,101                                          KOLM 820
  101 WRITE(6,17)                                                       KOLM 830
      GO TO 107                                                         KOLM 840
  102 READ(5,1)TITLE,IS,IR,IO,((DIST(I,J),J=1,3),I=1,5)                 KOLM 850
      IES=0                                                             KOLM 860
      WRITE(6,4)TITLE                                                   KOLM 870
      WRITE(6,5)IS                                                      KOLM 880
C                                                                       KOLM 890
C        NUMBER OF SAMPLES DECISION                                     KOLM 900
C                                                                       KOLM 910
      IF(IR)103,105,103                                                 KOLM 920
  103 IF(IFL)104,115,104                                                KOLM 930
  104 WRITE(6,16)                                                       KOLM 940
      GO TO 107                                                         KOLM 950
  105 IF(IS-1)106,109,109                                               KOLM 960
C                                                                       KOLM 970
C        NOT ONE OR TWO SAMPLES                                         KOLM 980
C                                                                       KOLM 990
  106 WRITE(6,2)                                                        KOLM1000
  107 READ(5,15)DAS2                                                    KOLM1010
      IF(DASH-DAS2)107,108,107                                          KOLM1020
  108 IFL=1                                                             KOLM1030
      GO TO 102                                                         KOLM1040
C                                                                       KOLM1050
C        READ FIRST SAMPLE                                              KOLM1060
C                                                                       KOLM1070
  109 N=0                                                               KOLM1080
      DO 111 I=1,50                                                     KOLM1090
      READ(5,3)D                                                        KOLM1100
      DO 111 J=1,12                                                     KOLM1110
      IF(D(J)-999999.0)110,112,110                                      KOLM1120
  110 N=N+1                                                             KOLM1130
      IF(N-501)111,106,106                                              KOLM1140
  111 X(N)=D(J)                                                         KOLM1150
  112 N1=1                                                              KOLM1160
      WRITE(6,12)N1,N                                                   KOLM1170
C                                                                       KOLM1180
C        CHECK THE SIZE OF N                                            KOLM1190
C                                                                       KOLM1200
      IF(N-100)113,113,114                                              KOLM1210
  113 WRITE(6,13)                                                       KOLM1220
  114 IF(IS-2)121,115,106                                               KOLM1230
C                                                                       KOLM1240
C        READ SECOND SAMPLE                                             KOLM1250
C                                                                       KOLM1260
  115 M=0                                                               KOLM1270
      DO 117 I=1,50                                                     KOLM1280
      READ(5,3)D                                                        KOLM1290
      DO 117 J=1,12                                                     KOLM1300
      IF(D(J)-999999.0)116,118,116                                      KOLM1310
  116 M=M+1                                                             KOLM1320
      IF(M-501)117,106,106                                              KOLM1330
  117 Y(M)=D(J)                                                         KOLM1340
  118 N1=2                                                              KOLM1350
      WRITE(6,12)N1,M                                                   KOLM1360
C                                                                       KOLM1370
C        CHECK THE SIZE OF M                                            KOLM1380
C                                                                       KOLM1390
      IF(M-100)119,119,120                                              KOLM1400
  119 WRITE(6,13)                                                       KOLM1410
  120 IF(IS-1)121,121,133                                               KOLM1420
C                                                                       KOLM1430
C        ONE SAMPLE TEST USING ALL DISTRIBUTIONS REQUESTED              KOLM1440
C                                                                       KOLM1450
  121 DO 130 I=1,5                                                      KOLM1460
      IF(DIST(I,1))130,130,122                                          KOLM1470
  122 CALL KOLMO(X,N,Z,P,I,DIST(I,2),DIST(I,3),IER)                     KOLM1480
      IES=IER+IES                                                       KOLM1490
      IF(IER)130,124,130                                                KOLM1500
  123 WRITE(6,14)                                                       KOLM1510
      GO TO 136                                                         KOLM1520
C                                                                       KOLM1530
C        OUTPUT RESULTS                                                 KOLM1540
C                                                                       KOLM1550
  124 K=4*I-3                                                           KOLM1560
      WRITE(6,9)TIT1(K),TIT1(K+1),TIT1(K+2),TIT1(K+3)                   KOLM1570
      IF(I-3)125,126,127                                                KOLM1580
  125 S2=DIST(I,3)**2                                                   KOLM1590
      WRITE(6,18)DIST(I,2),S2                                           KOLM1600
      GO TO 129                                                         KOLM1610
  126 S2=DIST(I,2)-DIST(I,3)                                            KOLM1620
      WRITE(6,19)DIST(I,2),S2                                           KOLM1630
      GO TO 129                                                         KOLM1640
  127 IF(I-4)128,128,130                                                KOLM1650
  128 WRITE(6,20)DIST(I,2),DIST(I,3)                                    KOLM1660
  129 WRITE(6,21)P,Z                                                    KOLM1670
  130 CONTINUE                                                          KOLM1680
C                                                                       KOLM1690
C        OUTPUT SAMPLE ONE DECISION                                     KOLM1700
C                                                                       KOLM1710
      IF(IO)131,132,131                                                 KOLM1720
  131 WRITE(6,8)                                                        KOLM1730
      WRITE(6,7)(X(J),J=1,N)                                            KOLM1740
  132 IF(IES)123,136,123                                                KOLM1750
C                                                                       KOLM1760
C        TWO SAMPLE TEST                                                KOLM1770
C                                                                       KOLM1780
  133 CALL KOLM2(X,Y,N,M,Z,P)                                           KOLM1790
C                                                                       KOLM1800
C        OUTPUT SAMPLES DECISION                                        KOLM1810
C                                                                       KOLM1820
      IF(IO)134,135,134                                                 KOLM1830
  134 WRITE(6,8)                                                        KOLM1840
      WRITE(6,7)(X(J),J=1,N)                                            KOLM1850
      WRITE(6,10)                                                       KOLM1860
      WRITE(6,7)(Y(J),J=1,M)                                            KOLM1870
  135 WRITE(6,11)P,Z                                                    KOLM1880
  136 IFL=0                                                             KOLM1890
      WRITE(6,22)TITLE                                                  KOLM1900
      GO TO 100                                                         KOLM1910
999	STOP
      END                                                               KOLM1920