# 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. In this section 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 are the same.

Topics:

### 5 Responses to Nested ANOVA

1. Anastasiya says:

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.

• Charles says:

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

2. Anastasiya says:

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.

3. Keith says:

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?

• Charles says:

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