Hi everyone,

I am looking to look at the interaction between time and treatment in my dataset. Here is a snippet of what my metadata looks like:

treatment only has two levels, bleached and unbleached.

From reading a previous response, to create an interaction variable, I need to do something like this:

data ← model.matrix(~treatment*time, data = df_input_data)

but then when I tack that onto my metadata

df_metadata_with_design_matrix ← cbind(df_input_metadata, data)

I get the following columns:

(Intercept) treatmentunbleached timefour timeone timeseven timesix timethree timetwo treatmentunbleached:timefour treatmentunbleached:timeone treatmentunbleached:timeseven treatmentunbleached:timesix treatmentunbleached:timethree treatmentunbleached:timetwo

which do I use as fixed effects? How can I interpret the results to only see main effects? (as in, I only care to see for each pathway I am looking at, if treatment, time, and/or treatment x time are significant)

Currently without interactions my code looks like this:

fit_data_ixn = Maaslin2(input_data = df_input_data,

input_metadata = df_input_metadata,

min_prevalence = 0,

normalization = “NONE”,

transform = "LOG”,

output = “output_interaction”,

fixed_effects = c(“treatment”, “time”),

reference = c("time,one”),

random_effects = c(“pond”))

Any help is greatly appreciated! Thanks.