Google
 

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

PURPOSE
   COMPUTE CHI-SQUARE FROM A CONTINGENCY TABLE

USAGE
   CALL CHISQ(A,N,M,CS,NDF,IERR,TR,TC)

DESCRIPTION OF PARAMETERS
   A	- INPUT MATRIX, N BY M, CONTAINING CONTINGENCY TABLE
   N	- NUMBER OF ROWS IN A
   M	- NUMBER OF COLUMNS IN A
   CS	- CHI-SQUARE (OUTPUT)
   NDF	- NUMBER OF DEGREES OF FREEDOM (OUTPUT)
   IERR - ERROR CODE (OUTPUT)
	    0 - NORMAL CASE
	    1 - EXPECTED VALUE IS LESS THAN 1.0 IN ONE OR
		MORE CELLS
	    3 - NUMBER OF DEGREES OF FREEDOM IS ZERO
   TR	- WORK VECTOR OF LENGTH N
   TC	- WORK VECTOR OF LENGTH M

REMARKS
   IF ONE OR MORE CELLS CONTAIN AN EXPECTED VALUE (I.E.,
   THEORETICAL VALUE) LESS THAN 1.0, CHI-SQUARE WILL BE
   COMPUTED, BUT ERROR CODE WILL BE SET TO 1.
   SEE REFERENCE GIVEN BELOW.
   CHI-SQUARE IS SET TO ZERO IF EITHER N OR M IS ONE (ERROR
   CODE 3).

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   NONE

METHOD
   DESCRIBED IN S. SIEGEL, 'NONPARAMETRIC STATISTICS FOR THE
   BEHAVIORAL SCIENCES', MCGRAW-HILL, NEW YORK, 1956,
   CHAPTER 6 AND CHAPTER 8.