Skip to contents

This function enables you to fit multiple models with different combinations of polynomial terms and compares the fit.

Usage

dh.lmeMultPoly(
  df = NULL,
  formulae = NULL,
  poly_names = NULL,
  conns = NULL,
  checks = TRUE
)

Arguments

df

Character specifying a server-side data frame.

formulae

Character vector containing model formulae to fit.

poly_names

Character vector of names for the models specified in formulae

conns

DataSHIELD connections object.

checks

Logical; if TRUE checks are performed prior to running the function. Default is TRUE.

Value

List containing three elements:

  • models = List of objects returned by ds.lmerSLMA for each model fitted.

  • convergence = Tibble providing information on convergence problems or error for each model fitted.

  • fit = Tibble with columns containing negative loglikehood statistic for each cohort and rows for each model fitted. An additional column provides the sum of the loglikelihoods across cohorts.

See also