Skip to contents

Currently there is no predict method for lmer models within DataSHIELD. This function replicates this, by calculating predicted values for fixed effects based on the model coefficients. Standard errors are returned for individual cohorts but yet for pooled models.

Usage

dh.predictLmer(model = NULL, new_data = NULL, coh_names = NULL)

Arguments

model

Model object returned by ds.lmerSLMA.

new_data

Tibble or data frame containing values for variables in model at which to predict values of the outcome. The column names in new_data must be identical to those in model, and all variables included in model must be present in new_data.

coh_names

Please specify 'conns' instead. Vector of cohort names. These must be in the order that cohorts were specified in model.

Value

Tibble of predicted outcome values based on values provided in new_data.

See also