Abstract

This note describes a function written in APL/360 that computes an analysis of variance table for many kinds of experimental designs (excluding those with unequal n or missing observations). The only argument required by the function is the name of the array containing the data to be analyzed. No declaration of type of design whatsoever is needed. Instead, the Subjects factor is included as a dimension of the data array, an approach described by Lindman (1974, p. 189) as treating Error (subjects as a source of variability) "as a random factor nested in all factors in the design." Beyond this, the function also treats all data arrays as if they were fully crossed designs, with n = 1. In these respects, the function is similar to a FORTRAN routine written by Ogilvie (Note 1), and is also a generalization of computational methods described by Clifford (1968). As an example of the use of this function, consider a classification with factors A (two levels), B (three levels), and Subjects (four). The data are assigned to X, a 2.by 3 by 4 array (see Figure 1). A call to the function (APLAOV X) produces a table of sums of squares, degrees of freedom, and mean squares for the following "effects:" A, B, AB, S, AS, BS, ABS. The function automatically assigns the letters A, If, c, ... , to the first, second, third, ... , dimension of the data array, with the letter "S" assigned to the last dimension. (The data array must be structured so that Subjects is the last dimension.) Denominators of F ratios would be formed from the last four terms by the user. If, for instance, the design was completely randomized (four subjects in each of the six cells), addition of the last four sums of squares, and division by the sum of their degreesof freedom, would produce the usual mean square within cells (assuming fixed effects for A and B). If factor A was between subjects and factor B within subjects, combining the S and AS terms would give the error for testing A, while the BS term alone would be the error for B, etc. In this latter case, the four levels of the Subjects factor would refer to the number of subjects in each level of A, or to the total number of subjects if the designwas entirely repeated measures,with N =4. The function would also produce the necessary sums of squares if the design was hierarchical, if, for instance, factor B was groups nested under A, with four subjects in each nested group. In this case, the sums,of squares for the nested factor would be gotten from A and AB. The procedure generalizes to designs with any number of bases of classification, effectively limited only by workspace size. (Arrays up to rank 63 can be defined in APL.) At the cost of requiring the user to form error terms and perform the final F tests, the function achieves considerable generality and ease of use, due largely to the array definition and manipulation capabilities of APL. It has also proven quite useful didactically. Large ANOVA programs that produce not only F ratios, but p values as well, may not be entirely desirable in a first course analysis of variance, where the student might profit more from having to examine sources of variability in performing F tests. v IPUOV I I I J V-( (pS I.'C£ I pS-O-( 1."-12. ('C£-pH-pl ))-1100 01 rp-'CU'AlCU"O' 13J rpl.c£J-'S' 10J .-"1 Bl ":~I I. J C,-(tv -0I" ptv-tar-(leU2) TI-I.I 17] OIJ J-"I·rIJ-I.1: J-IV IIJ c-,o.o IIJ .«pc,.rplc,lI'OIISQ llOl rC:O-./I (VI,c,ICJI-«C·C.1 )-1) 1 D (11 J ·(cc pC, IIfC 1I2 J SQ,sIJl.(.1 ( ('1 (pOI )pD).2)' ('I£vIC,JI 113J ,O.'D.SIIJ'"I.oIJl IloJ +<1'011,. (UJ ••1 I a J n: +1I-(p£o.(ol I. JcolJ J 11,.01 IIJ) ) ISV 117J U.-l.(oIJj.Of£OI•••• JJll 111 J ,/I·'D'S.·SI£of. J l-DI £0 Ib J J. (. /l vI £01.]; J'I)A (Y(J I J'1I1 (1IJ +1, 120' sr :IIS.16S-Slll'ID) 'D'·-' l£V( ,,-(YIJ; J-IIIIPY(J; j J.II (21l "'(IIh' I;IS;I 'ID1;' ';'" 122J .(""11,. v

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call