Two Mixed Factors ANOVA

The structural model for ANOVA with one fixed factor and one random factor is similar to that for the two fixed factor model.

image9022

We assume that Factor A is the fixed factor and Factor B is the random factor. Thus μ and the αi are constants while the βj, (αβ)ij and εijk are variables. We assume that for all i, j and kβj, (αβ)ij and εijk are pairwise independent, and

image9043

Thus we have

image9044

The definitions of  SSA, SSB, SAB, SSE and similarly for the MS and df terms are exactly the same as for the two fixed factor model described in Two Random Factor ANOVA.  We also have

image9032image9045image9034image9035

The null and alternative hypotheses as well as the test statistics are similar to that used in the two random factor case (with the exception of the main factor A case) as summarized in the following table:

Test Desired Null Hyp H0 Alt Hyp H1 Statistical Test
Factor A Effect  αi = 0 for all i  αi ≠ 0 for some i image9036
Factor B Effect  image9028  image9029 image9046
Interaction Effect  image9030  image9031 image9038

Observation: The mixed factor model given here is called the unrestricted version. There is a restricted version where the test for factor B is done via

image9037

Observation: Estimates of the population variances and confidence intervals corresponding to the random effects, \sigma^2_\beta and \sigma^2_{\alpha\beta}, are calculated as in the two random factor model.

Example 1: A research group wants to study the effectiveness of three types of training programs (Conflict Management, Psychology and Negotiation) for FBI agents’ preparativeness for dealing with local youth who may become involved in terrorist attacks.

Throughout the country, local FBI field offices have conducted one or more of these types of training.  The research group decides to randomly select three field offices that have conducted all three types of training. It then selected 30 FBI agents at random from each of the three field offices, 10 of whom took only the Conflict Management training, 10 whom took only the Psychology training and 10 whom took only the Negotiation training. Each person in the sample was then given a test to assess their skills in dealing with local youth who were at risk of becoming involved in terrorist attacks. The results are shown in Figure 1.

Determine whether there is a significant difference between the three training courses in preparing agents for dealing with youths susceptible to becoming involved in terrorism.

Anti-terrorism training data

Figure 1 – Data for anti-terrorism training

To perform this analysis you can execute Excel’s Anova: Two Factor with Replication data analysis. You will get similar results by using the Real Statistics Anova: two factor data analysis, as shown in Figure 2.

Modification of two factor Anova

Figure 2 – Two Fixed Factor ANOVA

You can now modify the analysis in Figure 2 to obtain the mixed factor analysis as displayed in Figure 3.

Two mixed factors Anova

Figure 3 – Two Mixed Factor ANOVA

The only changes that needs to be made to Figure 2 to obtain the analysis shown in Figure 3 is to replace the formula in cell R17 by =Q17/Q19 (instead of =Q17/Q29) and the formula in cell R18 by =Q18/Q19 (instead of =Q18/Q20).

The factor of interest is the fixed factor (Rows), and we see from cell T17 of Figure 3 that there is no significant difference between the training courses. Note that this is a different result from that obtained erroneously from cell T7 of Figure 2.

Note too that it is important not to simply disregard the Office factors and perform a One-way ANOVA. The one factor analysis can be performed using the Real Statistics One-Factor ANOVA data analysis tool (as described in ANOVA Confidence Interval) on the data in range B29:D49 on the left side of Figure 4. The resulting analysis is shown on the right side of Figure 4.

Mixed via one-way

Figure 4 – One-way ANOVA

This test shows, erroneously, that there is a significant difference between the training courses (cell K39 of Figure 4).

Note that we were able to obtain the data in range A29:D49 in Figure 4 from the data in Figure 1 by checking the Display input flipping rows and columns field (as shown in Figure 5) when performing the two-factor analysis shown in Figure 2.

Real Statistics Data Analysis Tool: You can also perform the analysis for Example 1 directly (without having to modify the output as we did in Figure 3), since the Real Statistics Resource Pack provides an option to the Two Factor ANOVA data analysis tool which supports mixed models.

To use the tool for the analysis of Example 1, click on cell N13 (where the output will start), enter Ctrl-m and double click on Analysis of Variance. Next select Two Factor Anova from the dialog box that appears. Next fill in the dialog box that appears as shown in Figure 5 and click on the OK button.

Two mixed factors ANOVA

Figure 5 – Dialog box for Two Mixed Factors ANOVA

The output consists of some descriptive statistics plus the ANOVA table shown in Figure 3.

4 Responses to Two Mixed Factors ANOVA

  1. Tim says:

    First, thanks for some great tools, really helpful to have and using it extensively right now.

    Shouldn’t the F-ratio for the random factor (Factor B in the example above) be caluclated as the MeanSquareB/MeanSquareWithin? Just looking over Zar’s Biostatistical Analysis and that is what he reports.

    • Charles says:

      Tim,

      Great to read that you are finding the tools to be useful.

      As described on the referenced webpage, there are two versions of the mixed factors model. I present the “unrestricted” version. You are referring to the “restricted” version.

      Charles

      • Tim Henkel says:

        Thanks Charles! I actually saw the description in your text after I’d submitted my comment. I wasn’t familiar with the ‘unrestricted’ version, and have since found this page to be helpful in understanding the basis for both.

        https://onlinecourses.science.psu.edu/stat503/node/87

        Just to keep you busy, maybe have an option for either model which would also point users to the fact there are two approaches.

        Thanks again for all of the hard work!

Leave a Reply

Your email address will not be published. Required fields are marked *