I need to do a power analysis of a group that is composed of three subgroups.
The measurements to sample are difference measurements between two dogs of the same breed rated side by side. Dogs are sampled independently. There are three sub-categories below each dog breed. The null hypothesis is no difference between breeds (the parent group) (d = 0). The alternative is that there is a difference > 0.
So when we collect data, we have three rows:
- Breed sampled
- Subcategory
- Difference measurement (continuous real number between -1 and 1)
For a typical power analysis from a group with no known subgroups, I'd simply use `pwr.t.test(n, d, type="one.sample").
However, I wasn't clear if this is a reasonable thing to do if you are powering a group that has known subgroups, each distributed differently.
Do we simply think of each sample from the parent group as being identically distributed, even though the subgroup distributions are different (but, in aggregate, they form another distribution we can think of as identical)?
Or should we instead model the subgroups and simulate the power needed by replicating the sampling process?