The structural model for ANOVA with one fixed factor and one random factor is similar to that for the two fixed factor model.
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
Thus we have
The definitions of SS_{A}, SS_{B}, S_{AB}, SS_{E} 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
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 H_{0} | Alt Hyp H_{1} | Statistical Test |
Factor A Effect | α_{i} = 0 for all i | α_{i} ≠ 0 for some i | |
Factor B Effect | |||
Interaction Effect |
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
Observation: Estimates of the population variances and confidence intervals corresponding to the random effects, and , 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.
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.
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.
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.
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.
Figure 5 – Dialog box for Two Mixed Factors ANOVA
The output consists of some descriptive statistics plus the ANOVA table shown in Figure 3.
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.
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
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!
Tim,
I’ll add this option to my list of future enhancements.
Charles