Created
February 8, 2023 18:34
-
-
Save mcfrank/d398ab1d0414f012b4e133bae75da91f to your computer and use it in GitHub Desktop.
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
# starts at line 716 of paper.Rmd | |
d_lmer_scale <- d %>% | |
filter(trial_type != "train") %>% | |
mutate(log_lt = log(looking_time), | |
age_mo = scale(age_mo, scale = FALSE), | |
trial_num = trial_num - 8.5, | |
item = paste0(stimulus_num, trial_type)) %>% | |
filter(!is.na(log_lt), !is.infinite(log_lt)) | |
contrasts(d_lmer_scale$nae) <- c(-.5,.5) | |
d_lmer_scale$method <- factor(d_lmer_scale$method) | |
contrasts(d_lmer_scale$method) <- contr.sum(3) | |
mod_lmer <- lmer(log_lt ~ trial_type * method + | |
trial_type * trial_num + | |
age_mo * trial_num + | |
trial_type * age_mo * nae + | |
(1 | subid_unique) + | |
(1 | item) + | |
(1 | lab), | |
data = d_lmer_scale) | |
# fixed effect / residual standard deviation | |
fixef(mod_lmer)[2]/summary(mod_lmer)[[11]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment