glme_model.Rd
Fit a generalized linear mixed effect model using lme4::glmer()
. This function is still in early development stage.
glme_model(
data,
model = NULL,
response_variable,
random_effect_factors = NULL,
non_random_effect_factors = NULL,
family,
two_way_interaction_factor = NULL,
three_way_interaction_factor = NULL,
id,
estimation_method = "REML",
opt_control = "bobyqa",
na.action = stats::na.omit,
quite = FALSE
)
data.frame
lme4
model syntax. Support more complicated model. Note that model_summary will only return fixed effect estimates. This is not tested.
DV (i.e., outcome variable / response variable). Length of 1. Support dplyr::select()
syntax.
random effect factors (level-1 variable for HLM people) Factors that need to estimate fixed effect and random effect (i.e., random slope / varying slope based on the id). Support dplyr::select()
syntax.
non-random effect factors (level-2 variable for HLM people). Factors only need to estimate fixed effect. Support dplyr::select()
syntax.
a GLM family. It will passed to the family argument in glmer. See ?glmer
for possible options.
two-way interaction factors. You need to pass 2+ factor. Support dplyr::select()
syntax.
three-way interaction factor. You need to pass exactly 3 factors. Specifying three-way interaction factors automatically included all two-way interactions, so please do not specify the two_way_interaction_factor argument. Support dplyr::select()
syntax.
the nesting variable (e.g. group, time). Length of 1. Support dplyr::select()
syntax.
character. ML
or REML
default to REML
.
character. default is bobyqa
. See ?lme4::glmerControl
for more options.
default is stats::na.omit
. Another common option is na.exclude
suppress printing output
An object of class glmerMod
representing the linear mixed-effects model fit.