C     SSA4                                                              SA4   1 
C     SMALLEST SPACE ANALYSIS WITH UNKNOWN COMMUNALITIES - G-L(SSA-IV). SA4   2 
C     PROGRAMMED IN FORTRAN II BY J. C. LINGOES - 2/15/66.  NSF-GS-929. SA4   3 
C     IN GENERAL THIS PROGRAM SHOULD BE RESTRICTED TO PROXIMITY MEASURESSA4   4 
C     AND MORE SPECIFICALLY CORRELATIONS OR COVARIANCES.                SA4   5 
C                                                                       SA4   6 
C     DECK SET-UP FOR G-L(SSA-IV) -                                     SA4   7 
C                                                                       SA4   8 
C        1.  SYSTEM ID CARD/S.                                          SA4   9 
C        2.  BINARY PROGRAM.                                            SA4  10 
C        3.  TITLE CARD (SEE SSA-I).                                    SA4  11 
C        4.  PARAMETER CARD, 6 4-COLUMN FIELDS CONTAINING THE FOLLOWING SA4  12 
C            INFORMATION SERIATUM -                                     SA4  13 
C            A)  NV= THE NUMBER OF VARIABLES (.LE. 60),                 SA4  14 
C            B)  M=THE MINIMUM NUMBER OF DIMENSIONS DESIRED (1 TO MAXD),SA4  15 
C            C)  MAXD= THE MAXIMUM NUMBER OF DIMENSIONS DESIRED .LE.    SA4  16 
C                (NV,10)MIN,                                            SA4  17 
C            D)  ITER=NUMBER OF ITERATIONS,                             SA4  18 
C            E)  IFC=1 IF COORDINATES FOR 2 OR MORE DIMENSIONS ARE TO BESA4  19 
C                PUNCHED, OTHERWISE SET TO ZERO OR LEAVE BLANK,         SA4  20 
C            F)  CMON=CUT-OUT FOR COEFFICIENT OF MONOTONICITY (.G. 0 BUTSA4  21 
C                .LE. 1.00), WHICH MUST INCLUDE DECIMAL POINT.          SA4  22 
C        5.  FORMAT CARD.                                               SA4  23 
C        6.  DATA (SAME AS FOR SSA-I, Q.V.).                            SA4  24 
C        7.  REPEAT ITEMS 3-6 FOR ADDITIONAL RUNS.                      SA4  25 
C                                                                       SA4  26 
C     *** REFERENCES - LINGOES, J. C.  AN IBM-7090 PROGRAM FOR GUTTMAN- SA4  27 
C                                  LINGOES SMALLEST SPACE ANALYSIS - IV.SA4  28 
C                                  BEHAV. SCI., 1966, 11, 407.          SA4  29 
C                                                                       SA4  30 
C     *** OBSERVE COMMENT CARDS FOR PROGRAMMING NOTES FOR ADAPTING TO   SA4  31 
C     OTHER SYSTEMS.                                                    SA4  32 
C                                                                       SA4  33 
      DIMENSION FMT(18), R(60,60), S(60), SSTAR(60), W(60), D(60,60), X(SA4  34 
     160,10), E(60,60), F(60), ABAR(60,60), BBAR(60,60), C(60,60)       SA4  35 
      COMMON R,D,X,E,ABAR,BBAR                                          SA4  36 
      EQUIVALENCE (S,W), (SSTAR,F), (ABAR,C)                            SA4  37 
C                                                                       SA4  38 
C     SUBROUTINES NEEDED=EIGEN AND PLOT ***                             SA4  39 
C                                                                       SA4  40 
      DEFINE FILE 13(3000,255,L,KT)                                     SA4  41 
C     TAPE ASSIGNMENTS                                                  SA4  42 
      ITAPE=5                                                           SA4  43 
      JTAPE=6                                                           SA4  44 
C     READ TITLE, PARAMETERS, AND FORMAT                                SA4  45 
1     READ (ITAPE,79)                                                   SA4  46 
      READ (ITAPE,80) NV,M,MAXD,ITER,IFC,CMON                           SA4  47 
      READ (ITAPE,81) (FMT(J),J=1,18)                                   SA4  48 
      KT=1                                                              SA4  49 
      NVM1=NV-1                                                         SA4  50 
      MD=60                                                             SA4  51 
      ND=10                                                             SA4  52 
      DO 2 I=1,NVM1                                                     SA4  53 
      IP1=I+1                                                           SA4  54 
2     READ (ITAPE,FMT) (R(I,J),J=IP1,NV)                                SA4  55 
      DO 3 I=1,NVM1                                                     SA4  56 
      R(I,I)=0.                                                         SA4  57 
      IP1=I+1                                                           SA4  58 
      DO 3 J=IP1,NV                                                     SA4  59 
3     R(J,I)=R(I,J)                                                     SA4  60 
      R(NV,NV)=0.                                                       SA4  61 
      CALL MXOUT (R,NV,-1)                                              SA4  62 
C     CHECK FOR SINGLE DIMENSION                                        SA4  63 
      SUM=0.                                                            SA4  64 
      DO 5 I=1,NV                                                       SA4  65 
      S(I)=0.                                                           SA4  66 
      SSTAR(I)=0.                                                       SA4  67 
      DO 4 J=1,NV                                                       SA4  68 
      S(I)=S(I)+R(I,J)                                                  SA4  69 
4     SSTAR(I)=SSTAR(I)+R(I,J)**2                                       SA4  70 
5     SUM=SUM+S(I)                                                      SA4  71 
      DO 6 J=1,NV                                                       SA4  72 
      W(J)=(SUM-2.*S(J))/(S(J)**2-SSTAR(J))                             SA4  73 
6     W(J)=SIGN(SQRT(ABS(W(J))),W(J))                                   SA4  74 
C     COMPUTE CORRECTED COEFFICIENTS                                    SA4  75 
      SUM=0.                                                            SA4  76 
      SUMSQ=0.                                                          SA4  77 
      DO 8 I=1,NVM1                                                     SA4  78 
      IP1=I+1                                                           SA4  79 
      DO 7 J=IP1,NV                                                     SA4  80 
      R(J,I)=W(I)*R(J,I)*W(J)                                           SA4  81 
      SUM=SUM+R(J,I)                                                    SA4  82 
7     SUMSQ=SUMSQ+R(J,I)**2                                             SA4  83 
8     CONTINUE                                                          SA4  84 
      FN=NV*NVM1                                                        SA4  85 
      FN=2./FN                                                          SA4  86 
      SUM=FN*SUM                                                        SA4  87 
      SUMSQ=FN*SUMSQ                                                    SA4  88 
      STEST=SUMSQ-2.*SUM+1.                                             SA4  89 
      IF (STEST-.0001) 9,9,10                                           SA4  90 
9     WRITE (JTAPE,79)                                                  SA4  91 
      WRITE (JTAPE,82) STEST                                            SA4  92 
      WRITE (JTAPE,83) (W(J),J=1,NV)                                    SA4  93 
      CALL MXOUT (R,NV,0)                                               SA4  94 
      GO TO 1                                                           SA4  95 
C     OBTAIN PRINCIPAL AXIS INITIAL CONFIGURATION                       SA4  96 
10    DO 11 I=1,NVM1                                                    SA4  97 
      IP1=I+1                                                           SA4  98 
      DO 11 J=IP1,NV                                                    SA4  99 
      E(J,I)=SUM-R(J,I)                                                 SA4 100 
11    E(I,J)=E(J,I)                                                     SA4 101 
      DO 14 I=1,NV                                                      SA4 102 
      E(I,I)=0.                                                         SA4 103 
      DO 13 J=1,NV                                                      SA4 104 
      IF (I-J) 12,13,12                                                 SA4 105 
12    E(I,I)=E(I,I)+E(I,J)                                              SA4 106 
13    CONTINUE                                                          SA4 107 
14    E(I,I)=-E(I,I)                                                    SA4 108 
C     CALL ON HOUSEHOLDER SUBROUTINE                                    SA4 109 
      CALL EIGEN (E,C,NV,F,MAXD,MD,X(1,1),X(1,4),X(1,5),X(1,6),X(1,7),X(SA4 110 
     11,8))                                                             SA4 111 
      KK=0                                                              SA4 112 
      DO 16 K=1,MAXD                                                    SA4 113 
      IF (F(K)-.00001) 17,17,15                                         SA4 114 
15    KK=KK+1                                                           SA4 115 
      DO 16 I=1,NV                                                      SA4 116 
16    X(I,KK)=C(I,KK)                                                   SA4 117 
17    MAXD=KK                                                           SA4 118 
      WRITE (JTAPE,79)                                                  SA4 119 
      WRITE (JTAPE,84) (KK,KK=1,MAXD)                                   SA4 120 
      WRITE (JTAPE,85)                                                  SA4 121 
      DO 18 I=1,NV                                                      SA4 122 
18    WRITE (JTAPE,86) I,(X(I,J),J=1,MAXD)                              SA4 123 
      WRITE (JTAPE,87) (F(J),J=1,MAXD)                                  SA4 124 
      PRESTR=-1.                                                        SA4 125 
      IF (MAXD-M) 20,21,19                                              SA4 126 
19    KK=MAXD-1                                                         SA4 127 
C     SAVE INITIAL CONFIGURATION                                        SA4 128 
      WRITE (13'KT) ((X(I,J),I=1,NV),J=1,KK)                            SA4 129 
      KT=1                                                              SA4 130 
      GO TO 21                                                          SA4 131 
20    M=MAXD                                                            SA4 132 
21    M=M-1                                                             SA4 133 
      GO TO 23                                                          SA4 134 
22    READ (13'KT) ((X(I,J),I=1,NV),J=1,M)                              SA4 135 
      KT=1                                                              SA4 136 
C     BEGIN SSA-IV ITERATIONS                                           SA4 137 
23    M=M+1                                                             SA4 138 
      FN=0.                                                             SA4 139 
      ITCT=0                                                            SA4 140 
      JJ=0                                                              SA4 141 
C     NORMALIZE X(I,K) TO UNIT LENGTH                                   SA4 142 
24    XSTAR=0.                                                          SA4 143 
      STEST=FN                                                          SA4 144 
      ITCT=ITCT+1                                                       SA4 145 
      DO 25 K=1,M                                                       SA4 146 
      DO 25 I=1,NV                                                      SA4 147 
25    XSTAR=XSTAR+X(I,K)**2                                             SA4 148 
      SUMSQ=SQRT(XSTAR)                                                 SA4 149 
      DO 26 K=1,M                                                       SA4 150 
      DO 26 I=1,NV                                                      SA4 151 
26    X(I,K)=X(I,K)/SUMSQ                                               SA4 152 
C     CALCULATE D**2                                                    SA4 153 
      DO 28 I=1,NVM1                                                    SA4 154 
      D(I,I)=0.                                                         SA4 155 
      IP1=I+1                                                           SA4 156 
      DO 28 J=IP1,NV                                                    SA4 157 
      D(I,J)=0.                                                         SA4 158 
      DO 27 K=1,M                                                       SA4 159 
27    D(I,J)=D(I,J)+(X(I,K)-X(J,K))**2                                  SA4 160 
28    D(J,I)=D(I,J)                                                     SA4 161 
      D(NV,NV)=0.                                                       SA4 162 
C     COMPUTE ABAR(I,J),A(I,J),BBAR(I,J), AND B(I,J)                    SA4 163 
      DO 32 I=1,NVM1                                                    SA4 164 
      IP1=I+1                                                           SA4 165 
      DO 32 J=IP1,NV                                                    SA4 166 
      ABAR(I,J)=0.                                                      SA4 167 
      BBAR(I,J)=0.                                                      SA4 168 
      ABAR(J,I)=0.                                                      SA4 169 
      BBAR(J,I)=0.                                                      SA4 170 
C     CALCULATE B(K,L/I,J)                                              SA4 171 
      DO 29 K=1,NVM1                                                    SA4 172 
      KP1=K+1                                                           SA4 173 
      DO 29 L=KP1,NV                                                    SA4 174 
29    E(K,L)=D(I,J)-D(K,L)                                              SA4 175 
C     CALCULATE A(K,L/I,J)                                              SA4 176 
      DO 30 K=1,NVM1                                                    SA4 177 
      KP1=K+1                                                           SA4 178 
      DO 30 L=KP1,NV                                                    SA4 179 
30    E(L,K)=R(J,I)-R(L,K)                                              SA4 180 
C     COMPUTE I,J ELEMENT OF ABAR,A,BBAR, AND B                         SA4 181 
      DO 31 K=1,NVM1                                                    SA4 182 
      KP1=K+1                                                           SA4 183 
      DO 31 L=KP1,NV                                                    SA4 184 
      ABAR(I,J)=ABAR(I,J)+SIGN(E(L,K),E(K,L))                           SA4 185 
      ABAR(J,I)=ABAR(J,I)+E(L,K)                                        SA4 186 
      BBAR(I,J)=BBAR(I,J)+SIGN(E(K,L),E(L,K))                           SA4 187 
31    BBAR(J,I)=BBAR(J,I)+E(K,L)                                        SA4 188 
32    CONTINUE                                                          SA4 189 
C     CALCULATE (A)(I,J) AND (ABAR)(I,J)                                SA4 190 
      DO 33 I=1,NVM1                                                    SA4 191 
      IP1=I+1                                                           SA4 192 
      DO 33 J=IP1,NV                                                    SA4 193 
      D(I,J)=ABAR(J,I)                                                  SA4 194 
      D(J,I)=D(I,J)                                                     SA4 195 
      E(I,J)=ABAR(I,J)                                                  SA4 196 
33    E(J,I)=E(I,J)                                                     SA4 197 
      DO 36 I=1,NV                                                      SA4 198 
      D(I,I)=0.                                                         SA4 199 
      E(I,I)=0.                                                         SA4 200 
      DO 35 J=1,NV                                                      SA4 201 
      IF (I-J) 34,35,34                                                 SA4 202 
34    D(I,I)=D(I,I)-D(I,J)                                              SA4 203 
      E(I,I)=E(I,I)+E(I,J)                                              SA4 204 
      E(I,J)=-E(I,J)                                                    SA4 205 
35    CONTINUE                                                          SA4 206 
36    CONTINUE                                                          SA4 207 
C     CALCULATE (B)(I,J) AND (BBAR)(I,J)                                SA4 208 
      DO 37 I=1,NVM1                                                    SA4 209 
      IP1=I+1                                                           SA4 210 
      DO 37 J=IP1,NV                                                    SA4 211 
      BBAR(J,I)=BBAR(J,I)*R(I,J)                                        SA4 212 
37    BBAR(I,J)=-R(I,J)*BBAR(I,J)                                       SA4 213 
C     COMPUTE COEFFICIENT OF MONOTONICITY                               SA4 214 
      U=0.                                                              SA4 215 
      V=0.                                                              SA4 216 
      DO 38 I=1,NVM1                                                    SA4 217 
      IP1=I+1                                                           SA4 218 
      DO 38 J=IP1,NV                                                    SA4 219 
      U=U+W(I)*BBAR(J,I)*W(J)                                           SA4 220 
38    V=V+W(I)*BBAR(I,J)*W(J)                                           SA4 221 
      CM=U/V                                                            SA4 222 
      IF (CM-CMON) 39,56,56                                             SA4 223 
39    IF (JJ) 56,40,56                                                  SA4 224 
C     CALCULATE C(I,J)                                                  SA4 225 
40    DO 41 I=1,NV                                                      SA4 226 
      DO 41 J=1,NV                                                      SA4 227 
41    C(I,J)=D(I,J)-CM*E(I,J)                                           SA4 228 
C     COMPUTE Y(I,K)                                                    SA4 229 
      DO 43 K=1,M                                                       SA4 230 
      DO 43 I=1,NV                                                      SA4 231 
      E(I,K)=0.                                                         SA4 232 
      DO 42 J=1,NV                                                      SA4 233 
42    E(I,K)=E(I,K)+X(J,K)*C(I,J)                                       SA4 234 
43    CONTINUE                                                          SA4 235 
C     COMPUTE NORM OF C(I,J)                                            SA4 236 
      SUMSQ=0.                                                          SA4 237 
      DO 44 I=1,NV                                                      SA4 238 
      DO 44 J=1,NV                                                      SA4 239 
44    SUMSQ=SUMSQ+C(I,J)**2                                             SA4 240 
C     CALCULATE NORM OF Y                                               SA4 241 
      SUM=0.                                                            SA4 242 
      DO 45 K=1,M                                                       SA4 243 
      DO 45 I=1,NV                                                      SA4 244 
45    SUM=SUM+E(I,K)**2                                                 SA4 245 
C     COMPUTE RESIDUAL SQUARES FOR X                                    SA4 246 
      XSTAR=1.-1./XSTAR                                                 SA4 247 
C     COMPUTE OMEGA(X)                                                  SA4 248 
      OX=1./SQRT(SUMSQ/(1.-CM)-SUM)                                     SA4 249 
C     CALCULATE NEW X(I,K)                                              SA4 250 
      DO 46 K=1,M                                                       SA4 251 
      DO 46 I=1,NV                                                      SA4 252 
46    X(I,K)=X(I,K)+OX*E(I,K)                                           SA4 253 
C     CALCULATE D(I,J)                                                  SA4 254 
      DO 47 I=1,NVM1                                                    SA4 255 
      D(I,I)=0.                                                         SA4 256 
      IP1=I+1                                                           SA4 257 
      DO 47 J=IP1,NV                                                    SA4 258 
      D(I,J)=BBAR(J,I)-CM*BBAR(I,J)                                     SA4 259 
47    D(J,I)=D(I,J)                                                     SA4 260 
      D(NV,NV)=0.                                                       SA4 261 
C     CALCULATE COLUMN VECTOR Z(I)                                      SA4 262 
      DO 48 I=1,NV                                                      SA4 263 
      F(I)=0.                                                           SA4 264 
      DO 48 J=1,NV                                                      SA4 265 
48    F(I)=F(I)+W(J)*D(I,J)                                             SA4 266 
C     COMPUTE NORM OF D(I,J)                                            SA4 267 
      SUMSQ=0.                                                          SA4 268 
      DO 49 I=1,NVM1                                                    SA4 269 
      IP1=I+1                                                           SA4 270 
      DO 49 J=IP1,NV                                                    SA4 271 
49    SUMSQ=SUMSQ+D(I,J)**2                                             SA4 272 
      SUMSQ=2.*SUMSQ                                                    SA4 273 
C     COMPUTE NORM OF Z(I)                                              SA4 274 
      SUM=0.                                                            SA4 275 
      DO 50 I=1,NV                                                      SA4 276 
50    SUM=SUM+F(I)**2                                                   SA4 277 
C     COMPUTE NORM OF W(I)                                              SA4 278 
      FN=0.                                                             SA4 279 
      DO 51 I=1,NV                                                      SA4 280 
51    FN=FN+W(I)**2                                                     SA4 281 
C     COMPUTE RESIDUAL SQUARES FOR W                                    SA4 282 
      SW=1.-STEST/FN                                                    SA4 283 
C     COMPUTE OMEGA(W)                                                  SA4 284 
      OX=1./SQRT(SUMSQ/(1.-CM)-SUM/FN)                                  SA4 285 
C     COMPUTE NEW W(I)                                                  SA4 286 
      DO 52 I=1,NV                                                      SA4 287 
52    W(I)=W(I)+OX*F(I)                                                 SA4 288 
C     CALCULATE CORRECTED R(I,J)                                        SA4 289 
      DO 53 I=1,NVM1                                                    SA4 290 
      IP1=I+1                                                           SA4 291 
      DO 53 J=IP1,NV                                                    SA4 292 
53    R(J,I)=W(I)*R(I,J)*W(J)                                           SA4 293 
      IF (ABS(XSTAR+SW)-.000001) 55,54,54                               SA4 294 
54    IF (ITCT-ITER) 24,55,55                                           SA4 295 
55    JJ=1                                                              SA4 296 
      GO TO 24                                                          SA4 297 
56    IF (PRESTR-CM) 57,1,1                                             SA4 298 
57    PRESTR=CM                                                         SA4 299 
C     NORMALIZE CORRECTED COEFFICIENTS                                  SA4 300 
      U=0.                                                              SA4 301 
      DO 59 I=1,NVM1                                                    SA4 302 
      IP1=I+1                                                           SA4 303 
      DO 59 J=IP1,NV                                                    SA4 304 
      IF (U-ABS(R(J,I))) 58,59,59                                       SA4 305 
58    U=ABS(R(J,I))                                                     SA4 306 
59    CONTINUE                                                          SA4 307 
      DO 60 I=1,NVM1                                                    SA4 308 
      IP1=I+1                                                           SA4 309 
      DO 60 J=IP1,NV                                                    SA4 310 
60    R(J,I)=R(J,I)/U                                                   SA4 311 
C     PRINT OUT RESULTS                                                 SA4 312 
      WRITE (JTAPE,79)                                                  SA4 313 
      WRITE (JTAPE,88) M,(MM,MM=1,M)                                    SA4 314 
      WRITE (JTAPE,85)                                                  SA4 315 
      IF (M-2) 66,61,61                                                 SA4 316 
C     ROTATE X(I,K) TO PRINCIPAL AXES                                   SA4 317 
61    DO 63 I=1,NV                                                      SA4 318 
      DO 63 J=I,NV                                                      SA4 319 
      E(I,J)=0.                                                         SA4 320 
      DO 62 K=1,M                                                       SA4 321 
62    E(I,J)=E(I,J)+X(I,K)*X(J,K)                                       SA4 322 
63    E(J,I)=E(I,J)                                                     SA4 323 
      CALL EIGEN (E,C,NV,F,M,MD,X(1,1),X(1,4),X(1,5),X(1,6),X(1,7),X(1,8SA4 324 
     1))                                                                SA4 325 
      DO 65 K=1,M                                                       SA4 326 
      DO 64 I=1,NV                                                      SA4 327 
64    X(I,K)=C(I,K)                                                     SA4 328 
65    CONTINUE                                                          SA4 329 
C     NORMALIZE COORDINATES TO LIE IN RANGE OF +1 TO -1                 SA4 330 
66    SUM=0.                                                            SA4 331 
      DO 68 K=1,M                                                       SA4 332 
      C(1,K)=X(1,K)                                                     SA4 333 
      C(2,K)=X(1,K)                                                     SA4 334 
      DO 67 I=2,NV                                                      SA4 335 
      C(1,K)=AMIN1(C(1,K),X(I,K))                                       SA4 336 
67    C(2,K)=AMAX1(C(2,K),X(I,K))                                       SA4 337 
68    SUM=AMAX1(SUM,(C(2,K)-C(1,K)))                                    SA4 338 
      SUM=2./SUM                                                        SA4 339 
      DO 69 K=1,M                                                       SA4 340 
      DO 69 I=1,NV                                                      SA4 341 
69    E(I,K)=SUM*(X(I,K)-C(1,K))-1.                                     SA4 342 
      DO 70 I=1,NV                                                      SA4 343 
70    WRITE (JTAPE,86) I,(E(I,K),K=1,M)                                 SA4 344 
      WRITE (JTAPE,89) CM,ITCT                                          SA4 345 
      CALL MXOUT (R,NV,0)                                               SA4 346 
      WRITE (JTAPE,79)                                                  SA4 347 
      WRITE (JTAPE,83) (W(J),J=1,NV)                                    SA4 348 
      IF (M-2) 76,71,71                                                 SA4 349 
C     CALL ON PLOT SUBROUTINE                                           SA4 350 
71    CALL PLOT (E,D(1,1),D(1,2),D(1,3),D(1,4),D(1,5),NV,M,MD,ND)       SA4 351 
C     PUNCH COORDINATES IF OPTED                                        SA4 352 
      IF (IFC) 72,74,72                                                 SA4 353 
72    DO 73 I=1,NV                                                      SA4 354 
73    PUNCH 90, (E(I,K),K=1,M)                                          SA4 355 
C     PRINT OUT D**2                                                    SA4 356 
74    DO 75 I=1,NVM1                                                    SA4 357 
      D(I,I)=0.                                                         SA4 358 
      IP1=I+1                                                           SA4 359 
      DO 75 J=IP1,NV                                                    SA4 360 
      D(J,I)=0.                                                         SA4 361 
      DO 75 K=1,M                                                       SA4 362 
75    D(J,I)=D(J,I)+(E(I,K)-E(J,K))**2                                  SA4 363 
      D(NV,NV)=0.                                                       SA4 364 
      CALL MXOUT (D,NV,1)                                               SA4 365 
76    IF (M-MAXD) 77,1,77                                               SA4 366 
C     RENORMALIZE CORRECTED COEFFICIENTS                                SA4 367 
77    DO 78 I=1,NVM1                                                    SA4 368 
      IP1=I+1                                                           SA4 369 
      DO 78 J=IP1,NV                                                    SA4 370 
78    R(J,I)=R(J,I)*U                                                   SA4 371 
      GO TO 22                                                          SA4 372 
C     *** FORMAT STATEMENTS ***                                         SA4 373 
C                                                                       SA4 374 
79    FORMAT (72H                                                       SA4 375 
     1                 )                                                SA4 376 
80    FORMAT (5I4,F4.0)                                                 SA4 377 
81    FORMAT (18A4)                                                     SA4 378 
82    FORMAT (16H0SPEARMAN TEST =,E12.6)                                SA4 379 
83    FORMAT (28H0DIAGONAL ELEMENTS OF R(I,J)/(10E13.6))                SA4 380 
84    FORMAT (40H0PRINCIPAL AXES OF INITIAL CONFIGURATION/10H0DIMENSION,SA4 381 
     110I10)                                                            SA4 382 
85    FORMAT (1H ,130(1H-)/9H0VARIABLE)                                 SA4 383 
86    FORMAT (I5,5X2P10F10.3)                                           SA4 384 
87    FORMAT (10H0 LAMBDA =,10F10.3)                                    SA4 385 
88    FORMAT (32H0G-L(SSA-IV) COORDINATES FOR M =,I3,1H./10H0DIMENSION,1SA4 386 
     10I10)                                                             SA4 387 
89    FORMAT (30H0COEFFICIENT OF MONOTONICITY =,E13.7,4H FOR,I4,12H ITERSA4 388 
     1ATIONS.)                                                          SA4 389 
90    FORMAT (9F8.5)                                                    SA4 390 
      END                                                               SA4 391-
C     MXOUT                                                             MXT   1 
C     SUBROUTINE TO OUTPUT COEFFICIENTS IN MATRIX FORM                  MXT   2 
      SUBROUTINE MXOUT (R,N,ISW)                                        MXT   3 
      DIMENSION R(60,60)                                                MXT   4 
C                                                                       MXT   5 
C     TAPE ASSIGNMENT                                                   MXT   6 
      JTAPE=6                                                           MXT   7 
      K=18                                                              MXT   8 
      I=N/K                                                             MXT   9 
      IF (N-I*K) 2,2,1                                                  MXT  10 
1     I=I+1                                                             MXT  11 
2     ITOTAL=(I*(I+1))/2                                                MXT  12 
      IPAGE=0                                                           MXT  13 
      I1=1-K                                                            MXT  14 
3     I1=I1+K                                                           MXT  15 
      I2=I1+K-1                                                         MXT  16 
      IF (I2-N) 5,5,4                                                   MXT  17 
4     I2=N                                                              MXT  18 
5     J1=1-K                                                            MXT  19 
6     J1=J1+K                                                           MXT  20 
      J2=J1+K-1                                                         MXT  21 
      IF (J2-N) 8,8,7                                                   MXT  22 
7     J2=N                                                              MXT  23 
8     IPAGE=IPAGE+1                                                     MXT  24 
      IF (ISW) 9,10,11                                                  MXT  25 
9     WRITE (JTAPE,20) IPAGE,ITOTAL,(J,J=J1,J2)                         MXT  26 
      GO TO 12                                                          MXT  27 
10    WRITE (JTAPE,22) IPAGE,ITOTAL,(J,J=J1,J2)                         MXT  28 
      GO TO 12                                                          MXT  29 
11    WRITE (JTAPE,23) IPAGE,ITOTAL,(J,J=J1,J2)                         MXT  30 
12    IF (J2-I2) 13,14,14                                               MXT  31 
13    ISWTCH=2                                                          MXT  32 
      GO TO 15                                                          MXT  33 
14    ISWTCH=1                                                          MXT  34 
15    DO 17 I=I1,I2                                                     MXT  35 
      GO TO (16,17), ISWTCH                                             MXT  36 
16    J2=I                                                              MXT  37 
17    WRITE (JTAPE,21) I,(R(I,J),J=J1,J2)                               MXT  38 
      GO TO (18,6), ISWTCH                                              MXT  39 
18    IF (I2-N) 3,19,19                                                 MXT  40 
19    RETURN                                                            MXT  41 
C     *** FORMAT STATEMENTS ***                                         MXT  42 
C                                                                       MXT  43 
20    FORMAT (1H1,36(1H ),47H   O R I G I N A L      C O E F F I C I E NMXT  44 
     1 T S,19(1H ),9HPAGE NO. ,I2,4H OF ,I2//12H0COLUMN =   ,18I6)      MXT  45 
21    FORMAT (1H /8H0 ROW = ,I3,1H ,18(F6.2))                           MXT  46 
22    FORMAT (1H1,36(1H ),47H   C O R R E C T E D    C O E F F I C I E NMXT  47 
     1 T S,19(1H ),9HPAGE NO. ,I2,4H OF ,I2//12H0COLUMN =   ,18I6)      MXT  48 
23    FORMAT (1H1,33(1H ),53HS Q U A R E D   E U C L I D E A N   D I S TMXT  49 
     1 A N C E S,17(1H ),9HPAGE NO. ,I2,4H OF ,I2,//12H0COLUMN =   ,18I6MXT  50 
     2)                                                                 MXT  51 
      END                                                               MXT  52-
1SPEARMAN'S UNIT HIERARCHY                                                      
   9   1   9  25     1.0                                                        
(36F2.2)                                                                        
7263544536271809                                                                
56484032241608                                                                  
423528211407                                                                    
3024181206                                                                      
20151005                                                                        
120804                                                                          
0603                                                                            
02                                                                              
1SUPERDIAGONAL MATRIX.                                                          
   5   2   3  25     1.0                                                        
(4F2.1)                                                                         
10 6 3 1                                                                        
 9 5 2                                                                          
 8 4                                                                            
 7                                                                              
1CORRELATIONAL SIMPLEX - PHI COEFFICIENTS.                                      
   4   1   3  25     1.0                                                        
(3F2.2)                                                                         
614125                                                                          
6741                                                                            
61                                                                              
