MINITAB RELEASE 7.2 *** IBM mainframe running VM/CMS (C) Copyright 1989 Minitab, Inc. - ALL RIGHTS RESERVED U.S. FEDERAL GOVERNMENT USERS SEE HELP FGU FEB. 18, 1992 *** University of Illinois - Chicago MTB > help ancova ANCOVA model Subcommands: COVARIATES RESIDUALS TEST FITS MEANS This command does analysis of variance and covariance for orthogonal designs (e.g., latin squares, crossover and proportional designs) with fixed effects. Factors may be crossed or nested. You can store residuals and fitted values, print cell and marginal means (adjusted for the covariates), and specify your own tests. You may list several response variables on one command. You may specify up to 50 response variables and 50 covariates. Models with many terms can take a long time to compute. One rule of thumb is that, in a completely crossed model with all interaction terms, each additional factor triples the computation time. How to Enter Data for ANCOVA There should be one row of the worksheet for each observation, containing the values of each response variable, the level of each factor, and the values of each covariate. Level numbers must be integers from -9999 to +9999 or missing (*). They need not be consecutive nor in any special order. The patterned data capability of SET can be helpful in entering the level numbers of a factor. How to Specify the Model in ANCOVA The model on the ANCOVA line is exactly the same as in the ANOVA command. Covariates are listed in a subcommand. The example below has two covariates, X1 and X2, and two crossed factors, A and B. ANCOVA Y=A B A*B COVARIATES X1 X2. 1 MTB > help anova ANOVA model Subcommands: RANDOM FITS MEANS RESTRICT EMS TEST RESIDUALS This command performs analysis of variance for multi-way balanced designs, i.e., each cell must have the same number of observations, and one-way analysis of variance for unbalanced designs. ANOVA calculates all exact F-tests, prints expected mean squares, and estimates variance components. You may specify your own tests, store residuals and fitted values, and print cell and marginal means. You can list several response variables on one command. How to Specify the Model in ANOVA ANOVA uses a simplified version of a model as it appears in many textbooks. Here are some examples: Three factors crossed: ANOVA Y=A B C A*B A*C B*C A*B*C Three factors nested: ANOVA Y=A B(A) C(A B) Crossed and nested design: ANOVA Y=A B(A) C A*C B*C(A) List the terms you want in your model after the equal sign. Interactions are indicated with asterisks. For example, A*B is the interaction between factors A and B. Nested factors are indicated with parentheses. For example, B(A) is B nested within A and C(A B) is C nested within A and B. Several rules apply only to ANOVA (and ANCOVA). You may omit the quotes around variable names. Because of this, variable names used in ANOVA must start with a letter and contain only letters and numbers. Alternatively, you can use C1, C2, etc. to denote data columns. You can use special symbols in a variable name, but then you must enclose the name in single quotes, as on other Minitab commands. You may not put any extra text on the ANOVA line, except after the symbol #. Two symbols allow you to abbreviate a model. A vertical bar (or exclamation point) indicates crossed factors, and a minus sign removes terms. For example: ANOVA Y=A B|C E is equivalent to ANOVA Y=A B C B*C E ANOVA Y=A|B|C - A*B is equivalent to ANOVA Y=A B C A*C B*C A*B*C ANCOVA Y=A|B(A)|C is equivalent to ANCOVA Y=A B(A) C A*C B*C(A) In general, all crossings are done for factors separated by bars, unless the cross results in an illegal term. For example, in the third example, the potential term A*B(A) is illegal and Minitab automatically omits it. Note, if a factor is nested then you must indicate this when using the bar, as in the fourth example with the term B(A). 1 You can fit reduced models, for example: Y = A B C A*B is a three-factor model with just one two-way interaction. Models, however, must be hierarchical. For example, if the term A*B*C is in the model, then the terms A B C A*B A*C B*C must also be in the model. And if B(A) is in the model, then A must be also. Several response variables can be included with one model. For example, ANOVA Y1 Y2 Y3 = A B will do three separate analyses, one for Y1, one for Y2 and one for Y3. Minitab checks to see if your model is valid and gives an error message if it is not. Minitab also checks to see if your data set is balanced, i.e. has an equal number of observations per cell. Note: balanced data are not required for one factor models. Models with many terms can take a long time to compute. One rule of thumb is that, in a completely crossed model with all interaction terms, each additional factor triples the computation time. A Simple Example: We fit a two-way crossed model using the potato rot data from the Minitab Handbook. Potato rot was measured in potatoes stored at two different temperatures (factor 1) and at three levels of oxygen (factor 2). MTB > ANOVA ROT = TEMP|OXYGEN; SUBC> MEANS TEMP|OXYGEN; SUBC> FITS C5; SUBC> RESIDUALS C6. MTB > help ancova mean MEANS termlist Termlist contains a list of terms in the model, main effects and/or interactions. List them just as you did for the model on ANCOVA. Minitab will print a table of adjusted means corresponding to each term. If two MEANS subcommands are specified, the second overrides the first. 1 MTB > help ancova test TEST termlist / errorterm All tests that ANCOVA does automatically are of the form (MS term)/(MSE). If all your factors are fixed, this is probably what you want. However, if some of your factors are random or if you have certain designs, e.g., a split plot, these tests may not be appropriate. The TEST subcommand allows you to specify your own tests. Termlist is a list of terms from the model. List them exactly as you did on the ANCOVA line. Errorterm is a term in the model to be used as the denominator for the F-test. Or alternatively, errorterm can be a linear combination of terms in the model and the reserved word, ERROR, can be used to represent MSE. Minitab will then calculate the approximate F-ratio and p-values for you. See the ANOVA TEST subcommand for more details. MTB > help anova test TEST termlist / errorterm This subcommand is useful when you want to do F-tests that Minitab does not do automatically, e.g., to synthesize F-tests. Termlist is a list of one or more terms in the model for which you want to construct F-tests. List these just as you did on the model. Errorterm is a term in the model to be used as the denominator in the F-tests. Alternatively, errorterm can be a linear combination of terms from the model and the reserved word, ERROR, can be used to represent MSE. Minitab will calculate the F-ratios and p-values for you. For example: TEST A / A*B + A*C + B*C - 2*A*B*C - 2*ERROR The program constructs the synthetic denominator MS for the F-test. This denominator MS is the linear combination of the MS's provided with the TEST subcommand, and should have the same expectation as the numerator MS under the hypothesis being tested. The synthetic denominator has approximate degrees of freedom calculated by the formula: ( MS(denom.) )**2 DF(denom.) = -------------------------------- SUM( (Ai*MS(i))**2/DF(i) ) where MS(denom.) = SUM( Ai*MS(i) ), and the MS(i) are the MS's for terms in the model with degrees of freedom DF(i). 19-Feb-92