Example 1: Simple Factorial ANOVA with Repeated Measures
For this example of a 2 x 2 (between) x 3 (repeated measures) design, open the data file Adstudy.sta:
Ribbon bar. Select the Home tab. In the File group, click the Open arrow and from the menu, select Open Examples. The Open a Statistica Data File dialog box is displayed. Adstudy.sta is located in the Datasets folder.
Classic menus. From the File menu, select Open Examples to display the Open a Statistica Data File dialog box; Adstudy.sta is located in the Datasets folder.
The Startup Panel contains options to specify very simple analyses (e.g., via One-way ANOVA - designs with only one between-group factor) and more complex analyses (e.g., via Repeated measures ANOVA - designs with between-group factors and a within-subject factor).
Select Repeated measures ANOVA as the Type of analysis and Quick specs dialog as the Specification method.

Then, click the OK button to display the ANOVA/MANOVA Repeated Measures ANOVA dialog box.

Click the Variables button (on the ANOVA/MANOVA Repeated Measures ANOVA dialog) to display the variable selection dialog. Select Measure01 through Measure03 as dependent variables (in the Dependent variable list field) and Gender and Advert as factors [in the Categorical predictors (factors) field].

Then click the OK button to return to the previous dialog.
The repeated measures design. Note that the design of the experiment that we are about to analyze can be summarized as follows:
| Between-Group | Between-Group | Repeated Measure Factor: Response | |||
| Factor #1: Gender | Factor #2: Advert | Level #1: Measure01 | Level #2: Measure02 | Level #3: Measure03 | |
| Subject 1 | Male | Pepsi | 9 | 1 | 6 |
| Subject 2 | Male | Coke | 6 | 7 | 1 |
| Subject 3 | Female | Coke | 9 | 8 | 2 |
| .
. . | .
. . | .
. . | .
. . | .
. . | .
. . |
Specifying a repeated measures factor. The minimum necessary selection is now completed and, if you did not care about selecting the repeated measures factor, you would be ready to click the OK button and see the results of the analysis. However, for our example, specify that the three dependent variables you have selected are to be interpreted as three levels of a repeated measures (within-subject) factor. Unless you do so, Statistica assumes that those are three "different" dependent variables and will run a MANOVA (i.e., multivariate ANOVA).
In order to define the desired repeated measures factor, click the Within effects button to display the Specify Within-subjects Factors dialog.



This dialog contains various options. For example, you can review values of individual variables before you make your selections by clicking the Zoom button, scan the file and fill the codes fields (e.g., Gender and Advert) for some individual or all variables, etc. For now, click the OK button; Statistica automatically fills in the codes fields with all distinctive values encountered in the selected variables,

and closes the dialog.

![]()

The only effect (ignoring the Intercept) in this analysis that is Statistically significant (p =.007) is the RESPONSE effect. This result can be caused by many possible patterns of means of the RESPONSE effect (for more information, see the ANOVA - Introductory Overview). We will now look graphically at the marginal means for this effect to see what it means.
To bring back the ANOVA Results dialog (that is, "resume" the analysis), press CTRL+R, select Resume from the Statistics menu, or click the ANOVA Results button on the Analysis bar. When the ANOVA Results dialog is displayed, click the All effects/Graphs button to review the means for individual effects.

This dialog contains a summary Table of all effects (with most of the information you have seen in the All effects spreadsheet) and is used to review individual effects from that table in the form of the plots of the respective means (or, optionally, spreadsheets of the respective mean values).

The graph indicates that there is a clear decreasing trend; the means for the consecutive three questions are gradually lower. Even though there are no significant interactions in this design (see the discussion of the Table of all effects above), we will look at the highest-order interaction to examine the consistency of this strong decreasing trend across the between-group factors.


As you can see, this pattern of means (split by the levels of the between-group factors) does not indicate any salient deviations from the overall pattern revealed in the first plot (for the main effect, RESPONSE). Now you can continue to interactively examine other effects; run post-hoc comparisons, planned comparisons, and extended diagnostics; etc., to further explore the results.
Interactive data analysis in Statistica. This simple example illustrates the way in which Statistica supports interactive data analysis. You are not forced to specify all output to be generated before seeing any results. Even simple analysis designs can, obviously, produce large amounts of output and countless graphs, but usually you cannot know what will be of interest until you have a chance to review the basic output. With Statistica, you can select specific types of output, interactively conduct follow-up tests, and run supplementary "what-if" analyses after the data are processed and basic output reviewed. Statistica's flexible computational procedures and wide selection of options used to visualize any combination of values from numerical output offer countless methods to explore your data and verify hypotheses.
Automating analyses (macros and Statistica Visual Basic). Any selections that you make in the course of the interactive data analysis (including both specifying the designs and choosing the output options) are automatically recorded in the industry standard Visual Basic code. You can save such macros for repeated use (you can also assign them to toolbar buttons, modify or edit them, combine with other programs, etc.). For more information, see Statistica Visual Basic.