Gets predicted values based on a new dataframe for lmer models
Source:R/predict-lmer.R
dh.predictLmer.Rd
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.
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 innew_data
must be identical to those inmodel
, and all variables included inmodel
must be present innew_data
.- coh_names
Please specify 'conns' instead. Vector of cohort names. These must be in the order that cohorts were specified in
model
.
See also
Other trajectory functions:
dh.lmeMultPoly()
,
dh.makeAgePolys()
,
dh.makeLmerForm()
,
dh.trimPredData()
,
dh.zByGroup()