How to calculate how many levels of nuisance factor I need for a desired power level in my experiment I have a nuisance factor that introduces a lot of variation in my data. I want to know how many levels of this factor I need to include in my blocked design to get a power level of, say, 90%.
As an example, let's say I'm measuring the mass of mice, and I see a lot of variation between mice from different lineages. So for this example, I want to know how many different lineages I should use in my experimental design.
Is there any quick and simple way to calculate this in R? What else do I need to consider for this analysis?
Thanks!

Perhaps I'm misunderstanding this, but it's sounds like you don't have a simple random sample. Rather you're sampling from clusters and two observations in the same cluster (e.g. linage of a mice) are not independent. The way to deal with this is to estimate and incorporate the design effect into your power calculation. For this you'll need to estimate the intracluster correlation coefficient. If this is large, you could need a substantially larger sample to achieve the same power you would have if you were using a simple random sample. See the Wikipedia entry on design effect. For R, you can use the package clusterPower to help estimate the required sample size.
For your analysis, you'll also need to take the fact that you're not working with independent observations into account. One way to do this is to use a multilevel regression model (also sometimes referred to as a hierarchical model).
