The bioBakery help forum

Reference values for a categorical fixed effect variable

Hello,

I am trying to use the maaslin2 package to model the association between a categorical intervention variable (3 levels, character variable) and OTUs. My data is longitudinal with repeated measures so I am using a mixed model with fixed effects for the intervention and random effects for my participant ID.

I’d like to set the reference category for my intervention variable and have tried to install the latest version which has the reference option (as suggested here: Which factor level to compare with) but I am getting an unused argument error when I try to run my code. Example:

fit_data <- Maaslin2(
frmeTaxa, frmeMetadata,
“file”,
fixed_effects = c(‘intervention’), random_effects = c(‘ID’),
min_abundance = 0.0001, min_prevalence = 0.2,
reference=“int1”)

Error in Maaslin2(frmeTaxa, frmeMetadata, … :
unused argument (reference = Calcium - 2)

Any idea what my issue might be? Is there a way to confirm that I have installed the version of maaslin2 with the reference option?

(The code works nicely without the reference option added.)

Thanks!

Hi @Lyoon6 - this needs to be provided as a string of variable,reference (semi-colon delimited for multiple variables) which in your case translates to reference = intervention,int1 .