"error evaluating factor" with linear mixed effect model

Hello. I would like to compare the relative abundance of a single taxon (feature ID is 0856ee30c4a451c9cac279adc5e34c24) over time ("Exper.Day") between two treatments. I would like to use a Linear Mixed Effects Model to do this. There are 3 replicates per treatment. The command that I used is pasted in below and the error message that I got is pasted in just below it.

qiime longitudinal linear-mixed-effects
--i-table relativefrequencytable.qza
--m-metadata-file metadata_Day2onward.txt
--p-metric 0856ee30c4a451c9cac279adc5e34c24
--p-group-columns Treatment
--p-state-column Exper.Day
--p-individual-id-column Replicate
--o-visualization linear-mixed-effects.qzv

I got this error message:Error evaluating factor: NameError: name 'Exper' is not defined
f07f958c69e60461785756495e54f34b8 ~ Exper.Day * Treatment

I have searched the forum to see if anyone else had this problem and I couldn't find anything. Please advise. I have attached the metadata text file. metadata_Day2onward.txt (1.1 KB)

Thank you,


Hi @Lisa_Crummett,
I’m guessing here but I think the error is occurring because of the period between Exper and Day. Can you try putting quotes around it like “Exper.Day” and try again? You might have to use a different quoting, I can never remember which one to use in which plugin. Alternatively while someone corrects this you can also just rename your metadata column name to ExperDay

1 Like

Welcome back to the forums Lisa,

I wonder if the . period in the middle of Exper.Day is causing a problem. Could you try renaming it to ExperDay and rerunning this command?

Let me know what you find,


Thank you for your quick reply Colin and also Mehrbod.
I tried changing the name to “ExperDay” and now I am getting this error: Cannot predict random effects from singular covariance structure.

Not sure why I would get that because I have 2 treatments that were measured over multiple days?

What do you think?


What is the command you are using now?

I recommend checking out the feature table — the issue may be with the abundance of that feature (e.g., all zero values?).

The issue is not one with the metadata… e.g., this command works (same as you used above but using a metadata value as the metric, rather than a feature):

qiime longitudinal linear-mixed-effects \
  --m-metadata-file metadata_Day2onward.txt \
  --p-metric MorningpH \
  --p-group-columns Treatment \
  --p-state-column ExperDay \
  --p-individual-id-column Replicate \
  --o-visualization linear-mixed-effects.qzv

Thanks Nicholas. Maybe that was it. I tried using a different feature ID, one that I know didn’t have all zeros, and it appears to be working because I haven’t gotten any error messages… it is taking a surprisingly long time to process the command (given that it is analyzing only one feature ID). Fingers crossed though.



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