[R] cca with repeated measures

René Mayer mayer at psychologie.tu-dresden.de
Fri Nov 18 10:25:11 CET 2011


Dear all,
How can I run a constrained correspondence analysis with
the following data:
15 animals were measured repeatedly month-wise (over to 2 years)  
according to ther diet composition (8 food categories).

our data.frame looks like this:

food 1  2 ... 8  sex season year animal
freq 12 8 ... 1  0   summer 2011 1
freq 0  7 ... 0  1   winter 2011 1
...
freq 0  7 ... 0  1   spring 2011 15

We want to find out if season and sex influences diet composition.
My experience with CCA is limited, but in repeated measures ANOVA,  
e.g. with aov()
on has to define the between (animal) error term in order to deal with  
the pseudoreplication.
Do I have to restructure or reshape the data in order to deal with  
pseudoreplication
the data? Or do I have to define an error strata?
I suspect I cannot simply run:

library(vegan)
model=cca(food ~ season*sex+year+animal, data)

I would be grateful for any help.

Thanks in advance,
René



More information about the R-help mailing list