I was wondering if you could help me figure out how to do an ANOVA that has a random effect. I have a dataset that comes from a split-brood experiment. The study is looking at whether different diets impact the development time within a species of caterpillar. Development time is considered the number of days between hatching and pupation. The egg masses of 10 females were collected, and each egg mass was split into thirds. The three sections of each egg mass were dispersed into one of three treatment groups: Diet A, Diet B, and Diet C. The diets remained the same for each treatment group from hatching until pupation. The development time was recorded for each individual caterpillar.

So, the way I understand this is a simple one-way anova won't account for possible genetic variation between egg masses that could impact development time (like a block design study). So it seems like egg mass is a random factor, while diet type is a fixed factor, and development time is the dependent variable. I'm not sure how to account for the random factor when carrying out an ANOVA in r. It is also worth noting that not all individuals survived until pupation; therefore the data is not equally divided among or within egg masses. Do you have any suggestions? 

Similar questions and discussions