Nested ANOVA

In the two-factor ANOVA models described elsewhere on this website, the factors are fully crossed; i.e. each level i in Factor A is paired with every level j in Factor B. On this webpage, we describe nested (or hierarchical) models in which each level i in Factor A is paired with only one level j in Factor B.

We will assume that we have a completely balanced design. This means that for each level i in Factor A and level j in Factor B the number of elements nij are equal (say to m), and for each level i in Factor A the number of levels in B is the same.

Topics

9 thoughts on “Nested ANOVA”

  1. Hello Charles,
    I work on biomedicine, with animal models, and I have the following experimental design:

    14 control mice: 11 survivors (5 males, 6 females)
    3 non survivors(2 males, 1 female)

    21 KO mice: 14 survivors (6 males, 8 females)
    7 non survivors (6 males, 1 female)

    I would like to know if gender (male/female) has a role in the mortality rate. Is a nested anova the way to go? or is there a more appropriate set of tests that I should perform?

    PS: I know that the sample is quite small. I just want to understand the process I should follow in this type of design.

    Thank you so much!

    Reply
    • Hello Oriol,
      I understand that you want to test the null hypothesis that
      H0: The mortality rate for males from population X is the same as that for females from population X.
      but I don’t know what population X is. Is it represented by the KO sample? Is it represented by the Control sample?
      Or is it represented by a combination of the KO and Control samples? This seems like a strange population, Can you explain better?
      Charles

      Reply
  2. I am testing the effect of crowding on fish feeding. My experimental design involves holding groups of fish at three densities (5, 10, 15) with two replicates at each density. If I pool the data from replicates, they do not meet the assumptions of normal distribution or equality of variance. Can you suggest how I should test for the effect of density on feeding while including replicates in the model? Many thanks.

    Reply
    • Stephen,
      If I understand correctly, your experiment includes a grand total of 6 fish (two replicates at each of the 3 densities). With such a small sample, you can’t expect much. Even if somehow normality and equality of variances held, with such a small sample the statistical power of your test would be completely unacceptable.
      If you are trying to perform ANOVA but the homogeneity of variances assumption failed, I would usually suggest using Welch’s ANOVA (assuming normality wasn’t violated too much), but in your situation, I can only throw up my hands.
      Charles

      Reply
  3. Hi Charles,

    I am establishing moisture control limits with data generated from 2 labs, 2 analysts from each lab at N=10 each. I started evaluating the data with a nested Anova which yielded a lab p-value greater than 0.05 but analyst p-value less than 0.05. Since this indicated a significant difference in the analysts’ means I performed 2-Sample F and t tests for every analyst pair. The result was a sig diff in the 1&3 and 3&4 pairs. I decided to them remove Analyst 3 data and performed a one-way Anova on the remaining 3 sets. The result was no sig diff. Finally, a performed Grubb’s and saw sig diff indicating an outlier(s). The lowest value from Analyst 1 was pretty obviously an outlier so I pulled it and the next Grubb showed no outliers. At this point do I need to perform anything else on the data? I don’t think another nested Anova is possible with the unbalanced sets due to the outlier being pulled but is there more or should I am I good with the remaining data?

    Reply
    • Keith,
      1. When you performed the pairwise t tests, did you use the standard error from ANOVA or from the pairs of data? Did you you correct for experiment-wise error?
      2. Since you performed the desired follow-up tests, you probably don’t need to repeat ANOVA. Note, however, that it is possible to perform an unbalanced nested ANOVA. I will eventually add this to the website.
      Charles

      Reply
  4. I forgot to mention in the above explanation that animals may give me more than one threshold per stimulus type- aka some animals could go through the 7 conditions and then do it again and again.

    Reply
  5. Hi Charles. I was wondering if you could suggest a proper way to nest my factors.

    I have a very odd design. My independent variables are Stimulus Type (USV), AGE (as a continuum from 200 to 946 days, each observation per animal is dependent on the ANIMAL only, aka no two thresholds are collected on the same day), and sex (F and M). DV is hearing threshold. Each animal has a variable number of DVs. I am running into an issue where I don’t know what to do with Age- it has to be a continuous variable, making it into discrete categories is not an option for my experiment. I am hoping you could suggest something.

    Thank you.

    Reply
    • Anastasiya,
      I would need more information to answer your question. I assume that the design that you are considering requires that Age be a discrete variable instead of a continuous variable. You can always make Age into a discrete variable (e.g. 200-299, 300-399, etc.), but this is probably not the right way to go. What are you trying to accomplish? Why are you trying to use Nested Anova?
      Charles

      Reply

Leave a Comment