-------------------------------------------------------------------------------
help for anovaplot7
-------------------------------------------------------------------------------

Plots of ANOVA fit, including interaction plots

anovaplot7 [, graph_options ]

anovaplot7 varlist [, graph_options ]

Description

anovaplot7 plots fitted or predicted values from an immediately previous one-, two- or three-way anova. By default the data for the response are also plotted. In particular, anovaplot7 can show interaction plots.

anovaplot7 is for Stata 7 only and has been superseded for later versions by anovaplot.

Remarks

With the first syntax, no varlist is specified. anovaplot7 shows the response and predicted values on the y axis; the covariate named first in the anova command on the x axis; any covariate named second in the anova command by separate groups within a two-way or scatter plot; and any covariate named third in the anova command by separate images using graph, by(). Thus with this syntax the appearance of the plot, although not the values shown, is sensitive to the order in which covariates are specified in the anova command.

With the second syntax, a varlist is supplied, which must be a permutation of the covariates previously used. The order of the covariates in the varlist is used to determine the form of the graph, as above. This permits changing graphs without reissuing the anova command.

Note especially that the graph format produced by anovaplot7 is appropriate for models with at most one continuous covariate, which should always be the covariate named first. With that caveat, anovaplot7 offers a way of showing parallel and diverging regression lines for models with one continuous covariate.

Options

graph_options are options of graph, twoway.

To suppress plotting of response data, specify i as the first symbol to be shown.

To suppress connection of groups of the second covariate, specify c(.)

To separate tied values of response, specify j(1).

Examples

. use systolic

One-way anova: systolic as response on y axis, drug as factor on x axis:

. anova systolic drug

. anovaplot7

Two-way anova, no interaction term: systolic as response on y axis, disease and drug as factors, with disease on x axis, and levels of drug defining separate profiles:

. anova systolic disease drug

. anovaplot7

Better to reverse order of covariates:

. anovaplot7 drug disease

Example of interaction term:

. anova systolic drug disease drug * disease

. anovaplot7

As above, but no plotting of data.

. anovaplot7, sy(iOdp)

Examples with one continuous covariate:

. use auto

The continuous covariate is named just after the response:

. anova price weight foreign, cont(weight)

(N.B. parallel regression lines)

. anovaplot7, tr(1)

. anova price weight foreign weight*foreign, cont(weight)

(N.B. diverging regression lines)

. anovaplot7, tr(1)

Author

Nicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk

Acknowledgements

Ken Higbee provided very helpful comments.

Also see

On-line: help for anova, graph, dotplot, regdiag, cmeans (if installed), sparl (if installed)