Hello all,
I am trying to run a repeated measures anova (my first!) and am not sure about the syntax to include a nested factor ...
I am looking at the growth of snails in response to 2 diet treatments (Treatment), where growth (Change) of each individual snails is measured at 4 times (Week). As well, the diet treatments are applied to containers that each contain 8 snails, so Container is nested within Treatment. (There are 15 containers in each treatment)
I think the aov model would be (?):
aov(Change~Treatment/Container*Week + Error(Snail/(Container*Week))
but the data is unbalanced, so I need to use type 3 sums of squares.
I have tried the ezANOVA formulation:
ezANOVA(data=growrm, dv=.(Change), wid=.(Snail), within=.(Week,Container), between=.(Treatment), type=3)
which returns the error
Error in ezANOVA_main(data = data, dv = dv, wid = wid, within = within, :
One or more cells is missing data. Try using ezDesign() to check your data.
ezPrecis does not list any missing data.
I believe the error may occur because container is nested within treatment, and therefore there are (many) treatment container combinations that do not exist?
How would I indicate that container is nested in treatment in my call to ezANOVA?
Please let me know if you need any more information, and thanks for your time!
Erika