Created
September 20, 2017 21:25
-
-
Save jrosen48/393fa04def3d88274a1773a33dcf2c44 to your computer and use it in GitHub Desktop.
extract predicted random effects from a lme4 model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(magrittr) | |
library(lme4) | |
lmer(challenge ~ (1|program_ID) + (1|participant_ID) + (1|beep_ID_new), data = df) %>% | |
ranef() %>% | |
extract2("participant_ID") %>% | |
rownames_to_column(var = "participant_ID") %>% | |
rename() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment