Thank you @timanix for the quick response! That just made so much sense, I should have realized that.
However, after changing it to what it’s supposed to be (“Site” in this case), I encountered new issues, I first changed the column names in the metadata file of my random-effect variables since some of them were “undefined” for some reason.
The code I used was:
qiime longitudinal linear-mixed-effects
–m-metadata-file sample-metadata-modified.tsv
–m-metadata-file 2018-lme-filtered-core-metrics-results/shannon_vector.qza
–p-metric shannon_entropy
–p-random-effects Week,pH,conductivity,WaterTemp,WaterDepth,ammonia,nitrate
–p-group-columns TreatP
–p-state-column Week
–p-individual-id-column Site
–o-visualization 2018-lme-filtered-core-metrics-results/2018-lme-shannon.qzv
Then I got this error message:
Plugin error from longitudinal:
operands could not be broadcast together with shapes (65,1) (56,1)
Debug info has been saved to /tmp/qiime2-q2cli-err-qfl3qr2c.log
Here is what’s in the log:
individual_id_column, random_effects=random_effects, formula=formula)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/q2_longitudinal/_utilities.py”, line 344, in _linear_effects
re_formula=random_effects)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/regression/mixed_linear_model.py”, line 1025, in from_formula
formula, data, *args, **kwargs)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/base/model.py”, line 194, in from_formula
mod = cls(endog, exog, args, **kwargs)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/regression/mixed_linear_model.py”, line 718, in init
**kwargs)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/base/model.py”, line 236, in init
super(LikelihoodModel, self).init(endog, exog, **kwargs)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/base/model.py”, line 77, in init
**kwargs)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/base/model.py”, line 100, in _handle_data
data = handle_data(endog, exog, missing, hasconst, **kwargs)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/base/data.py”, line 672, in handle_data
**kwargs)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/base/data.py”, line 72, in init
**kwargs)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/base/data.py”, line 267, in handle_missing
nan_mask = _nan_rows((nan_mask[:, None],) + combined_2d)
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/base/data.py”, line 49, in _nan_rows
return reduce(_nan_row_maybe_two_inputs, arrs).squeeze()
File “/opt/conda/envs/qiime2-2020.8/lib/python3.6/site-packages/statsmodels/base/data.py”, line 48, in _nan_row_maybe_two_inputs
(x_is_boolean_array | _asarray_2d_null_rows(y)))
ValueError: operands could not be broadcast together with shapes (65,1) (56,1)
not sure what’s going on here…