Analysed mixed model_sameid_3_trt's_'trt not numeric'

I want to analyse alpha diversity between treatments in a crossover study:
I tried this code:
qiime longitudinal linear-mixed-effects
--m-metadata-file metadata.txt simpson_vector.qza
--p-metric simpson
--p-state-column trt
--p-individual-id-column study-id
--o-visualization simpson_pairwise-differences.qzv

Thew data look like this (mockdata):
study-id trt ASV1 ASV2
1 A -0.7995315179 -0.926446330
1 B 0.9852104534 0.263029904
1 C 0.2096293969 2.301627332
2 A -1.4283076147 -1.413155483
2 B -0.0006199076 0.827058332
2 C -2.1007409175 -0.489817459
3 A 0.3916453997 -0.003149293
3 B 1.0196729611 1.385079548
3 C -0.1977187744 -1.317666607

I get the error
'Plugin error from longitudinal:
trt is not a numeric metadata column. Please choose a metadata column containing only numeric values.'
I get an output when I make it numeric, but, I dont want it to be numeric, it should be a factor! When I run the qzv file in qiime view I want boxplots, not a numeric presentation.
Is the code wrong, or Im I missing something else, how should this be performed?
Many thanks! :slight_smile:



  --p-group-columns delivery,diet,sex \
  --p-state-column month \

I think that trt must be a group-column, state-column is time.
Hope that will help.
Regards, sn

Thanks for your answer:)
Yes, state seem to specify time. But the only time factor in this case is the three treatments. There is no repeated sampling within the treatments.

I can include visit, which indicate which visit each id had each trt:
id trt visit col1 col2
1 A 1 0.2509791 -1.21044983
1 B 3 0.5643077 0.09398940
1 C 2 1.2232244 1.10516993
2 A 3 1.8993685 1.00368351
2 B 2 1.2371727 -0.39091816
2 C 1 1.2021290 -0.19460470
3 A 2 -0.6738164 -0.06299194
3 B 1 0.8305264 1.31415096
3 C 3 1.0613129 -1.28411292

But visit is not necessary in the model. Subjects are randomized in which order to receive the interventions.

In R the model should be (the simplest case):
lme(y~ trt + (1|ID), data=data)
visit as a time factor is not necessary

Im still curious how this should be done in qiime! :slight_smile:

Hello @EEE !

Q2 team have great explanatory videos on LA:

    with slides etc.

I think, there is much more and better formed information on your questions.

Regards, sn

1 Like

Thanks for the videolinks! :slight_smile:

Hello @EEE !
I'm glad to read this!
Regards, sn

Thanks a lot for the suggestion! :slight_smile:

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