2 groups, 2 timepoints, fixed effects

Hi everyone,

I would like some help with the design of my analysis.
I have samples from 2 groups in 2 timepoints. Let’s say Treated1, Treated2, Control1, Control2.
My metadata table includes: Subject ID, Timepoint (1 or 2), Treatment (Treated or Control) and some other variables such as Age, Sex etc.
I want to check for differentially abundant taxa between timepoints (treated1 vs treated 2, control1 vs control2) as well as between treatment groups per timepoint (treated1 vs control1, treated2 vs control2).
I have run some experiments but I have gotten somewhat confused. For example:

Exp. 1: Isolated the treated samples only and want to compare timepoint 1 with timepoint 2.
fit_data1 = Maaslin2(
fixed_effects = c(“Timepoint”),
random_effects = c(“Subject”)

Exp. 2: Same procedure, but I wanted to account for confounders.
fit_data2 = Maaslin2(
fixed_effects = c(“Timepoint”, “Sex”, “Age”),
reference = c(“Sex,F”),
random_effects = c(“Subject”)

Exp. 3: Instead of isolating the treated samples, I tried to use all samples and create a new column for the interaction of Treatment and Timepoint. I’m doing this in order to perform all comparisons at the same time.
fit3 = Maaslin2(
fixed_effects = c(“Timepoint”, “Treatment”, “treatment_time”),
reference = c(“treament_time,Treated1”),
random_effects = c(“Subject”)

I have understood that the first 2 approaches are correct, but I am not sure about the 3rd one. If I proceed with the 1st one, I will have to repeat the same procedure, each time isolating the 2 groups that I want to compare. Is this correct, and is this equivalent with the 3rd one? In the 3rd one, do I have to include Timepoint and Treatment as fixed effects, or just the new variable?
Lastly, I am getting several warnings, especially in the 3rd experiment, including:

  • WARNING::Fitting problem for feature 35 returning NA
  • In .checkRankX(TMBStruc, control$rank_check) :
  • fixed effects in conditional model are rank deficient
  • In fitTMB(TMBStruc) :
  • Model convergence problem; non-positive-definite Hessian matrix. See vignette(‘troubleshooting’)
  • In fitTMB(TMBStruc) :
  • Model convergence problem; false convergence (8). See vignette(‘troubleshooting’)
  • In fitTMB(TMBStruc) :
  • Model convergence problem; extreme or very small eigenvalues detected. See vignette(‘troubleshooting’)

Is this worrying?

Thank you,

Hi Christina,

Hope things are going well and sorry it took awhile to get back to you…

In terms of experimental design… I think approach 3 is reasonable, however, it seems that the model is having difficulty converging most likely due to your model being over specified or your random effect being perfectly correlated with some type of fixed effect (most likely the combination of timepoints and treatment).

Are you doing any type of prevalence filtering before testing? This might help get ride of some of the convergence issues you are running into… In general models with these types of warnings should be treated with a high level of suspicion and should not be taken at face value (why they give you warnings). I would suggest plotting those results out and then thinking about a test that might work better to address the biological question at hand.

Hopefully that was helpful…

Hi Jacob,

Thank you for your reply!
I see. I don’t think that my random effect correlates with another feature, because it is just subject IDs. Maybe it is not converging due to another issue. In any case, maybe I will repeat Exp.1/2 instead, each time isolating the groups I want, to be safe.
I have not done prevalence filtering beforehand, but I noticed that MaAsLin2 performs filtering by default and I didn’t change that.