Running a repeated measures ANOVA in XLSTAT

Dataset for Mixed models XLS45.0 KB

Tutorial video
  • Pro Core statistical software

  • System configuration

    • Windows:
      • Versions: 9x/Me/NT/2000/XP/Vista/Win 7
      • Excel: 97 and later
      • Processor: 32 or 64 bits
      • Hard disk: 150 Mb
    • Mac OS X:
      • OS: OS X
      • Excel: X, 2004 and 2011
      • Hard disk: 150Mb.

Benefits

  • Easy and user-friendly
    Easy and user-friendly XLSTAT is flawlessly integrated with Microsoft Excel which is the most popular spreadsheet worldwide. This integration makes it one of the simplest available tools to work with as it utilizes the same philosophy as Microsoft Excel. The program is accessible in a dedicated XLSTAT tab. The analyses are grouped into functional menus. The dialog boxes are user-friendly and setting up an analysis is straightforward.
  • Data and results shared seamlessly
    Data and results shared seamlessly One of the greatest advantages of XLSTAT is the way you can share data and results seamlessly. As the results are stored in Microsoft Excel, anyone can access them. There is no need for the receiver to have an XLSTAT license or any additional viewer which makes your team-work easier and more affordable. In addition, results are easily integrable into other Microsoft Office software such as PowerPoint, so that you can create striking presentation in minutes.
  • Modular
    Modular XLSTAT is a modular product. XLSTAT-Pro is a core statistical module of XLSTAT which includes all the mainstream functionalities in statistics and multivariate analysis. More advanced features contained in add-on modules can be added for specific applications. This way you can adapt the software to your needs making the software more cost-efficient.
  • Didactic
    Didactic The results of XLSTAT are organized by analysis and are easy to navigate. Moreover useful information is provided along with the results to assist you in your interpretation.
  • Affordable
    Affordable XLSTAT is a complete and modular analytical solution that can suit any analytical business needs. It is very reasonably priced so that the return of your investment is almost immediate. Any XLSTAT license comes with top level support and assistance.
  • Accessible - Available in many languages
    Accessible - Available in many languages We have ensured XLSTAT is accessible to everyone by making the program available in many languages, including Chinese, English, French, German, Italian, Japanese, Polish, Portuguese and Spanish.
  • Automatable and customizable
    Automatable and customizable Most of the statistical functions available in XLSTAT can be called directly from the Visual Basic window of Microsoft Excel. They can be modified and integrated to more code to fit to the specificity of your domain. Adding tables and plots as well as modifying existing outputs becomes easy. Furthermore, XLSTAT includes some special tools on the dialog boxes to generate automatically the VBA code in order to reproduce your analysis using the VBA editor or to simply load pre-set settings. This effortless automation of routine analysis will be a huge time saver on your part.

Dataset for running a repeated measures ANOVA

An Excel sheet with both the data and the results can be downloaded by clicking here.

The data correspond to an experiment in which a treatment for depression is studied. Two groups of patients (1: control / 2: treatment) have been followed at five different times (0: pre-test, 1: one month post-test, 3: 3 months follow-up and 6: 6 months follow-up). The dependant variable is a depression score.

We have performed repeated measures ANOVA in order to determine the effect of the treatment and the effect of time on the depression score. The repeated measures ANOVA model is the same as the classical ANOVA model with interactions:

AnovaRepEq.gif

We have one fixed factor (group). The difference between classical ANOVA and repeated measures ANOVA is that measures on the same patient at different times are not supposed to be independent and, thus, the covariance matrix of the errors is not diagonal.

Goal of this tutorial

In this tutorial, we will use the least squares estimation method (LS) to estimate the model. The variance-covariance matrix is supposed to be spherical.

This method is very simple: First, a classical ANOVA is performed on each time measured. Results are the same as in a classical analysis of variance. Then, results based on the covariance matrix and on the repetition factor are given.

You can use other form of covariance matrix with XLSTAT using mixed models. Please refer to the following tutorial for an example.

Data structure

Data can be presented using two formats. The classical one is one column per repetition. That means that for each repeated measure of the dependent variable there will be one column.

Setting up a repeated measures ANOVA

After opening XLSTAT, select the XLSTAT / Modeling data / Repeated measures ANOVA command, or click on the corresponding button of the Modeling data toolbar (see below).

ANOVArep2e.gif

Once you've clicked on the button, the repeated measures ANOVA dialog box appears. Select the data on the Excel sheet.

The Dependent variable (or variable to model) is here the "dv0-dv1-dv3-dv6".

Our aim is to determine the effect of the group on the variability of the depression score.

As we selected the column title for the variables, we left the option Variable labels activated.

ANO2rep2.gif

In the options tab, we select LS as estimation method (for least squares).

We leave the constraint option at a1=0, meaning that we want the model to be built on the assumption that the control group has the standard effect on the score.

Although you have to apply a constraint to the model in ANOVA for theoretical reasons, it will not affect the results (goodness of fit). The only difference it makes is in the actual writing of the model.

ANO2rep3.gif

The selected outputs are:

ANO2rep4.gif

Once you have clicked on the OK button, a dialog box is displayed so that you can choose which factors have to be taken into account in the model. The fixed effect is group, the repeated factor is repetition and the subject factor is subject (these factors are generated automatically).

ANO2rep5.gifNote: A factor cannot be the subject or repeated factor and a fixed effect at the same time.

Once you have clicked on the OK button, the computation starts. The results will then be displayed.

Interpreting the results of a repeated measures ANOVA

The first results displayed by XLSTAT are the basic statistics associated to the dependent variable.

ANO2rep6.gif

For each measure, an ANOVA is performed. Results associated to time 0, 1, 3 and 6 are displayed. For more details, you can check the tutorial on one-way ANOVA.

The analysis of variance table pre-test (dv0) is:

ANO2rep7.gif

The analysis of variance table one month post-test (dv1) is:

ANO2rep8.gif

The analysis of variance table 3 months follow-up (dv3) is:

ANO2rep9.gif

The analysis of variance table 6 months follow-up (dv0) is:

ANO2rep10.gif

We can see that the group has an effect significantly greater than 0 on the depression score after 1 month of treatment.

Once the four analyses have been performed, some additional outputs related to the repeated design are displayed.

The first table is very important and helps to validate the sphericity of the covariance matrix of the errors. This test is called Mauchly’s test.

ANO2rep11.gif

We can see that the p-value is smaller than 0.05, we can say that the covariance matrix is spherical. In addition to Mauchly’s test, Greenhouse-Geisser epsilon and Huynt-Feldt epsilon are displayed. The more they are close to one, the more the covariance matrix has a spherical representation. In our example, the sphericity hypothesis is validated.

ANO2rep12.gifANO2rep13.gif

The two following tables can now be analyzed. First, the tests on the inter-subject effects which show the effect of the group variable on the whole dataset without taking into account the repetitions (or measures). We see that the group has a significant impact on the depression score. Then, the tests on the intra-subject effects show the impact of time (of the different measures) on the dependent variable. It can be useful to look at the interaction terms between repetition and the explanatory factors. We see that the repetition factor has a significant impact on the depression score; the interaction has also a significant impact.

This study has shown that both time and treatment have a significant impact on the depression score.

Some other outputs can be useful and are available in XLSTAT: residuals, residuals charts, least square means charts, multiple means comparisons...