Google
 

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

PURPOSE
   CALCULATE TOTAL, MEAN, STANDARD DEVIATION, MINIMUM, MAXIMUM
   FOR EACH VARIABLE IN A SET (OR A SUBSET) OF OBSERVATIONS

USAGE
   CALL TALLY(A,S,TOTAL,AVER,SD,VMIN,VMAX,NO,NV,IER)

DESCRIPTION OF PARAMETERS
   A	 - OBSERVATION MATRIX, NO BY NV
   S	 - INPUT VECTOR INDICATING SUBSET OF A. ONLY THOSE
	   OBSERVATIONS WITH A NON-ZERO S(J) ARE CONSIDERED.
	   VECTOR LENGTH IS NO.
   TOTAL - OUTPUT VECTOR OF TOTALS OF EACH VARIABLE. VECTOR
	   LENGTH IS NV.
   AVER  - OUTPUT VECTOR OF AVERAGES OF EACH VARIABLE. VECTOR
	   LENGTH IS NV.
   SD	 - OUTPUT VECTOR OF STANDARD DEVIATIONS OF EACH
	   VARIABLE. VECTOR LENGTH IS NV.
   VMIN  - OUTPUT VECTOR OF MINIMA OF EACH VARIABLE. VECTOR
	   LENGTH IS NV.
   VMAX  - OUTPUT VECTOR OF MAXIMA OF EACH VARIABLE. VECTOR
	   LENGTH IS NV.
   NO	 - NUMBER OF OBSERVATIONS
   NV	 - NUMBER OF VARIABLES FOR EACH OBSERVATION
   IER	 - ZERO, IF NO ERROR.
	 - 1, IF S IS NULL.  VMIN=-1.E75, VMAX=SD=AVER=1.E75.
	 - 2, IF S HAS ONLY ONE NON-ZERO ELEMENT. VMIN=VMAX.
	   SD=0.0

REMARKS
   NONE

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   NONE

METHOD
   ALL OBSERVATIONS CORRESPONDING TO A NON-ZERO ELEMENT IN S
   VECTOR ARE ANALYZED FOR EACH VARIABLE IN MATRIX A.
   TOTALS ARE ACCUMULATED AND MINIMUM AND MAXIMUM VALUES ARE
   FOUND. FOLLOWING THIS, MEANS AND STANDARD DEVIATIONS ARE
   CALCULATED.	THE DIVISOR FOR STANDARD DEVIATION IS ONE LESS
   THAN THE NUMBER OF OBSERVATIONS USED.