1
$\begingroup$

For my data set, I need to perform some sort of two factor repeated measures ANOVA. I have one between-subject factor called "Treatment" and one within-subject factor called "Frequency" with 8 levels. My problem is that most of my subjects don't have responses, called "Threshold", for all 8 of the levels of frequency (missing values). In addition, my two treatments are also unbalanced (about 23 for the first treatment type and about 21 for the other).

What r code do you suggest I try? And what would that code look like? I've been looking at the aov and Anova (car package) functions. I also need to figure out the formula for my model. I was thinking something like

aov(Threshold~(TreatmentFrequency)+Error(Subject/(TreatmentFrequency))

but I keep getting error messages like "In aov (......) Error() model is singular."

My question here is if you only include within-subject factors in the error term, so Error(Subject/Frequency) or just Error(Subject), or if I had it right in including everything? Also, should I include rows of responses for every frequency per bird, even if I don't have that specific value? Should I put NA's in those missing value cells, or delete the entire row of data for that level?

Any help would be greatly appreciated! I'm new to more advanced statistics and modeling, so keep that in mind! And if I need to clarify or add anything, just let me know. Thanks!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.