Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-09 - 43,50466/twoaov.doc
There are 2 other files named twoaov.doc in the archive. Click here to see a list.
                         WESTERN MICHIGAN UNIVERSITY
                               COMPUTER CENTER
 
LIBRARY PROGRAM #1.9.2
CALLING NAME:  TWOAOV
PREPARED BY:  SAM ANEMA
PROGRAMMED BY:  EVA GAINES AND SAM ANEMA
MODIFIED BY:  RUSSELL R. BARR III
STATISTICAL CONSULTANT:  MICHAEL R. STOLINE
APPROVED BY:  JACK R. MEAGHER
DATE:  AUGUST 1972
 
                         TWO-WAY ANALYSIS OF VARIANCE
                              (UNBALANCED CASE)
 
TABLE OF CONTENTS
 
     1.0  PURPOSE AND SUMMARY
     2.0  USE OF THE EXACT PROCEDURE AND INTERPRETATION OF RESULTS
     3.0  DATA ENTRY OPTION
     4.0  EXAMPLES
     5.0  SAMPLE BATCH RUN
 
1.0  PURPOSE AND SUMMARY
 
THIS PROGRAM IS DESIGNED TO GIVE THE USER AN EXACT ANALYSIS OF AN R X C CROSS-
CLASSIFICATION MODEL (TWO-WAY ANOVA) IN THE UNBALANCED CASE.
 
                                   FACTOR 2
 
                   1               2                             C
          --------------------------------------------------------------
 
    1        X(1,1,I)        X(1,2,I)        ..........   X(1,C,I)
             I=1,...,N(11)   I=1,...,N(12)                I=1,...,N(1C)
 
          --------------------------------------------------------------
 
    2        X(2,1,I)        X(2,2,I)        ..........   X(2,C,I)
             I=1,...,N(21)   I=1,...,N(22)                I=1,...,N(2C)
 
          --------------------------------------------------------------
 
 FACTOR            .               .         ..........          .
    1              .               .                             .
                   .               .                             .
 
          --------------------------------------------------------------
 
    R        X(R,1,I)        X([,2,I)        ..........   X(R,C,I)
             I=1,...,N(R1)   I=1,...,N(R2)                I=1,...,N(RC)
 
          --------------------------------------------------------------
 
UNBALANCE MEANS THAT THE RC SAMPLE SIZES N(IJ) ARE UNEQUAL OR DISPROPORTIONATE.
SOME COMBINATIONS OF THE SAMPLE SIZES N(IJ) MAY BE ZERO.  (SOME CELLS MAY BE
EMPTY.)  THIS EXACT PROCEDURE FOLLOWS THAT OUTLINED IN SECTIONS 1.7, 1.8, AND
1.9 OF T.A. BANCROFT'S BOOK, "TOPICS IN INTERMEDIATE STATISTICAL METHODS",
VOLUME 1, IOWA STATE UNIVERSITY.  THE USER MAY SELECT ONE OF THREE METHODS OF
ENTERING THE
 
    N = SUM N(IJ)  DATA POINTS X(IJK).
       I,J=R,C
 
THESE METHODS ARE EXPLAINED IN DETAIL IN SECTION 3.0.
 
CONSIDER, FOR EXAMPLE, THE FOLLOWING 2 X 2 DESIGN:
 
                                     FACTOR 2
 
                           -------------------------
 
                                22          67
                       1        90          72
                                41          26
                                            94
 
   FACTOR 1                -------------------------
 
                                44          82
                       2        13           8
                                            33
 
                           -------------------------
 
THE PROGRAM YIELDS THE FOLLOWING OUTPUT FOR THIS DATA:

                                   FACTOR 2

     LEVEL - - - - - - -   1        2     
       .
       .    MEAN - - -    42.00    54.57
       .     .
                  SIZE     3.00     4.00
       1    58.86 MEAN    51.00    64.75
                 ST DEV   35.09    28.37 

FACTOR            SIZE     2.00     3.00
   1   2    36.00 MEAN    28.50    41.00
                 ST DEV   21.92    37.64 


                        PRELIMINARY ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00   2035.42    678.47      0.66    0.598
   1 IGNORING 2           1.00   1523.81
   2 IGNORING 1           1.00    460.95
     WITHIN               8.00   8191.25   1023.91
     TOTAL               11.00  10226.67


                        LEAST SQUARES ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00   2035.42
  1 ELIMINATING 2         1.00   1573.36   1573.36      1.54    0.250
  2 ELIMINATING 1         1.00    510.50    510.50      0.50    0.500
     1 BY 2               1.00      1.10      1.10      0.00    0.975
     WITHIN               8.00   8191.25   1023.91
     TOTAL               11.00  10226.67


                        WEIGHTED MEANS ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00   2035.42    678.47
       1                  1.00   1509.93   1509.93      1.47    0.259
       2                  1.00    486.40    486.40      0.48    0.510
     1 BY 2               1.00      1.10      1.10      0.00    0.975
     WITHIN               8.00   8191.25   1023.91
     TOTAL               11.00  10226.67

 
IN GENERAL, THE USER OBTAINS THE FOLLOWING OUTPUT:
 
       (I)  THE RC CELL MEANS AND STANDARD DEVIATIONS.
      (II)  A PRELIMINARY ANOVA TABLE (USED IN TESTING EQUALITY OF THE RC
            POPULATION CELL MEANS).
     (III)  A LEAST SQUARES ANOVA TABLE (USED TO TEST FOR SIGNIFICANT R X C
            INTERACTION AND MAIN ROW AND COLUMN EFFECTS, IF INTERACTION IS NOT
            SIGNIFICANT).
      (IV)  A WEIGHTED MEANS ANOVA TABLE (USED TO TEST MAIN ROW AND COLUMN
            EFFECTS, IF INTERACTION IS PRESENT OR SIGNIFICANT).
 
BEFORE INTERPRETING THE RESULTS FROM THIS PROGRAM THE USER IS CAUTIONED TO
READ SECTION 2.0.  CARE AND PRUDENCE MUST BE EXERCISED IN ANALYZING DATA IN AN
UNBALANCED CASE.
 
A DESIGN WHICH HAS ONLY ONE ENTRY PER CELL FOR ALL CELLS IS PERMISSIBLE.  THE
MAIN EFFECTS ARE TESTED USING THE INTERACTION MEAN SQUARE AS THE ERROR MEAN
SQUARE.  A DESIGN HAVING ONLY ONE LEVEL ON ONE OF THE TWO FACTORS IS
PERMISSIBLE.
 
2.0  USE OF THE EXACT PROCEDURE AND INTERPRETATION OF RESULTS
 
THE FOLLOWING PROCEDURE IS RECOMMENDED IN ANALYZING THESE RESULTS OF THIS
PROGRAM FOR AN UNBALANCED TWO-WAY ANOVA.
 
STEP 1  A PRELIMINARY TEST FOR THE EQUALITY OF THE NON-EMPTY CELL MEANS IS
GIVEN IN THE PRELIMINARY ANOVA TABLE.  AN F STATISTIC IS CALCULATED
 
                             F = CELL MS/WITHIN MS

A PROBABILITY = PROB IS ALSO GIVEN FOR THIS F.  LET THE SIGNIFICANCE LEVEL
CHOSEN BY THE USER BE ALPHA (USUALLY .05, .01, OR .001).
 
IF PROB <ALPHA THEN THE TEST IS SIGNIFICANT AND PROCEED TO STEP 2.
 
IF PROB>ALPHA THEN THE TEST IS NOT SIGNIFICANT.  IN THIS CASE THE USER IS URGED TO
EITHER IGNORE OR TO INTERPRET WITH CAUTION ANY SUBSEQUENT RESULTS FROM EITHER
THE LEAST SQUARES OR WEIGHTED MEANS ANOVA'S.
 
STEP 2  USING THE LEAST SQUARES ANOVA TEST FOR ROW X COLUMN INTERACTION.
 
       (I)  IF THE INTERACTION TEST IS NON-SIGNIFICANT OR IF NO INTERACTION IS
            POSITED IN THE MODEL, THEN THE MODEL:
 
             MU(IJ) = MU + A(I) + B(J) IS VALID, AND
 
            THE TESTS FOR SIGNIFICANT ROW AND COLUMN EFFECTS ARE COMPLETED USING
            THE LEAST SQUARES ANOVA.
 
      (II)  IF THE INTERACTION TEST IS SIGNIFICANT OR IF INTERACTION IS KNOWN
            TO BE IN THE MODEL, THEN THE MODEL:
 
             MU(IJ) = MU + A(I) + B(J) +(AB)(IJ) IS VALID, AND
 
            THE TESTS FOR SIGNIFICANT ROW AND COLUMN EFFECTS ARE COMPLETED
            USING THE WEIGHTED MEANS ANALYSIS.
 
     (III)  IF THE INTERACTION TEST IS USED AS A PRELIMINARY TEST TO DETERMINE
            WHETHER TO USE THE LEAST SQUARES OR WEIGHTED MEANS ANOVA'S FOR THE
            ROW AND COLUMN EFFECTS, IT IS RECOMMENDED THAT THE SIGNIFICANCE
            LEVEL OF THIS PRELIMINARY TEST BE SET AT ALPHA =.25
 
WE MAKE THE FOLLOWING GENERAL REMARKS:
 
     1.  IF ONE OR MORE CELLS ARE EMPTY, THEN IT IS NOT POSSIBLE TO OBTAIN A
         WEIGHTED MEANS ANOVA, SINCE THE CALCULATIONS FOR THIS ANALYSIS REQUIRE
         EVALUATING THE 1/N(IJ)'S.  IN THIS CASE THE LEAST SQUARES ANOVA IS USED
         WHETHER INTERACTION IS SIGNIFICANT OR NOT.  CARE SHOULD BE EXERCISED.
 
     2.  THERE ARE TWO POTENTIAL ERRORS POSSIBLE WHEN TESTING FOR MAIN EFFECTS:
         ERROR I - USING THE LEAST SQUARES ANOVA WHEN INTERACTION IS PRESENT,
         AND
         ERROR II - USING THE WEIGHTED MEANS ANOVA WHEN INTERACTION IS ABSENT.
         ERROR I IS MORE SERIOUS, SINCE THE TEST WILL BE BIASED (NOT AT THE
         TRUE SIGNIFICANCE LEVEL INDICATED).
         ERROR II IS LESS SERIOUS, SINCE THE TESTS ARE STILL UNBIASED, BUT
         INEFFICIENT.
 
     3.  THE LEAST SQUARES ANOVA IS ALSO CALLED THE FINAL ANOVA IN BANCROFT'S
         BOOK AND IS OBTAINED BY THE METHOD OF FITTING CONSTANTS.
 
     4.  IN THE CASE OF A BALANCED OR PROPORTIONAL ANOVA, THEN THE LEAST SQUARE
         AND WEIGHTED MEANS ANOVA'S ARE IDENTICAL.
 
     5.  FOR A GENERAL DISCUSSION OF THE UNDERLYING STATISTICAL CONCEPTS
         INVOLVED WITH THE LEAST SQUARES AND WEIGHTED MEANS ANOVA AND IN
         PARTICULAR FOR AN EXPLANATION OF THE CONCEPTS OF "1 IGNORING 2" AND
         "1 ELIMINATING 2", SEE EITHER:
 
                 (I)   T.A. BANCROFT, "TOPICS IN INTERMEDIATE STATISTICAL
                       METHODS", CHAP. 1.
 
                (II)   SNEDECOR & COCHRAN, "STATISTICAL METHODS", CHAPTER 16,
                       SECTION 7.
               (III)   S.R. SEARLE, "LINEAR MODELS", CHAPTER 7.1-7.2.
                (IV)   B.J. WINER, "STATISTICAL PRINCIPLES IN EXPERIMENTAL
                       DESIGN", SECTION 5.23.
 
3.0  DATA ENTRY OPTIONS
 
THE PROGRAM IS INITIALIZED BY TYPING R TWOAOV.
 
THE FIRST TWO QUESTIONS TO BE ASKED ARE "OUTPUT?" AND "INPUT?"
 
THE PROPER RESPONSES TO EACH OF THESE QUESTIONS CONSISTS OF THREE BASIC PARTS:
A DEVICE, A FILENAME, AND A PROJECT-PROGRAMMER NUMBER.
 
THE GENERAL FORMAT FOR THESE THREE PARTS IS AS FOLLOWS:
 
     DEV:FILE.EXT[PROJ,PROG]
 
1)  DEV:  ANY OF THE FOLLOWING DEVICES ARE APPROPRIATE WHERE INDICATED:
 
         DEVICE LIST            DEFINITION                STATEMENT USE
 
           TTY:                 TERMINAL                  INPUT OR OUTPUT
           DSK:                 DISK                      INPUT OR OUTPUT
           CDR:                 CARD READER               INPUT ONLY
           LPT:                 LINE PRINTER              OUTPUT ONLY
           DTA0:                DECTAPE 0                 INPUT OR OUTPUT
           DTA1:                DECTAPE 1                 INPUT OR OUTPUT
           DTA2:                DECTAPE 2                 INPUT OR OUTPUT
           DTA3:                DECTAPE 3                 INPUT OR OUTPUT
           DTA4:                DECTAPE 4                 INPUT OR OUTPUT
           DTA5:                DECTAPE 5                 INPUT OR OUTPUT
           DTA6:                DECTAPE 6                 INPUT OR OUTPUT
           DTA7:                DECTAPE 7                 INPUT OR OUTPUT
           MTA0:                MAGNETIC TAPE 0           INPUT OR OUTPUT
           MTA1:                MAGNETIC TAPE 1           INPUT OR OUTPUT
 
INPUT MAY NOT BE DONE FROM THE LINE PRINTER NOR MAY OUTPUT GO TO THE CARD
READER.
 
2)  FILE.EXT IS THE NAME AND EXTENSION OF THE FILE TO BE USED.  THIS PART OF
    THE SPECIFICATION IS USED ONLY IF DISK OR DECTAPE IS USED.
 
3)  [PROJ,PROG]  IF A DISK IS USED AND THE USER WISHES TO READ A FILE IN
    ANOTHER PERSON'S DIRECTORY, HE MAY DO SO BY SPECIFYING THE PROJECT-
    PROGRAMMER NUMBER OF THE DIRECTORY FROM WHICH HE WISHES TO READ.  THE
    PROJECT NUMBER AND THE PROGRAMMER NUMBER MUST BE SEPARATED BY A COMMA AND
    ENCLOSED IN BRACKETS.  OUTPUT MUST GO TO YOUR OWN AREA.
 
EXAMPLE:
          OUTPUT?  LPT:/2
          INPUT?   DSK:DATA.DAT[71171,71026]
 
IN THE EXAMPLE, TWO COPIES OF THE OUTPUT ARE TO BE PRINTED BY THE HIGH SPEED
LINE PRINTER.  THE INPUT DATA IS A DISK FILE OF NAME DATA.DAT IN USER DIRECTORY
[71171,71026].
 
DEFAULTS:
 
1)  IF NO DEVICE IS SPECIFIED BUT A FILENAME IS SPECIFIED THE DEFAULT DEVICE
    WILL BE DSK:
 
2)  IF NO FILENAME IS SPECIFIED AND A DISK OR DECTAPE IS USED THE DEFAULT
    ON INPUT WILL BE FROM INPUT.DAT; ON OUTPUT IT WILL BE OUTPT.DAT.
 
3)  IF THE PROGRAM IS RUN FROM THE TERMINAL AND NO SPECIFICATION IS GIVEN (JUST
    A CARRIAGE RETURN) BOTH INPUT AND OUTPUT DEVICES WILL BE THE TERMINAL.
 
4)  IF THE PROGRAM IS RUN THROUGH BATCH AND NO SPECIFICATION IS GIVEN, (A
    BLANK CARD) THE INPUT DEVICE WILL BE CDR: AND THE OUTPUT DEVICE WILL BE LPT:
 
5)  IF NO PROJECT-PROGRAMMER NUMBER IS GIVEN, THE USER'S OWN NUMBER WILL BE
    ASSUMED.
 
NOTE:  (1)  IF LPT: IS USED AS AN OUTPUT DEVICE, MULTIPLE COPIES MAY BE
            OBTAINED BY SPECIFYING LPT:/N WHERE N REFERS TO THE NUMBER OF COPIES
            DESIRED.
 
       (2)  THE FOLLOWING TWO OPTIONS ARE NOT APPLICABLE FOR THE FIRST DATA SET,
            I.E., IT IS APPLICABLE ONLY WHEN THE PROGRAM BRANCHES BACK TO THE
            BEGINNING UPON FIRST COMPLETION OF AN ANALYSIS.
 
            (A)  SAME OPTION
 
                 IF THE SAME DATA FILE IS TO BE USED AGAIN, SIMPLY ENTER
                 "SAME<CR>"; OTHERWISE, EITHER USE THE FINISH OPTION OR ENTER
                 ANOTHER FILENAME ETC.
 
            (B)  FINISH OPTION
 
                 THE USER MUST ENTER "FINISH<CR>" TO BRANCH OUT OF TWOAOV
                 PROGRAM WHEN THE USER HAS GIVEN THE INPUT AND OUTPUT
                 SPECIFICATIONS.  THE PROGRAM WILL REQUEST A FORMAT.
 
THERE ARE 3 OPTIONS AVAILABLE FOR THE FORMAT; NAMELY:
 
            (A)  STANDARD FORMAT OPTION
 
                 UNLESS OTHERWISE SPECIFIED, THE PROGRAM ASSUMES THE STANDARD
                 OPTION.  THE STANDARD FORMAT FOR EACH METHOD OF DATA ENTRY
                 IS GIVEN WITH THE DESCRIPTION OF THE METHOD.
 
                 TO USE THIS OPTION, SIMPLY TYPE IN "<CR>" ON TERMINAL JOBS OR
                 USE A BLANK CARD FOR BATCH JOBS OR ENTER "STD<CR>".
 
            (B)  OBJECT TIME FORMAT OPTION
 
                 IF THE DATA IS SUCH THAT A USER'S OWN FORMAT IS REQUIRED,
                 SIMPLY ENTER A LEFT PARENTHESIS FOLLOWED BY THE FIRST FORMAT
                 SPECIFICATION, A COMMA AND THE SECOND SPECIFICATION, ETC.  WHEN
                 YOU FINISH ENTER A RIGHT PARENTHESIS, AND THEN A CARRIAGE
                 RETURN.  THERE CAN BE A MAXIMUM OF ONE LINE 80 COLUMNS FOR THE
                 FORMAT.
 
                 THE SPECIFICATIONS FOR THE FORMAT ITSELF ARE THE SAME AS FOR
                 THE FORTRAN IV FORMAT STATEMENT.
 
            (C)  SAME OPTION
 
                 THE SAME OPTION IS APPLICABLE ONLY TO JOBS THAT USE MORE THAN
                 ONE DATA FILE.  IF AN OBJECT TIME FORMAT WAS USED ON A DATA SET
                 AND THE SUCCEEDING DATA SET UTILIZES THE SAME FORMAT, SIMPLY
                 ENTER "SAME<CR>".
 
                 THE USER MAY ELECT ONE OF THREE METHODS TO ENTER THE DATA:
 
                  X(IJK),I=1,2,...,R        (R LEVELS OF FACTOR 1, THE ROW
                                             FACTOR)
 
                         J=1,2,...,C        (C LEVELS OF FACTOR 2, THE COLUMN
                                             FACTOR)
 
                         K=1,2,...,N(IJ)    (N(IJ) = THE (I,J)TH CELL SIZE.)
 
                 THEREFORE, CELL (I,J) HAS THE N(IJ) DATA POINTS:
 
                      X(IJ1)
                      X(IJ2)
                      .
                      .
                      .
                      X(IJN(IJ))
 
                 FOR METHOD 1 THE USER SUPPLIES:
 
                        (I)  R AND C, THE LEVEL NUMBERS FOR FACTOR 1 AND 2
                             RESPECTIVELY,
 
                       (II)  THE RC SAMPLE SIZES N(IJ), AND
 
                      (III)  THE N = SUM N(IJ)    X(IJ) DATA POINTS.
 
                 THIS IS DONE IN GENERAL AS FOLLOWS:
 
 
                      .R TWOAOV<CR>
                               WMU TWO-WAY ANALYSIS OF VARIANCE
                      OUTPUT? TTY:<CR>
                      INPUT? TTY:<CR>
                      FORMAT
                      STD<CR>
                      ENTER IDENTIFICATION IF DESIRED
                      EXAMPLE OF METHOD 1<CR>
                      ENTER INPUT METHOD DESIRED.  (1,2,OR 3)
                      1<CR>
                      NUMBER OF LEVELS ON FACTOR 1 = R
                      NUMBER OF LEVELS ON FACTOR 2 = C
                      ENTER CELL SIZES
                      N(11),N(12),...,N(1C)
 
                      N(21),N(22),...,N(2C)
 
                      .....................
 
                      N(R1),N(R2),...,N(RC)
 
                 OBSERVE THAT ALL OF THE SAMPLE SIZES N(IJ) FOR THE C CELLS OF
                 THE FIRST ROW OF THE DESIGN ARE ENTERED IN THE FIRST ROW
                 SEPARATED BY COMMAS, THE SAMPLE SIZES N(2J) OF THE C CELLS
                 OF THE SECOND ROW, ETC. UNTIL R ROWS OF SAMPLE SIZES ARE
                 ENTERED.
 
                      ENTER DATA FOR CELL (1,1)
                      X(111),X(112),...,X(11N(11))
                      ENTER DATA FOR CELL (1,2)
                      X(121),X(122),...,X(12N(12))
                      ENTER DATA FOR CELL (R,C)
                      X(RC1),X(RC2),...,X(RCN(RC))
                 CONSIDER THE FOLLOWING EXAMPLE OF A 2 X 2 DESIGN:
 
                                               FACTOR 2
 
 
                                      ----------------------------------
 
                                          N(11)=3          N(12)=2
                                   1       (22)
                                           (22)             (27)
                           FACTOR 1        (23)             (26)
 
                                     -----------------------------------
 
                                          N(21)=4          N(22)=1
                                   2       (17)  (16)       (20)
                                           (19)  (18)
 
                                     -----------------------------------
 
                 .R TWOAOV<CR>
                                       WMU TWO-WAY ANALYSIS OF VARIANCE
                 OUTPUT? TTY:<CR>
                 INPUT? TTY:<CR>
                 FORMAT
                 STD<CR>
                 ENTER IDENTIFICATION IF DESIRED
                 REAL EXAMPLE OF METHOD 1<CR>
                 ENTER INPUT METHOD DESIRED. (1,2,OR 3)
                 1<CR>
                 NUMBER OF LEVELS ON FACTOR 1 = 2<CR>
                 NUMBER OF LEVELS ON FACTOR 2 = 2<CR>
                 ENTER CELL SIZES
                 3,2<CR>
                 4,1<CR>
                 ENTER DATA FOR CELL (1,1)
                 22,22,23<CR>
                 ENTER DATA FOR CELL (1,2)
                 27,26<CR>
                 ENTER DATA FOR CELL (2,1)
                 17,16,19,18<CR>
                 ENTER DATA FOR CELL (2,2)
                 20<CR>
                 METHODS 2 AND 3 ARE EASILY DESCRIBED BY THE USE OF THE SAME
                 ILLUSTRATIVE EXAMPLE.
 
                 METHOD 2
                                       WMU TWO-WAY ANALYSIS OF VARIANCE
                 OUTPUT? TTY:<CR>
                 INPUT? TTY:<CR>
                 FORMAT
                 STD<CR>
                 ENTER IDENTIFICATION IF DESIRED
                 EXAMPLE OF METHOD 2<CR>
                 ENTER INPUT METHOD DESIRED. (1,2,OR 3)
                 2<CR>
                 ENTER DATA
                 *1,1<CR>
                 22<CR>
                 22<CR>
                 23<CR>
                 *1,2<CR>
                 27<CR>
                 26<CR>
                 *2,1<CR>
                 17<CR>
                 16<CR>
                 19<CR>
                 18<CR>
                 *2,2<CR>
                 20<CR>
                 *<CR>
 
                 RULES FOR METHOD 2
 
                        (I)  THE USER TYPES *I,J.  (AN ASTERISK FOLLOWED BY THE
                             DESIGNITION FOR CELL (I,J).)  THE DATA LINE WHICH
                             BEGINS WITH AN ASTERISK SPECIFIES THE CELL INTO
                             WHICH THE DATA FOLLOWING IT WILL FALL.
 
                       (II)  ENTER THE DATA FOR CELL (I,J) IN THE FOLLOWING
                             LINES ONE ENTRY PER LINE UNTIL ALL N(IJ) DATA
                             POINTS HAVE BEEN PRINTED.
                      (III)  ENTER AN ASTERISK FOLLOWED BY A DIFFERENT I,J
                             COMBINATION.  CONTINUE UNTIL ALL DATA IS ENTERED.
 
                       (IV)  CELLS MAY BE SUBMITTED IN ANY ORDER.
 
                        (V)  DATA MUST BE SUBMITTED ONE ENTRY PER LINE.
 
                       (VI)  AN ASTERISK FOLLOWED BY A RETURN SIGNALS THE END
                             OF THE DATA.
 
                      (VII)  IF THE USER SUBMITS THE FORMAT, IT MUST HAVE ONE
                             FLOATING (F) FIELD.
 
                 METHOD 3 (USING THE SAME DATA)
 
                 .R TWOAOV
                                        WMU TWO-WAY ANALYSIS OF VARIANCE
                 OUTPUT? TTY:<CR>
                 INPUT? TTY:<CR>
                 FORMAT
                 STD<CR>
                 ENTER IDENTIFICATION IF DESIRED
                 EXAMPLE OF METHOD 3<CR>
                 ENTER INPUT METHOD DESIRED. (1,2,OR 3)
                 3<CR>
                 ENTER DATA
                 1,1,22<CR>
                 1,1,22<CR>
                 1,1,23<CR>
                 1,2,27<CR>
                 1,2,26<CR>
                 2,1,17<CR>
                 2,1,16<CR>
                 2,1,19<CR>
                 2,1,18<CR>
                 2,2,20<CR>
                 <CR>
 
                 RULES FOR METHOD 3
 
                        (I)  THE DATA MAY BE SUBMITTED IN ANY ORDER.
 
                       (II)  THE FIRST NUMBER ON EACH DATA LINE IS THE LEVEL
                             FOR FACTOR 1; THE SECOND IS THE LEVEL FOR FACTOR 2;
                             AND THE THIRD IS AN ENTRY IN THAT CELL.
 
                      (III)  A RETURN INDICATES THE END OF THE DATA.
 
                       (IV)  IF THE USER SUBMITS THE FORMAT, IT MUST HAVE TWO
                             INTEGER (I) FIELDS FOLLOWED BY A FLOATING (F)
                             FIELD.
 
                 IN EACH OF THE ABOVE CASES THE COMPUTER WILL LOOK FOR
                 COMPLETELY EMPTY ROWS AND COLUMNS AND OMIT THEM FROM THE
                 ANALYSIS.
 
                 LIMITATIONS:
 
                        (I)  THE MAXIMUM NUMBER OF LEVELS ON ANY FACTOR IS 12.
 
                       (II)  THE MAXIMUM NUMBER OF ENTRIES PER CELL USING METHOD
                             1 IS 400; OTHERWISE IT IS UNLIMITED.

                      (III)  THE NUMBER OF LEVELS ON FACTOR 1 AND FACTOR 2
                             IS DETERMINED BY 4*N1+5*N2+2*N1*N2+NM*N2
                             WHERE
                                N1 = NO. OF LEVELS ON FACTOR 1
                                N2 = NO. OF LEVELS ON FACTOR 2
                                NM = MAXIMUM OF N1 AND N2
 
4.0  EXAMPLES
 
WE CONSIDER SEVERAL EXAMPLES HERE TO ILLUSTRATE THE USE OF THIS PROGRAM.
 
EXAMPLE 1  CONSIDER AGAIN THE EXAMPLE IN SECTION 1.0.
 
     SINCE F=0.66 IS NOT SIGNIFICANT FOR ANY ALPHA<=.598, THE LEAST SQUARES AND
     WEIGHTED MEANS ANALYSES ARE IGNORED.
 
EXAMPLE 2  FOR THE DATA OF THE 2 X 2 EXAMPLE USED IN SECTION 3.0:
 
                                    FACTOR 2
 
                             --------------------------
 
                                   22
                          1        22           27
                                   23           26
 
              FACTOR 1       --------------------------
 
                              17     16
                          2   19     18         20
 
                             --------------------------
 
WE HAVE:
 
                                   FACTOR 2

     LEVEL - - - - - - -   1        2     
       .
       .    MEAN - - -    19.57    24.33
       .     .
                  SIZE     3.00     2.00
       1    24.00 MEAN    22.33    26.50
                 ST DEV    0.58     0.71 

FACTOR            SIZE     4.00     1.00
   1   2    18.00 MEAN    17.50    20.00
                 ST DEV    1.29     0.00 


                        PRELIMINARY ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00    115.83     38.61     37.57    0.000
   1 IGNORING 2           1.00     90.00
   2 IGNORING 1           1.00     47.62
     WITHIN               6.00      6.17      1.03
     TOTAL                9.00    122.00


                        LEAST SQUARES ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00    115.83
  1 ELIMINATING 2         1.00     66.88     66.88     65.07    0.000
  2 ELIMINATING 1         1.00     24.50     24.50     23.84    0.003
     1 BY 2               1.00      1.33      1.33      1.30    0.298
     WITHIN               6.00      6.17      1.03
     TOTAL                9.00    122.00


                        WEIGHTED MEANS ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00    115.83     38.61
       1                  1.00     61.65     61.65     59.99    0.000
       2                  1.00     21.33     21.33     20.76    0.004
     1 BY 2               1.00      1.33      1.33      1.30    0.298
     WITHIN               6.00      6.17      1.03
     TOTAL                9.00    122.00

THE PRELIMINARY F=37.57 AND IS SIGNIFICANT FOR ALPHA<=.001.  THEREFORE, WE ARE
ENTITLED TO PROCEED WITH THE INTERACTION TEST IN THE LEAST SQUARES ANOVA.
 
NOW F INTERACTION = 1.30 AND IS NOT SIGNIFICANT FOR ANY ALPHA<=.298.  THEREFORE,
WE CONCLUDE THAT INTERACTION IS NON-SIGNIFICANT AT ALPHA<=.25 AND PROCEED WITH
TESTING MAIN EFFECTS USING THE LEAST SQUARES ANOVA.  BOTH ROW AND COLUMN ARE
SIGNIFICANT AT ALPHA=.01.
 
EXAMPLE 3  (INTERACTION PRESENT, USE OF WEIGHTED MEANS)  CONSIDER THE FOLLOWING
DATA IN THE 2 X 2 DESIGN:
 
                                   1              2
 
                          ---------------------------------
                        1      12      14         9
                               13                 8
 
                          ---------------------------------
 
                        2                        11
                                   9             10
 
                          ---------------------------------
 
.R TWOAOV
                          WMU TWO-WAY ANALYSIS OF VARIANCE
OUTPUT? TTY:<CR>
INPUT? TTY:<CR>
FORMAT
STD<CR>
ENTER IDENTIFICATION IF DESIRED
EXAMPLE 3<CR>
ENTER INPUT METHOD DESIRED. (1,2,OR 3)
3<CR>
ENTER DATA
1,1,12<CR>
1,1,13<CR>
1,1,14<CR>
1,2,9<CR>
1,2,8<CR>
2,1,9<CR>
2,2,11<CR>
2,2,10<CR>
<CR>
 
                                   FACTOR 2

     LEVEL - - - - - - -   1        2     
       .
       .    MEAN - - -    12.00     9.50
       .     .
                  SIZE     3.00     2.00
       1    11.20 MEAN    13.00     8.50
                 ST DEV    1.00     0.71 

FACTOR            SIZE     1.00     2.00
   1   2    10.00 MEAN     9.00    10.50
                 ST DEV    0.00     0.71 


                        PRELIMINARY ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00     28.50      9.50     12.67    0.016
   1 IGNORING 2           1.00      2.70
   2 IGNORING 1           1.00     12.50
     WITHIN               4.00      3.00      0.75
     TOTAL                7.00     31.50


                        LEAST SQUARES ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00     28.50
  1 ELIMINATING 2         1.00      0.57      0.57      0.76    0.432
  2 ELIMINATING 1         1.00     10.37     10.37     13.83    0.020
     1 BY 2               1.00     15.43     15.43     20.57    0.011
     WITHIN               4.00      3.00      0.75
     TOTAL                7.00     31.50


                        WEIGHTED MEANS ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00     28.50      9.50
       1                  1.00      1.71      1.71      2.29    0.205
       2                  1.00      3.86      3.86      5.14    0.086
     1 BY 2               1.00     15.43     15.43     20.57    0.011
     WITHIN               4.00      3.00      0.75
     TOTAL                7.00     31.50

THE PRELIMINARY ANOVA IS SIGNIFICANT AT ALPHA=.05; HENCE WE ARE ENTITLED TO TEST
FOR INTERACTION.  THE TEST FOR INTERACTION YIELDS AN F=20.57 WHICH IS
SIGNIFICANT FOR ALPHA=.05.  HENCE, WE CONCLUDE THAT INTERACTION IS IN THE MODEL
AND PROCEED TO TEST FOR MAIN EFFECTS USING THE WEIGHTED MEANS ANOVA.
 
NOTE THAT NEITHER FACTOR 1 NOR FACTOR 2 MAIN EFFECTS ARE SIGNIFICANT AT ALPHA=.05.
 
(IF THE WEIGHTED MEANS ANOVA HAD BEEN IGNORED AND THE LEAST SQUARES ANOVA
USED, WE WOULD HAVE FALSELY CONCLUDED THAT FACTOR 2 WAS SIGNIFICANT AT ALPHA=.02.)
 
EXAMPLE 4  (MISSING CELL DATA)
 
THIS EXAMPLE IS TAKEN FROM TABLE 1.10 ON PAGE 20 OF BANCROFT'S BOOK, "TOPICS
IN INTERMEDIATE STATISTICAL METHODS."
 
                                      FACTOR 2
 
                            ----------------------------
 
                         1        22          -1
                                  25          40
                                              18
 
                            ----------------------------
 
                         2        41          23
                                  41          13
 
                            ----------------------------
 
                                  29
         FACTOR 1        3        20
                                  37
 
 
                         4        49
                                  50          61
 
                            ----------------------------
 
                         5        55
 
                            ----------------------------
 
NOTE THAT CELLS (3,2) AND (5,2) ARE EMPTY.  THE ANALYSIS FOR THIS DATA IS:
 
.R TWOAOV
                            WMU TWO-WAY ANALYSIS OF VARIANCE
OUTPUT?  TTY:<CR>
INPUT?  TTY:<CR>
FORMAT
STD<CR>
ENTER IDENTIFICATION IF DESIRED
EXAMPLE 4<CR>
ENTER INPUT METHOD DESIRED (1,2,OR 3)
3<CR>
ENTER DATA
1,1,22<CR>
1,1,25<CR>
1,2,-1<CR>
1,2,40<CR>
1,2,18<CR>
2,1,41<CR>
2,1,41<CR>
2,2,23<CR>
2,2,13<CR>
3,1,29<CR>
3,1,20<CR>
3,1,37<CR>
4,1,49<CR>
4,1,50<CR>
4,2,61<CR>
5,1,55<CR>
<CR>
 
EXAMPLE 4                                                                       


                                   FACTOR 2

     LEVEL - - - - - - -   1        2     
       .
       .    MEAN - - -    36.90    25.67
       .     .
                  SIZE     2.00     3.00
       1    20.80 MEAN    23.50    19.00
                 ST DEV    2.12    20.52 

FACTOR            SIZE     2.00     2.00
   1   2    29.50 MEAN    41.00    18.00
                 ST DEV    0.00     7.07 

                  SIZE     3.00     0.00
       3    28.67 MEAN    28.67     0.00
                 ST DEV    8.50     0.00 

                  SIZE     2.00     1.00
       4    53.33 MEAN    49.50    61.00
                 ST DEV    0.71     0.00 

                  SIZE     1.00     0.00
       5    55.00 MEAN    55.00     0.00
                 ST DEV    0.00     0.00 


                        PRELIMINARY ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                7.00   3213.77    459.11      3.53    0.049
   1 IGNORING 2           4.00   2572.30
   2 IGNORING 1           1.00    473.20
     WITHIN               8.00   1041.67    130.21
     TOTAL               15.00   4255.44


                        LEAST SQUARES ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                7.00   3213.77
  1 ELIMINATING 2         4.00   2249.06    562.26      4.32    0.037
  2 ELIMINATING 1         1.00    149.96    149.96      1.15    0.315
     1 BY 2               2.00    491.51    245.76      1.89    0.213
     WITHIN               8.00   1041.67    130.21
     TOTAL               15.00   4255.44


NO WEIGHTED MEANS ANALYSIS CAN BE PERFORMED WITH EMPTY CELLS


INPUT? (TYPE HELP IF NEEDED)--FINISH<CR>

THE PRELIMINARY ANOVA TABLE YIELDS AN F=3.53 WHICH IS BARELY SIGNIFICANT AT
ALPHA=.05.
 
THE LEAST SQUARES ANOVA IS VALID AND THE F INTERACTION VALUE = 1.89 WHICH IS
NOT SIGNIFICANT FOR ALPHA<.213.
 
THE MAIN EFFECTS TESTS FOR FACTOR 1 IS SIGNIFICANT AND THAT FOR FACTOR 2 IS NOT
SIGNIFICANT AT ALPHA<.05.
 
NOW, SINCE THE INTERACTION TEST IS SIGNIFICANT AT ALPHA=.25 WE SHOULD THEN USE A
WEIGHTED MEANS ANOVA.  HOWEVER, SINCE THERE IS MISSING CELL DATA, WE HAVE NO
WEIGHTED MEANS ANOVA.  HENCE, INTERPRET WITH SOME CAUTION THE SIGNIFICANT
FACTOR 1 MAIN EFFECT.
 
EXAMPLE 5  (2 X 2 DESIGN WITH ONE DATA POINT PER CELL)  CONSIDER THE FOLLOWING
2 X 2 DESIGN:
 
                                   FACTOR 2
 
                          ---------------------------------
 
                        1          1              3
 
         FACTOR 1         ---------------------------------
 
                        2          5              9
 
                          ---------------------------------
 
.R TWOAOV<CR>
                           WMU TWO-WAY ANALYSIS OF VARIANCE
OUTPUT?  TTY:<CR>
INPUT?  TTY:<CR>
FORMAT
STD<CR>
ENTER IDENTIFICATION IF DESIRED
EXAMPLE 5<CR>
ENTER INPUT METHOD DESIRED.  (1,2,OR 3)
3<CR>
ENTER DATA
1,1,1<CR>
1,2,3<CR>
2,1,5<CR>
2,2,9<CR>
<CR>
 
EXAMPLE 5                                                                       


                                   FACTOR 2

     LEVEL - - - - - - -   1        2     
       .
       .    MEAN - - -     3.00     6.00
       .     .
                  SIZE     1.00     1.00
       1     2.00 MEAN     1.00     3.00
                 ST DEV    0.00     0.00 

FACTOR            SIZE     1.00     1.00
   1   2     7.00 MEAN     5.00     9.00
                 ST DEV    0.00     0.00 


                        LEAST SQUARES ANOVA
     SOURCE                 DF        SS        MS        F      PROB
     CELLS                3.00     35.00
  1 ELIMINATING 2         1.00     25.00     25.00     25.00    0.126
  2 ELIMINATING 1         1.00      9.00      9.00      9.00    0.205
     1 BY 2               1.00      1.00      1.00
     TOTAL                3.00     35.00

THE DESIGN IS BALANCED. IN THIS CASE THE WEIGHTED
MEANS AND LEAST SQUARES ANOVA'S ARE IDENTICAL.


INPUT? (TYPE HELP IF NEEDED)--FINISH

END OF EXECUTION
CPU TIME: 1.94	ELAPSED TIME: 26.25
EXIT

THE TEST FOR MAIN EFFECTS IS NOT SIGNIFICANT AT ALPHA=.05 FOR EITHER FACTOR 1 OR 2.
 
NO TEST FOR INTERACTION IS POSSIBLE, SINCE THE MEAN SQUARE FOR WITHIN IS ZERO.
 
FOR ALL SUCH CASES THE LEAST SQUARES AND WEIGHTED MEANS ANOVA'S ARE IDENTICAL.
 
5.0  BATCH SETUP
 
THE FOLLOWING IS A BATCH JOB SETUP:  (EACH LINE REPRESENTS ONE CARD, EACH CARD
STARTING IN COLUMN 1; DO NOT INCLUDE THE COMMENTS AT THE RIGHT.
 
--------------------------------------------------------------------------------
 
                                       COMMENTS
 
     $JOB  [#,#]                       JOB CARD; INSERT USER'S PROJECT-
                                       PROGRAMMER NUMBER WITHIN THE BRACKET
 
     $PASSWORD  ######                 IN PLACE OF THE 6#'S, PUT IN THE
                                       PASSOWRD
 
     $DATA                             SIGNIFY BEGINNING OF DATA DECK
          (DATA CARDS)                 INSERT THE DATA CARD DECK TO BE ANALYZED
     $EOD                              SIGNIFY THE END OF DATA CARD DECK
 
     .R  TWOAOV                        START THE EXECUTION
              (RESPONSES TO LINES 1-24
               IN SECTION 3.0 REPEATED
               OR NOT)                 USER'S RESPONSE
 
     (EOF)                             AN END-OF-FILE CARD (GET THESE AT THE
                                       COMPUTER CENTER)
 
--------------------------------------------------------------------------------
 
     EXAMPLE:
 
     $JOB  [410,410]
     $PASSWORD  NNNNNN
     $DATA
     1112
     1113
     1114
     1209
     1208
     2109
     2211
     2210
     $EOD
     .R TWOAOV
     LPT:
     CDR:
     (2I1,F2.0)
     BATCH EXAMPLE
     3
     FINISH
     (EOF)