Hi, I have paper to write, and the analyses is based in the 16S rRNA sequencing, we have water samples and sediment samples, so I want to compare Shannon index generated with water (4 deeps ) and sediment.
So my question is, can I use linear model and then use Tukey's test post-hoc to compare water (4 deeps) vs sediment ? Or anova 2 ways and Tukey?
In the data frame df, the Deep column has 5 categories, D1, D2, D3, D4 corresponding to 4 deeps of water (example 20m, 200 m, 1000m, 3000m ) and Sediment. In the column SampleType we have 2 categories Water and Sediment (in the data frame df only shows 4 rows, but it have 50 samples).
head(df, 4)
shannon Deep SampleType
Sample_1 5.22 D1 Water
Sample_2 5.92 D2 Water
Sample_3 4.97 D1 Water
Sample_4 6.01 Sed Sediment
If I use linear model in R
lm(shannon ~ Deep, data = df) %>% tukey_hsd()
or, if I use anova (in this order Deep + SampleType) it give me the same results
aov(shannon ~ Deep + SampleType, data = df) %>% tukey_hsd()
both methods give differences among the D1 vs Sed, D2 vs Sed, D3 vs Sed, D4 vs Sed. But not among water sample that correspond to 4 deeps (D1 vs D2 vs D3 vs D4, not differences ).
but if I use first SampleType + Deep it give different results
aov(shannon ~ SampleType + Deep, data = df) %>% tukey_hsd()
it give me differences only among Water and Sediments, but not among deeps and sediment !!!!
so which is the best way to compare alpha diversity based on Shannon index to determinate if water and sediment present differences among the deep (D1, D2, D3, D4) vs Sediment ???
Thanks