Main Model
In our main analysis, we considered participants’ likelihood of choosing the word for the nearest compass direction, dependent on whether that compass direction was a high- or a low-frequency word, while controlling for the distance from the nearest learned compass direction. We focused specifically on low-frequency/high-frequency trials, in which a compass direction was tested in between a low-frequency and a high-frequency trained direction.
As a conservative test, we retained only trials in which participants chose one of the two principal direction words within 45° of the stimulus direction (94.41% of all low-frequency/high-frequency trials).
#just trials with a left or right angle choice
#model
m <- glmer(matchChoice~hfTrial+angleDiffFromMatchC+(1+hfTrial+angleDiffFromMatchC|subjCode)+(1|targetLabel),data=subset(all_data, version=="exp1" & listChoice==1),family=binomial,glmerControl(optimizer="bobyqa"))
summary(m)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: matchChoice ~ hfTrial + angleDiffFromMatchC + (1 + hfTrial +
## angleDiffFromMatchC | subjCode) + (1 | targetLabel)
## Data: subset(all_data, version == "exp1" & listChoice == 1)
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 2453.4 2514.6 -1216.7 2433.4 3348
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -8.9254 0.0982 0.2040 0.4370 2.2482
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subjCode (Intercept) 0.240227 0.49013
## hfTrial 1.211711 1.10078 -0.26
## angleDiffFromMatchC 0.001383 0.03719 -0.98 0.06
## targetLabel (Intercept) 0.020018 0.14149
## Number of obs: 3358, groups: subjCode, 39; targetLabel, 18
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.34236 0.12216 19.174 < 2e-16 ***
## hfTrial 0.70564 0.20946 3.369 0.000755 ***
## angleDiffFromMatchC -0.22760 0.01347 -16.892 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) hfTril
## hfTrial -0.145
## anglDffFrMC -0.778 0.039
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
confint(m,method="Wald")[8:10,]
## 2.5 % 97.5 %
## (Intercept) 2.1029300 2.5817911
## hfTrial 0.2951182 1.1161689
## angleDiffFromMatchC -0.2540037 -0.2011891
#calculate shift in x-axis units (degrees of angle)
shift_x <- -summary(m)$coefficients[2,1]/summary(m)$coefficients[3,1]
#low 95% CI
shift_x_lower <- -confint(m,method="Wald")[8:10,][2,1]/summary(m)$coefficients[3,1]
#high 95% CI
shift_x_upper <- -confint(m,method="Wald")[8:10,][2,2]/summary(m)$coefficients[3,1]
## Main model has a singular fit warning - since this fit does not appear to impact fit, we retained the more complex random effects structure.
## However, we also fit a simplified model with the random slope for (the less theoretically important predictor) angleDiffFromMatchC removed, to ensure that the results are similar across different random effects structures and to alleviate concerns about a the boundary fit.
## This model yields very similar results (uncomment model below to view)
# m <- glmer(matchChoice~hfTrial+angleDiffFromMatchC+(1+hfTrial|subjCode)+(1|targetLabel),data=subset(all_data, version=="exp1" & listChoice==1),family=binomial,glmerControl(optimizer="bobyqa"))
# summary(m)
This effect corresponded to an estimated 3.1° shift (95% CI = [1.3°, 4.9°]) in participants’ decision boundary for high-frequency words as compared to low-frequency words.
Explanation: The shift in decision boundary is computed from the parameter estimates (beta coefficients) of the logistic mixed-effects model estimating the difference between frequency condition, controlling for distance from the nearest compass direction (the main analysis in the paper). To compute the shift in decision boundary, we answer the following question: what shift in angle distance (from the nearest compass direction) corresponds to moving from the low-frequency condition (coded as -0.5) to the high-frequency condition (coded as 0.5), based on the model predictions? Model predictions are based on the fixed effects of the model, which are determined by the following formula (predictions are in logit/ log-odds space in logistic regression):
\[logit = b_0+b_1*condition+b_2*distance\]
In particular, we are asking what adjustment c to distance allows the prediction for the low-frequency condition (condition=-0.5) to be equal to the prediction for the high frequency condition (condition=0.5). This means that the decision boundary shift c can be determined by solving the following equation: \[b_0+b_1*0.5+b_2*(distance+c) = b_0+b_1*(-0.5)+b_2*distance\] This equation can be simplified to: \[c = -\frac{b_1}{b_2}\]