Google
 

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

PURPOSE
   PLACE DATA FOR ANALYSIS OF VARIANCE IN PROPERLY DISTRIBUTED
   POSITIONS OF STORAGE.  THIS SUBROUTINE IS NORMALLY FOLLOWED
   BY CALLS TO AVCAL AND MEANQ SUBROUTINES IN THE PERFORMANCE
   OF ANALYSIS OF VARIANCE FOR A COMPLETE FACTORIAL DESIGN.

USAGE
   CALL AVDAT (K,LEVEL,N,X,L,ISTEP,KOUNT)

DESCRIPTION OF PARAMETERS
   K	 - NUMBER OF VARIABLES (FACTORS). K MUST BE .GT. ONE.
   LEVEL - INPUT VECTOR OF LENGTH K CONTAINING LEVELS (CATE-
	   GORIES) WITHIN EACH VARIABLE.
   N	 - TOTAL NUMBER OF DATA POINTS READ IN.
   X	 - WHEN THE SUBROUTINE IS CALLED, THIS VECTOR CONTAINS
	   DATA IN LOCATIONS X(1) THROUGH X(N).  UPON RETURNING
	   TO THE CALLING ROUTINE, THE VECTOR CONTAINS THE DATA
	   IN PROPERLY REDISTRIBUTED LOCATIONS OF VECTOR X.
	   THE LENGTH OF VECTOR X IS CALCULATED BY (1) ADDING
	   ONE TO EACH LEVEL OF VARIABLE AND (2) OBTAINING THE
	   CUMULATIVE PRODUCT OF ALL LEVELS.  (THE LENGTH OF
	   X = (LEVEL(1)+1)*(LEVEL(2)+1)*...*(LEVEL(K)+1).)
   L	 - OUTPUT VARIABLE CONTAINING THE POSITION IN VECTOR X
	   WHERE THE LAST INPUT DATA IS STORED.
   ISTEP - OUTPUT VECTOR OF LENGTH K CONTAINING CONTROL STEPS
	   WHICH ARE USED TO LOCATE DATA IN PROPER POSITIONS
	   OF VECTOR X.
   KOUNT - WORKING VECTOR OF LENGTH K.

REMARKS
   INPUT DATA MUST BE ARRANGED IN THE FOLLOWING MANNER.
   CONSIDER THE 3-VARIABLE ANALYSIS OF VARIANCE DESIGN, WHERE
   ONE VARIABLE HAS 3 LEVELS AND THE OTHER TWO VARIABLES HAVE
   2 LEVELS.  THE DATA MAY BE REPRESENTED IN THE FORM X(I,J,K),
   I=1,2,3  J=1,2  K=1,2.  IN ARRANGING DATA, THE INNER
   SUBSCRIPT, NAMELY I, CHANGES FIRST.	WHEN I=3, THE NEXT
   INNER SUBSCRIPT, J, CHANGES AND SO ON UNTIL I=3, J=2, AND
   K=2.

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   NONE

METHOD
   THE METHOD IS BASED ON THE TECHNIQUE DISCUSSED BY H. O.
   HARTLEY IN 'MATHEMATICAL METHODS FOR DIGITAL COMPUTERS',
   EDITED BY A. RALSTON AND H. WILF, JOHN WILEY AND SONS,
   1962, CHAPTER 20.