Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0026/corre.doc
There are 2 other files named corre.doc in the archive. Click here to see a list.
SUBROUTINE CORRE

PURPOSE
   COMPUTE MEANS, STANDARD DEVIATIONS, SUMS OF CROSS-PRODUCTS
   OF DEVIATIONS, AND CORRELATION COEFFICIENTS.

USAGE
   CALL CORRE (N,M,IO,X,XBAR,STD,RX,R,B,D,T)

DESCRIPTION OF PARAMETERS
   N	 - NUMBER OF OBSERVATIONS. N MUST BE > OR = TO 2.
   M	 - NUMBER OF VARIABLES. M MUST BE > OR = TO 1.
   IO	 - OPTION CODE FOR INPUT DATA
	   0 IF DATA ARE TO BE READ IN FROM INPUT DEVICE IN THE
	     SPECIAL SUBROUTINE NAMED DATA.  (SEE SUBROUTINES
	     USED BY THIS SUBROUTINE BELOW.)
	   1 IF ALL DATA ARE ALREADY IN CORE.
   X	 - IF IO=0, THE VALUE OF X IS 0.0.
	   IF IO=1, X IS THE INPUT MATRIX (N BY M) CONTAINING
		    DATA.
   XBAR  - OUTPUT VECTOR OF LENGTH M CONTAINING MEANS.
   STD	 - OUTPUT VECTOR OF LENGTH M CONTAINING STANDARD
	   DEVIATIONS.
   RX	 - OUTPUT MATRIX (M X M) CONTAINING SUMS OF CROSS-
	   PRODUCTS OF DEVIATIONS FROM MEANS.
   R	 - OUTPUT MATRIX (ONLY UPPER TRIANGULAR PORTION OF THE
	   SYMMETRIC MATRIX OF M BY M) CONTAINING CORRELATION
	   COEFFICIENTS.  (STORAGE MODE OF 1)
   B	 - OUTPUT VECTOR OF LENGTH M CONTAINING THE DIAGONAL
	   OF THE MATRIX OF SUMS OF CROSS-PRODUCTS OF
	   DEVIATIONS FROM MEANS.
   D	 - WORKING VECTOR OF LENGTH M.
   T	 - WORKING VECTOR OF LENGTH M.

REMARKS
   CORRE WILL NOT ACCEPT A CONSTANT VECTOR.

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   DATA(M,D) - THIS SUBROUTINE MUST BE PROVIDED BY THE USER.
	       (1) IF IO=0, THIS SUBROUTINE IS EXPECTED TO
		   FURNISH AN OBSERVATION IN VECTOR D FROM AN
		   EXTERNAL INPUT DEVICE.
	       (2) IF IO=1, THIS SUBROUTINE IS NOT USED BY
		   CORRE BUT MUST EXIST IN JOB DECK. IF USER
		   HAS NOT SUPPLIED A SUBROUTINE NAMED DATA,
		   THE FOLLOWING IS SUGGESTED.
			SUBROUTINE DATA
			RETURN
			END

METHOD
   PRODUCT-MOMENT CORRELATION COEFFICIENTS ARE COMPUTED.