predictor_strength.Rd
Given a dependent variable, a set of fixed effect variables, and a random effect structure, this function creates an lmer
model
for each predictor variable, lacking that predictor variable.
Then, conditional and marginal coefficients of determination for each model are calculated. Comparing the value of the conditional coefficient
of determination across all models, one can conclude the predictor strength of the respective missing predictor.
The function uses MuMIn::r.squaredGLMM
to compute coefficients of determination.
predictor_strength(dependent, fixed, random_str, data)
The dependent variable for all models.
The independent variables, i.e. the fixed effects, for all models.
The random effect structure for all models.
The original data set.
A dataframe containing the conditional and marginal coefficients of determination for each model, and a column defining the variable the values belong to.
Bates, D., Maechler, M., Bolker, B., & Walker, S. (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software, 67(1), 1-48. doi:10.18637/jss.v067.i01.
Barton, K. (2020). MuMIn: Multi-Model Inference. R package version 1.43.17. https://CRAN.R-project.org/package=MuMIn
Nakagawa, S., Johnson, P.C.D., & Schielzeth, H. (2017) The coefficient of determination R? and intra-class correlation coefficient from generalized linear mixed-effects models revisited and expanded. J. R. Soc. Interface 14: 20170213.
data("data_s")
predictor_strength(dependent = "sDur",
fixed = c("pauseBin", "list", "folType", "baseDur"),
random_str = c("(1 | speaker) + (1 | item)"),
data = data_s)
#> boundary (singular) fit: see help('isSingular')
#> predictor R2m R2c
#> 1 baseDur 0.4614588 0.5733752
#> 2 folType 0.4971085 0.5808113
#> 3 list 0.3830629 0.6111709
#> 4 pauseBin 0.4211637 0.4743685