corncob icon indicating copy to clipboard operation
corncob copied to clipboard

Pairwise contrasts

Open gcuster1991 opened this issue 2 years ago • 1 comments

Hi @bryandmartin,

Thanks so much for this awesome vignette. It has been super helpful to go through and familiarize myself with the package. This isn't so much of an issue within your package but more request for some guidance for multiple comparisons after using the corncob model.

My project examines the effect of 5 treatments over three time points. In order to deal with temporal non-independence, I've decided to split my dataset into individual time points and examine treatment effects at each time point.

Based on my understanding of how my model is set up, the reference category is the "Non-Treated" group (specified by the first line of code below). In the graphical output, only those taxa that are differentially abundant (@ 0.05) in at least one of the treatments compared to the reference category show up, i.e no overlap in the confidence interval and vertical line. Is there a simple way to plot all all pairwise comparisons so that any significant pairwise difference would show up on this plot (now everything is compared to category 1... 1vs2, 1vs3 etc. I'm interested in categories 2vs3, 2vs4 etc)? In that same thought, is it possible to produce a table of all pairwise pvalues from significant models?

image

sample_data(ps_bac)$Herbicide <- factor(sample_data(ps_bac)$Herbicide, levels = c("Non-Treated", "Hand", "Aatrex", "Roundup Powermax", "Clarity"))
soil <- ps_bac %>%
phyloseq::subset_samples(Time == "T2") %>%
 tax_glom("Family")


set.seed(1)
da_analysis <- differentialTest(formula = ~ Herbicide,
phi.formula = ~ Herbicide,
formula_null  ~ 1,
phi.formula_null = ~ Herbicide,
test = "Wald", boot = FALSE,
data = soil,
fdr_cutoff = 0.05)

plot(da_analysis, level =c("Family")) 

gcuster1991 avatar Sep 21 '21 20:09 gcuster1991

Hi @bryandmartin,

I am also interested in pairwise contrasts.

Would you suggest using contrastsTest() for this as mentioned in issue #68?

Thanks!

msmcfarlin avatar Oct 22 '21 19:10 msmcfarlin