This function builds a model formula, evaluates FFX and RFX versions robustly, and estimates marginal means from the model with higher model evidence (FFX or RFX)

fit_mdl(DV, IV, df, family = "Gaussian")

Arguments

DV

Dependent variable (string)

IV

Independent variables (vector of string)

df

Trial results data frame

family

Error family (default: Gaussian)

Value

List with fitted fixed- and random-effects models, AIC difference (negative in favour of random-effects), converging optimiser, estimated marginal means