Linear mixed effect model results doesn't show all treatments

Hello group, its me again

I was running linear mixed effects to see alpha diversity over time and i have a couple of question, first i show my script

!qiime longitudinal linear-mixed-effects
--m-metadata-file metadata.tsv
--m-metadata-file Run1/Core-metricsRun1/shannon_vector.qza
--p-metric shannon_entropy
--p-group-columns "Treatment"
--p-state-column Time
--p-individual-id-column "Study ID"
--o-visualization Run1/LME/linear-mixed-effectsRun1.qzv

(1) On my dataset i have four treatments: A,C,K and NA. But on the model results only C,K and NA are included. Is it supposed to be like this? Treatment K is control treatment.

(2) Since all treatments started with a first dose of K i understand that is why it has mean line (green) from the beginning (-24 hours Time). However, NA (red), as all other treatments, also goes to the beginning.

Should i just run the same with only the samples from 48 hours onwards?

Hello Boris,

This sounds like a study design question, and I'm not sure I totally understand your study design...

On stat tests like this, be aware of confounding variables. I wonder if group K is cofounded by something else, like not having other groups at time -20.

Also remember that models are only valid within the range measured, and are suspect where you do not have data. (poor citation, suggest a better one!) (You can't predict the future because you don't have data from the future. :crystal_ball: )

1 Like

Hello, i will try to explain my project better. It consists of two parts

In part I, for 48 hours prior to the start of part II, all animals were continuously given the control treatment (K).
At the beginning of part II and for 48 hours continuously, treatments C,A and NA were given to the animals on their respective groups. A control group continued to received treatment K in these 48 hours.
Fecal samples were collected 24 hours before and, at 48 and 120 hours after part II started.

I have filtered my table to only contain the samples from 48 and 120 hours, to have a better look at the graph. The model results table still only shows Treatment[T.C], Treatment[T.K] and Treatment[T.NA], still missing treatment A. Is this alright ?

I understand that LME can be used to see changes on Alpha Diversity over time, and that is reflected on the graph given. I just would like to know if the Model Results Table is fine.

1 Like

Hi @Boris_Martin_Tangoa,

Happy to help out here! :qiime2:

Thanks to @jwdebelius and @Nicholas_Bokulich for the help below:

This is pretty standard for regression equations. Your model is testing four things:

  • Is the reference group (intercept) different from 0. (Intercept term)
  • Is there a difference at time 0 between your treatment and reference group (Treatment[T.X] terms)
  • Is there a change over time in the reference group (time)
  • Does the rate of change differ over time with different treatments? (time x treatment)

You could re-code the model (check the statsmodels formula documentation) to test the hypothesis that there's a difference in each of your groups compared to 0, but I don't actually think this is what you want. So, the group you're missing (A), is what we're treating as the reference and it's rolled into the intercept. What you may want to do is either create a dummy variable that codes your treatment as numbers with K=0, add a prefix (1-K, 2-A, etc) or in some other way indicate that K is your control group when you run the model.

This is only a diagnostic plot showing the trend line. So it is working as intended.

Yes - I'd probably advise a delta. The other option would be a three level model - time*treatment*treated and that would suck to interpret.

Hope this helps! Cheers :lizard:

4 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.