Trailing-Edge
-
PDP-10 Archives
-
decus_20tap2_198111
-
decus/20-0026/tetra.doc
There are 2 other files named tetra.doc in the archive. Click here to see a list.
SUBROUTINE TETRA
PURPOSE
COMPUTE A TETRACHORIC CORRELATION COEFFICIENT BETWEEN TWO
VARIABLES WHERE DATA IN BOTH VARIABLES HAVE BEEN REDUCED
ARTIFICIALLY TO TWO CATEGORIES.
USAGE
CALL TETRA (N,U,V,HU,HV,R,RS,IE)
DESCRIPTION OF PARAMETERS
N - NUMBER OF OBSERVATIONS
U - INPUT VECTOR OF LENGTH N CONTAINING THE FIRST VARIABLE
REDUCED TO TWO CATEGORIES
V - INPUT VECTOR OF LENGTH N CONTAINING THE SECOND VARIABLE
REDUCED TO TWO CATEGORIES
HU - INPUT NUMERICAL CODE INDICATING THE HIGHER CATEGORY OF
THE FIRST VARIABLE. IF ANY VALUE OF VARIABLE U IS
EQUAL TO OR GREATER THAN HU, IT WILL BE CLASSIFIED AS
THE HIGHER CATEGORY, OTHERWISE AS THE LOWER CATEGORY.
HV - SAME AS HU EXCEPT THAT HV IS FOR THE SECOND VARIABLE.
R - TETRACHORIC CORRELATION COMPUTED
RS - STANDARD ERROR OF TETRACHORIC CORRELATION COMPUTED
IE - ERROR CODE
0 - NO ERROR
1 - UNABLE TO COMPUTE A TETRACHORIC CORRELATION DUE TO
THE FACT THAT AT LEAST ONE CELL SHOWS ZERO FRE-
QUENCY IN THE 2X2 CONTINGENCY TABLE CONSTRUCTED
FROM INPUT DATA. IN THIS CASE, R AND RS ARE SET
TO 10**75. (SEE GUILFORD, 1956)
2 - THE ROOT SOLVER GIVES MULTIPLE ROOTS, OR NO ROOTS,
R, IN THE INTERVAL (-1,1) INCLUSIVE. R AND RS ARE
SET TO 10**75.
3 - UNABLE TO COMPUTE A SATISFACTORY VALUE OF TETRA-
CHORIC CORRELATION USING NEWTON-RAPHSON METHOD OF
APPROXIMATION TO THE ROOT OF THE EQUATION. R AND
RS ARE SET TO 10**75. SEE SUBROUTINE POLRT ERROR
INDICATORS.
4 - HIGH ORDER COEFFICIENT OF THE POLYNOMIAL IS ZERO.
SEE SUBROUTINE POLRT ERROR INDICATORS.
REMARKS
VALUES OF VARIABLES U AND V MUST BE NUMERICAL, AND
ALPHABETIC AND SPECIAL CHARACTERS MUST NOT BE USED.
FOR A DEPENDABLE RESULT FOR TETRACHORIC CORRELATION,
IT IS RECOMMENDED THAT N BE AT LEAST 200 OR GREATER.
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
NDTRI
POLRT--THIS POLYNOMIAL ROOT ROUTINE WAS SELECTED BECAUSE OF
ITS SMALL STORAGE REQUIREMENT. OTHER SSP ROUTINES
WHICH COULD REPLACE POLRT ARE PRQD AND PRBM. THEIR
USE WOULD REQUIRE MODIFICATION OF TETRA.
METHOD
REFER TO J. P. GUILFORD, 'FUNDAMENTAL STATISTICS IN PSYCHO-
LOGY AND EDUCATION', MCGRAW-HILL, NEW YORK, 1956, CHAPTER 13
AND W. P. ELDERTON, 'FREQUENCY CURVES AND CORRELATION' 4-TH
ED., CAMBRIDGE UNIVERSITY PRESS, 1953, CHAPTER 9.