dh.predictLmer: Gets predicted values based on a new dataframe for lmer...

View source: R/predict-lmer.R

dh.predictLmerR Documentation

Gets predicted values based on a new dataframe for lmer models

Description

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, newdata = 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

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

newdata

Retired argument name. Please use ‘new_data’ instead.

Value

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

See Also

Other trajectory functions: dh.lmeMultPoly(), dh.makeAgePolys(), dh.makeLmerForm(), dh.trimPredData(), dh.zByGroup()


lifecycle-project/ds-helper documentation built on Oct. 27, 2023, 2:08 p.m.