Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0026/kolm.cdk
There are 2 other files named kolm.cdk in the archive. Click here to see a list.
$JOB KOLM[30,30]
$FORTRAN KOLM
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
$DECK KOL.CDR
----                                                                          20
     NORMAL       EXPONENTIAL        CAUCHY         UNIFORM        USER'      30
----                                                                          40
UNIFORM TEST        1001000.5000.51000.5000011000.50000110000000001           50
 0.377 0.260 0.172 0.688 0.581 0.290 0.514 0.472 0.204 0.976 0.018 0.326      60
 0.795 0.837 0.870 0.686 0.288 0.555 0.737 0.427 0.931 0.745 0.092 0.843      70
 0.231 0.806 0.753 0.263 0.804 0.458 0.508 0.928 0.994 0.608 0.702 0.743      80
 0.005 0.951 0.664 0.425 0.570 0.596 0.444 0.302 0.817 0.183 0.746 0.833      90
 0.282 0.201 0.662 0.167 0.043 0.750 0.117 0.953 0.665 0.411 0.477 0.164     100
 0.692 0.683 0.867 0.054 0.518 0.624 0.083 0.882 0.540 0.301 0.953 0.006     110
 0.458 0.694 0.041 0.995 0.604 0.666 0.561 0.367 0.156 0.630 0.377 0.589     120
 0.139 0.536 0.963 0.956 0.068 0.801 0.199 0.985 0.113 0.816 0.880 0.931     130
 0.670 0.640 0.805 0.073 0.196 0.516 0.336 0.371 0.197 0.843 0.288 0.139     140
 0.242 0.200 0.025 0.349 0.870 0.080 0.652 0.190 0.275 0.939 0.161 0.514     150
 0.636 0.190 0.416 0.786 0.973 0.767 0.845 0.168 0.400 0.888 0.726 0.365     160
 0.652 0.632 0.923 0.844 0.761 0.969 0.965 0.073 0.751 0.851 0.340 0.383     170
 0.243 0.008 0.860 0.093 0.816 0.058 0.006 0.515 0.033 0.565 0.093 0.470     180
 0.982 0.666 0.154 0.933 0.215 0.890 0.409 0.441 0.963 0.810 0.195 0.876     190
 0.501 0.123 0.228 0.264 0.531 0.810 0.083 0.202 0.469 0.996 0.752 0.545     200
 0.503 0.117 0.170 0.972 0.298 0.042 0.574 0.065 0.225 0.766 0.570 0.520     210
 0.996 0.292 0.790 0.111 0.556 0.337 0.012 0.042 0.143 0.482 0.607 0.302     220
 0.353 0.397 0.206 0.662 0.119 0.754 0.450 0.918 0.453 0.463 0.699 0.022     230
 0.842 0.859 0.577 0.725 0.163 0.450 0.232 0.349 0.000 0.864 0.181 0.311     240
 0.236 0.622 0.607 0.042 0.787 0.348 0.006 0.904 0.365 0.053 0.037 0.745     250
 0.136 0.113 0.455 0.708 0.158 0.572 0.012 0.928 0.455 0.381 0.193 0.728     260
 0.629 0.220 0.657 0.962 0.860 0.501 0.268 0.098 0.181 0.203 0.588 0.701     270
 0.909 0.148 0.708 0.909 0.088 0.345 0.277 0.556 0.840 0.033 0.639 0.539     280
 0.482 0.041 0.907 0.077 0.299 0.097 0.892 0.478 0.835 0.707 0.733 0.029     290
 0.581 0.224 0.112 0.659 0.945 0.741 0.940 0.969 0.360 0.434 0.365 0.285     300
 0.422 0.967 0.005 0.328 0.924 0.595 0.253 0.157 0.668 0.594 0.554 0.984     310
 0.913 0.622 0.516 0.502 0.364 0.667 0.724 0.344 0.546 0.178 0.151 0.302     320
 0.457 0.021 0.019 0.923 0.365 0.882 0.010 0.121 0.637 0.734 0.671 0.416     330
 0.459 0.009 0.919 0.434 0.331 0.079 0.500 0.284 0.209 0.694 0.283 0.454     340
 0.178 0.978 0.272 0.827 0.512 0.634 0.195 0.462 0.019 0.956 0.560 0.761     350
 0.524 0.294 0.047 0.634 0.382 0.591 0.103 0.303 0.889 0.607 0.638 0.367     360
 0.463 0.471 0.664 0.742 0.476 0.178 0.785 0.113 0.610 0.646 0.390 0.520     370
 0.611 0.988 0.431 0.699 0.312 0.580 0.672 0.810 0.814 0.597 0.256 0.164     380
 0.679 0.603 0.504 0.595 0.033 0.846 0.783 0.079 0.430 0.868 0.343 0.244     390
 0.376 0.062 0.990 0.381 0.371 0.801 0.467 0.592 0.348 0.759 0.422 0.697     400
 0.388 0.055 0.836 0.518 0.585 0.842 0.793 0.177 0.926 0.964 0.450 0.022     410
 0.085 0.311 0.102 0.816 0.973 0.494 0.208 0.803 0.948 0.462 0.242 0.287     420
 0.546 0.698 0.269 0.339 0.607 0.594 0.102 0.266 0.677 0.668 0.913 0.462     430
 0.562 0.207 0.188 0.264 0.895 0.991 0.893 0.442 0.615 0.709 0.722 0.950     440
 0.208 0.696 0.304 0.557 0.605 0.617 0.256 0.984 0.595 0.715 0.936 0.178     450
 0.141 0.153 0.654 0.544 0.376 0.363 0.793 0.492 0.812 0.447 0.376 0.231     460
 0.644 0.263 0.785 0.341 0.982 0.829999999                                   470
----                                                                         480
UNIFORM-GAUSS TEST  211                                                      490
-0.283 0.916 0.776 0.690 0.910 0.506 0.816 0.348 0.659-0.301 0.630-0.397     500
 0.515 0.227 1.253 0.421 0.499 0.288 1.189-0.264 0.099 0.051 0.411 0.951     510
 0.273 0.154 0.861 0.937 0.446 0.702 1.451 0.035 0.515 0.770 0.559 1.053     520
-1.157 0.902 0.533 1.270 0.761 1.110 1.190 0.433 0.573 0.374 1.317 1.255     530
 0.547 1.145 0.667-0.077 0.422-0.159-0.037 0.088 0.406 0.849 0.898 0.372     540
-0.324 0.025 0.632 0.365 0.375 0.694-0.206 0.126-0.381 1.149 0.983 1.184     550
-0.011 0.653 0.266 1.035 0.536 0.936 1.177 1.644 0.782 0.198 0.222 0.445     560
 0.714 0.607 0.374 0.341 0.790 0.302 1.075 0.204 0.436 0.887 0.234 0.874     570
 0.048 0.938 0.733-0.340-0.012 0.497 0.418 0.840 0.091 0.578 0.606-0.340     580
 0.656 0.660 0.584 0.837 0.454 0.695 0.606 0.053-0.276 1.600 1.394-0.038     590
 1.173 0.762 0.642 0.185-0.023 0.037 0.508 0.313-0.718-0.249 0.124-0.096     600
-0.299 0.196 1.086 0.487 0.317 0.635 0.462 0.559 0.181 1.799 0.287 0.583     610
 0.313 0.387 1.067 0.996 0.702 0.068-0.227 0.198 0.305-0.021 0.849 1.063     620
 1.049 0.226-0.297 0.930 0.828 0.884 1.217-0.391 0.007-0.004 1.238 0.376     630
 0.418 1.075 0.083-0.020 0.362 0.601 0.037 0.634 0.109 0.524 1.356 1.024     640
-0.602 0.763 1.261 0.302-0.063 0.704 0.446-0.410 0.401 0.704 1.070-0.023     650
-0.064 1.087-0.737-0.476 1.156 0.648 0.624 0.257 0.643 0.147 0.719 0.174     660
-0.552-0.183 0.583 0.740 0.592-0.144 0.222 0.388 0.563 0.933 1.108 1.022     670
 0.818 0.686 0.683 0.514 0.284-0.280 0.358 1.203-0.643 0.110 0.012 0.399     680
 0.899 0.400 0.994 0.880 0.743 0.102 1.120 0.391 0.191 0.196 1.176 0.149     690
 0.512 1.132 0.916 0.838 0.445 1.330 0.563 0.610 0.699 0.675 0.310 0.586     700
 0.448-0.475 0.317 0.858 0.839-0.297 0.214 0.985 0.484 1.004 1.598 0.494     710
 0.467 1.188 0.536 0.381 1.339-0.011 0.064 0.113 0.619 0.604 0.687 0.622     720
 0.297 0.203 0.378 1.313 0.829 0.422 0.078 0.057 0.143 0.868-0.302 0.693     730
 0.633 1.116 0.118-0.469 0.663 0.708 0.685 0.850 0.566 0.657 1.217 0.394     740
 0.643-0.055-0.000 0.881 1.163 0.520 0.787 1.493 1.366 0.801 0.301 1.384     750
-0.541 1.176 0.236 0.675 1.119 1.000 0.250 0.457-0.010 0.098 0.975 0.288     760
 0.686 0.764 0.007 0.697 0.789 0.259 0.414 0.680 0.852 0.315 0.231 0.203     770
 1.394 0.131 0.963 0.699 0.404-0.124 0.583 0.071 1.838-0.313-0.467 0.191     780
 0.125 1.670 0.224 0.400 0.658 0.900 1.034 0.005 0.801 0.920-0.188 0.786     790
 0.387 1.243 0.875 0.989 0.718-0.152 0.009 1.329 0.562 0.687 0.968 0.490     800
 0.160 0.177-0.025 1.125 0.217 1.206 1.221-0.145-0.088 0.629-0.131 0.272     810
 0.388 0.772 1.046-0.067 0.760 0.428 0.852 0.867 0.610 0.359 1.352 0.571     820
-0.011-0.205 1.084 0.009 0.917 0.438 1.050 0.616 0.884 0.954-0.275 1.295     830
 0.346-1.018 1.049 0.417 1.230 1.127 1.435 0.823-0.069 0.464 1.261-0.179     840
 0.812 0.537 0.875 0.190 0.707 0.857 0.094 0.176 0.916 0.406 0.204 0.494     850
 1.709 0.133 0.460 0.828-0.174 0.457 0.584 0.832-0.026 1.265-0.232-0.373     860
-0.172 0.913 0.673 0.303 0.035 1.226-0.072 0.920 1.207-0.003 0.632 0.004     870
 0.951 0.307 0.798 1.479 0.196 1.058 0.873 0.060 0.524 0.501 0.373 0.954     880
-0.072 0.988 0.351 0.053 0.248 0.430-0.379 0.533 0.688 0.524 0.447 1.376     890
-0.263-0.064 0.301 1.486 0.351 0.806-0.374 0.735 0.958-0.262 0.332 0.963     900
999999                                                                       910
$EOD
.ASSIGN CDR 5
.ASSIGN LPT 6
.SET CDR KOL
.EXECUTE/REL KOLM,WES:SSP/LIB
%FIN::
.DELETE KOL.CDR