I want to use Fisher exact or G-test/Chi-squared (the choice depends on the numbers of observations in a particular case) to test difference in species frequencies between and within replicated groups of observations. Here are some toy-data
1.1 1.2 1.3 2.1 2.2 2.3
spec1 1 2 1 3 5 4
spec2 4 4 6 0 1 1
spec3 10 12 9 9 10 10
The first row denotes samples. The first digit of a sample ID represents a replicated group and the second one represents a replicate. Here is an example of the dataset collapsed for the first species.
spec1 1 2 1 3 5 4
others 14 16 15 9 11 11
It's easy to compare replicates within groups, because we can simply perform a bunch of pair-wise tests and apply some multiple-comparison p-value adjustment, but how do we treat replicates when we compare different groups? Can we just combine them into one sample?
I'm aware of this post, but it has no answers.