ANOVA/MANOVA Syntax - Examples

Shown below are examples of ANOVA/MANOVA syntax specifications for various common designs; refer to the ANOVA/MANOVA Syntax Overview for details concerning the ANOVA/MANOVA syntax. For additional examples, refer to the ANOVA/MANOVA Examples.

In practically all cases, the most efficient way to write ANOVA/MANOVA syntax is to use the ANOVA/MANOVA Quick-specs dialogs. Specifically, from the General ANOVA/MANOVA Startup Panel - Quick tab, select the desired analysis in the Type of analysis list box, Quick specs dialog as the Specification method, and then click OK on the Startup Panel to display the respective ANOVA/MANOVA Quick Specs dialog. Note that when selecting a Type of analysis, it is not necessary that your design matches exactly the chosen type of design. For example, if you want to exclude certain effects from a factorial ANOVA design, choose Factorial ANOVA from the General ANOVA/MANOVA Startup Panel - Quick tab, specify the full factorial design, and then on the ANOVA/MANOVA Quick Specs dialog click the Syntax editor button. The syntax for the full factorial design (as specified in the ANOVA/MANOVA Quick Specs dialog) will be written out to the syntax editor, and you can now modify the DESIGN statement to customize the design (e.g., to drop effects).

MANOVA Model Syntax Examples.

DEPENDENT = CORRECT1 CORRECT2 CORRECT3;
GROUPS = GENDER("Male" "Female")
    TIME(1 2 3);
DESIGN = GENDER | TIME;
REPEATED = R1 3;

Example 2: A main effects only ANOVA. This example demonstrates how you can analyze Latin Square designs by specifying a model that only contains main effects. To run this example, use example data file Latin.sta.

DEPENDENT = REDUCTIN;
GROUPS = DRIVER(1 2 3 4)
    CAR(1 2 3 4)
    ADDITIVE(1 2 3 4);
DESIGN = DRIVER + CAR + ADDITIVE;

In addition, you may want to review the General Linear Model (GLM) Syntax Examples, which, in addition to demonstrating some of the advanced and unique features of GLM (not available in ANOVA/MANOVA), provide further illustration of the general syntax rules.

See also, General ANOVA/MANOVA - Index.