R/stats_functions.R
fit_mdl.Rd
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")
Dependent variable (string)
Independent variables (vector of string)
Trial results data frame
Error family (default: Gaussian)
List with fitted fixed- and random-effects models, AIC difference (negative in favour of random-effects), converging optimiser, estimated marginal means