Google
 

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

PURPOSE
   TO COMPUTE THE PHI COEFFICIENT BETWEEN TWO VARIABLES  WHICH
   ARE DICHOTOMOUS.

USAGE
   CALL PHI (N,U,V,HU,HV,P,CH,XP,IE)

DESCRIPTION OF PARAMETERS
   N  - NUMBER OF OBSERVATIONS
   U  - INPUT VECTOR OF LENGTH N CONTAINING THE FIRST DICHOTO-
	MOUS VARIABLE
   V  - INPUT VECTOR OF LENGTH N CONTAINING THE SECOND DICHOTO-
	MOUS VARIABLE
   HU - INPUT NUMERICAL CODE WHICH INDICATES THE HIGHER
	CATEGORY OF THE FIRST VARIABLE.  ANY OBSERVATION IN
	VECTOR U WHICH HAS A VALUE EQUAL TO OR GREATER THAN HU
	WILL BE CLASSIFIED IN THE HIGHER CATEGORY.
   HV - INPUT NUMERICAL CODE FOR VECTOR V, SIMILAR TO HU
   P  - PHI COEFFICIENT COMPUTED
   CH - CHI-SQUARE COMPUTED AS A FUNCTION OF PHI COEFFICIENT
	(DEGREES OF FREEDOM FOR CHI-SQUARE = 1)
   XP - COMPUTED VALUE OF THE MAXIMAL PHI COEFFICIENT THAT
	CAN BE ATTAINED IN THE PROBLEM
   IE - IF IE IS NON-ZERO, SOME CELL IN THE 2 BY 2 TABLE IS
	NULL.  IF SO, P, CH, AND XP ARE SET TO 10**75.

REMARKS
   VARIABLES U AND V MUST BE SPECIFIED NUMERIC.
   THE PHI COEFFICIENT IS A SPECIAL CASE OF THE
   PEARSON PRODUCT-MOMENT CORRELATION WHEN BOTH VARIABLES ARE
   BINARY.

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   NONE

METHOD
   REFER TO P. HORST, 'PYSCHOLOGICAL MEASUREMENT AND
   PREDICTION', P. 94 (WADSWORTH, 1966).