Google
 

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

PURPOSE
   COMPUTE A SET OF LINEAR FUNCTIONS WHICH SERVE AS INDICES
   FOR CLASSIFYING AN INDIVIDUAL INTO ONE OF SEVERAL GROUPS.
   NORMALLY THIS SUBROUTINE IS USED IN THE PERFORMANCE OF
   DISCRIMINANT ANALYSIS.

USAGE
   CALL DISCR (K,M,N,X,XBAR,D,CMEAN,V,C,P,LG)

DESCRIPTION OF PARAMETERS
   K	 - NUMBER OF GROUPS. K MUST BE GREATER THAN ONE.
   M	 - NUMBER OF VARIABLES
   N	 - INPUT VECTOR OF LENGTH K CONTAINING SAMPLE SIZES OF
	   GROUPS.
   X	 - INPUT VECTOR CONTAINING DATA IN THE MANNER EQUIVA-
	   LENT TO A 3-DIMENSIONAL FORTRAN ARRAY, X(1,1,1),
	   X(2,1,1), X(3,1,1), ETC.  THE FIRST SUBSCRIPT IS
	   CASE NUMBER, THE SECOND SUBSCRIPT IS VARIABLE NUMBER
	   AND THE THIRD SUBSCRIPT IS GROUP NUMBER.  THE
	   LENGTH OF VECTOR X IS EQUAL TO THE TOTAL NUMBER OF
	   DATA POINTS, T*M, WHERE T = N(1)+N(2)+...+N(K).
   XBAR  - INPUT MATRIX (M X K) CONTAINING MEANS OF M VARIABLES
	   IN K GROUPS
   D	 - INPUT MATRIX (M X M) CONTAINING THE INVERSE OF
	   POOLED DISPERSION MATRIX.
   CMEAN - OUTPUT VECTOR OF LENGTH M CONTAINING COMMON MEANS.
   V	 - OUTPUT VARIABLE CONTAINING GENERALIZED MAHALANOBIS
	   D-SQUARE.
   C	 - OUTPUT MATRIX (M+1 X K) CONTAINING THE COEFFICIENTS
	   OF DISCRIMINANT FUNCTIONS.  THE FIRST POSITION OF
	   EACH COLUMN (FUNCTION) CONTAINS THE VALUE OF THE
	   CONSTANT FOR THAT FUNCTION.
   P	 - OUTPUT VECTOR CONTAINING THE PROBABILITY ASSOCIATED
	   WITH THE LARGEST DISCRIMINANT FUNCTIONS OF ALL CASES
	   IN ALL GROUPS.  CALCULATED RESULTS ARE STORED IN THE
	   MANNER EQUIVALENT TO A 2-DIMENSIONAL AREA (THE
	   FIRST SUBSCRIPT IS CASE NUMBER, AND THE SECOND
	   SUBSCRIPT IS GROUP NUMBER).	VECTOR P HAS LENGTH
	   EQUAL TO THE TOTAL NUMBER OF CASES, T (T = N(1)+N(2)
	   +...+N(K)).
   LG	 - OUTPUT VECTOR CONTAINING THE SUBSCRIPTS OF THE
	   LARGEST DISCRIMINANT FUNCTIONS STORED IN VECTOR P.
	   THE LENGTH OF VECTOR LG IS THE SAME AS THE LENGTH
	   OF VECTOR P.

REMARKS
   THE NUMBER OF VARIABLES MUST BE GREATER THAN OR EQUAL TO
   THE NUMBER OF GROUPS.

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   NONE

METHOD
   REFER TO 'BMD COMPUTER PROGRAMS MANUAL', EDITED BY W. J.
   DIXON, UCLA, 1964, AND T. W. ANDERSON, 'INTRODUCTION TO
   MULTIVARIATE STATISTICAL ANALYSIS', JOHN WILEY AND SONS,
   1958, SECTION 6.6-6.8.