------------------------------------------------------------------------------- help foranovaplot7-------------------------------------------------------------------------------

Plots of ANOVA fit, including interaction plots

anovaplot7[,graph_options]

anovaplot7varlist[,graph_options]

Description

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

anovaplot7is for Stata 7 only and has been superseded for later versions byanovaplot.

RemarksWith the first syntax, no varlist is specified.

anovaplot7shows the response and predicted values on the y axis; the covariate named first in theanovacommand on the x axis; any covariate named second in theanovacommand by separate groups within a two-way or scatter plot; and any covariate named third in theanovacommand by separate images usinggraph, 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 theanovacommand.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

anovacommand.Note especially that the graph format produced by

anovaplot7is appropriate for models with at most one continuous covariate, which should always be the covariate named first. With that caveat,anovaplot7offers a way of showing parallel and diverging regression lines for models with one continuous covariate.

Options

graph_optionsare options ofgraph, twoway.To suppress plotting of response data, specify

ias the firstsymbolto 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:

systolicas response on y axis,drugas factor on x axis:. anova systolic drug

. anovaplot7

Two-way anova, no interaction term:

systolicas response on y axis,diseaseanddrugas factors, withdiseaseon x axis, and levels ofdrugdefining 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)

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

AcknowledgementsKen Higbee provided very helpful comments.

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