Method Error when using LinearMixedModel function

That’s a confusing error message.

But looking at your formula, there’s no grouping term (the right hand side of the pipe | operator, as shown in the docs here).

Something like this should work with a linear model (e.g., from GLM).

using GLM
linear_model_fit = fit(
    LinearModel,
    @formula(Yield ~ Substrate + Enzyme + Substrate & Enzyme), 
    df
)

If you do want to use the “random effects” of a mixed model, you can use the grouping terms to specify which variables are used for grouping these effects, and then see if that works with MixedModels.

1 Like