This function fits a (G)LME. If the fit does not converge, it will try different optimisers, and if still not converging will remove the integration over random effects.

fit_mdl_robust(mdl_formula, mdl_data, mdl_family = "Gaussian")

Arguments

mdl_formula

Complete model formula

mdl_data

Data frame

mdl_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