Mrinmayi Kulkarni, Ph.D.

(she/her)

Behavioural and Data Scientist

Consequences of Memory Control

Linear Mixed Effects Modelling

A linear mixed effects model (LMM) is a statistical technique that allows us to look at the effect of one or more factors on an outcome variable while taking into account natural groupings of the data points.

How did we apply an LMM to reaction time data?

In this study, participants completed several trials in the memory control phase. In each trial, they attempted to control the retrieval of a specific scene-face or scene-tool pair. Similarly, in the trials in final memory test, participants recalled every pair that had been previously suppressed or substituted. We were interested in whether the success of controlling the retrieval of a given pair made it harder to recognise that specific pair.

Since trials are grouped by participants, participant-level factors such as fatigue, general memory ability, and interest can impact both success of retrieval control and final memory performance on a trial-by-trial basis. Thus, we used an LMM to examine how success of retrieval control impacts later memory for controlled information, while controlling for these participant-level factors. Further, using an LMM allowed us to examine whether retrieval controll success interacts with condition (Retrieve, Suppress and Substitute), and object category (Face, Tool) in impacting memory performance.

For this purpose, the amount of time people spent looking at the retrieved object in the memory control phase was used as a proxy for the success of retrieval control, and the speed with which they made their memory response (reaction time; RT) in the final test phase as a measure of how well they remembered the pair.

Suppression Success

Thus, in the final model, the amount of viewing directed to the retrieved information, condition and object category as used as explanatory (or independent) variables, and entered as fixed effects in the model. To account for the fact that trials are grouped by participants, we add Participant as a random intercept. Finally, RT is used as the outcome variable. One caveat, however, is that LMMs assume that the outcome variable is normally distributed. But RT typically follows an exponential distribution, where most responses are made closer to the onset of the stimulus:

To model a non-normally distributed variable we can use a generalised linear mixed effects model (GLMMs) which allows us to specify the distribution of the outcome variable. Since RT follows an exponential distribution, we can use the log link function by specifying family = Gamma(link = log) in the glmer call.

See R code
library(tidyr)
library(lme4)

# finaltest_search_data contains accuracy and RT data from the final memory
# test phase. The dataframe contains one row per trial, per participant.
# and the following columns:
#   Participant: Participant identifier (sub-001, sub-002...; categorical)
#   Trial: Trial identifier (1, 2, 3...; continuous)
#   Condition: Trial condition (Retrieve, Suppress, Substitute; categorical)
#   ObjectCategory: Category of object in scene-object pair (Face, Tool; categorical)
#   Accuracy: Response accuracy for each trial (Correct, Incorrect; categorical)
#   RT: Reaction time for each trial (continuous)

# Setup factors
finaltest_search_data <- finaltest_search_data %>%
    mutate(Condition = factor(Condition,
                              levels = c("Retrieve", "Suppress", "Substitute")),
           ObjectCategory = factor(ObjectCategory,
                                   levels = c("Face", "Tool")))
# Condition is dummy-coded. Effect-code ObjectCategory
contrasts(finaltest_search_data$ObjectCategory) <- rbind(-1, 1)

viewing_rt_glmm <- glmer(
    formula = RT ~ Viewing * Condition * ObjectCategory + (1|Participant),
    data = finaltest_search_data,
    family = Gamma(link = log))

# View the results
summary(viewing_rt_glmm)

Using this method, we find that

How do we choose the best model?

How can we model binary outcome variables?

A GLMM can also be used to model a categorical outcome variable with two levels. For instance, in our experiment, memory performance can also be measured using this