SUBROUTINE CORREL ( X, XM, S, COR, NAMX, NAMY, N, NOBS, NB, NXX, NCOR )

Argument Definitions (+ indicates altered content)
CHARACTER*10      +NAMX(NB),   NAMY
DOUBLE PRECISION  +COR(NXX),  +S(NB),      X(N,NB),    XM(NB)
INTEGER            N,          NB,         NCOR,       NOBS
INTEGER            NXX
Description
INPUT: 
  X     (n x nb) Matrix of (original or transformed) Independent Varia 
        excluding the Constant which has been replaced by the (origina 
        transformed) Dependent Variable Y, used in ESTIMATION. 
  XM    (nb) Vector of Means of the Independent Variables, excluding t 
        Constant which has been replaced by the Dependent Variable Y, 
        in ESTIMATION. 
  NAMX  (nb) Vector of Names of the Independent Variables, including t 
        Constant, used in ESTIMATION. 
  NAMY  Name of the Dependent Variable Y used in ESTIMATION. 
  N     Maximum Number of Observations as declared on the Parameter ca 
        in Subroutine FCN. 
  NOBS  Number of Observations used in ESTIMATION. 
  NB    Number of Independent Variables, including the Constant, used 
        ESTIMATION. 
  NXX   Maximum Number of Different Elements in the (nx x nx) Symmetri 
        Matrix COR, stored columnwise as an upper triangular matrix. 
        This number is declared on the Parameter card in Subroutine FC 
  NCOR  = 2 - Table of Variance-Decomposition Proportions for the inde 
              variables X (including the Constant) and Correlation Mat 
              the independent variables X (excluding the Constant) and 
              dependent variable Y. Both tables are computed and print 
              the original and transformed variables. 
        = 1 - Both tables are computed and printed for the transformed 
              bles only. 
        = 0 - No print for the two tables, but only the correlation ma 
              for X and Y is computed for TABLEX program which needs t 
              results in terms of the original and transformed variabl 
WORK VECTOR: 
  S     (nb) Vector used to store temporarily the diagonal elements of 
        matrix of cross-products X'X where X is expressed in deviation 
        around the mean XM. 
OUTPUT: 
  COR   (nx x nx) Symmetric Matrix, stored columnwise as an upper tria 
        matrix containing the pairwise correlations among the Independ 
        Variables X (excluding the Constant) and the Dependent Variabl 
PURPOSE: 
  Compute the Correlation Matrix of the Independent Variables X (exclu 
  the Constant) and the Dependent Variable Y. 
  The correlation matrix is stored columnwise in an upper triangular f 
  but is printed in a lower triangular form.
Source file:correl.f
I/O Operations:
Unit ID  Unit No       Access  Form   Operation
      *                   SEQ  FMTD           W  

Operation codes A=rewind,B=backspace,C=close,E=endfile
                I=inquire,O=open,R=read,W=write
Intrinsic Functions Called
DOUBLE PRECISION   DSQRT
SUBROUTINE         LOC
External Functions and Subroutines Called
SUBROUTINE         LOC
Local Variables (+ indicates altered content)
INTEGER           +I,         +I1,        +I2,        +IJ
INTEGER           +IR,        +J,          J1,        +J2
INTEGER           +K,         +NCOL,      +NP
Referenced Common Block Variables (+ indicates altered content)
%BLANK             INTEGER            NOPRINT