# Hierarchical linear modeling of Brinley plot data

My question pertains to using hierarchical linear modeling / mixed modeling using lme4 in R on Brinley plot data. I have experience with R, but no experience with HLM, and limited experience with lme4. Hence, excuse my question if it's rather elementary.

I have some meta-analytic data from a series of independent studies comparing older adults' and younger adults' mean response times (RT) on behavioural experiments that have two conditions ("repetition" and "switch"). The full data is here, but below is a reduced example of the data frame I am working from (in R code) for reproducibility:

study <- c("s1", "s1", "s2", "s2", "s3", "s3")
rtYounger <- c(315, 325, 1193, 1320, 671, 1220)
rtOlder <- c(399, 439, 1560, 1685, 965, 2033)
condition <- c("repetition", "switch", "repetition", "switch", "repetition", "switch",)
data <- data.frame(study, rtYounger, rtOlder, condition)


So, my data frame looks like this (the full data have 29 studies):

study rtYounger rtOlder  condition
s1          315     399 repetition
s1          325     439     switch
s2         1193    1560 repetition
s2         1320    1685     switch
s3          671     965 repetition
s3         1220    2033     switch


The main analysis of response time differences in aging research uses so-called "Brinley Plots", which plots a regression plot, for each study and condition, predicting RT for older adults from RT for younger adults. The theoretical question of interest is whether the data are best described with one regression line (i.e., the same fit for "repetition" and "switch" conditions) or whether two are required (i.e., one regression line for "repetition" and a separate one for "switch").

Below is a plot of the data with two regression lines (one for each condition). Each data point represents the average response time for older adults plotted against the average response time for younger adults, for that condition, for that study.

# Modeling the data

This section describes (largely verbatim) Verhaeghen (2014, p.24) who describes how to model this data using hierarchical linear modeling, allowing the researcher to assess whether two regression lines or one is sufficient.

The within-study level model represents resonse times (RTs) of older adults as a function of the corresponding RT of younger adults, and is given by

$$RT_{Older, it} = \beta_{0t} + \beta_{1t} * RT_{Younger, it} + R_{it}$$

where $RT_{Older, it}$ is the average response time of older adults from condition $i$ in study $t$, $RT_{Younger, it}$ is the average response time of younger adults from condition $i$ in study $t$, $\beta_{0t}$ is the intercept for study $t$, $\beta_{1t}$ is the slope relating older to younger RTs for study $t$, and $R_{it}$ is the residual for condition $i$ in study $t$.

The between-study level model represents each regression parameter as a function of the overall mean and each study's unique effect as follows:

$$\beta_{0t} = \bar{\beta_{0}} U_{0t}$$

$$\beta_{1t} = \bar{\beta_{1}} U_{1t}$$

where $\bar{\beta_{0}}$ is the average intercept across all studies, $\bar{\beta_{1}}$ is the average slope of across all studies, $U_{0t}$ and $U_{1t}$ are the increments to intercept and slope associated with study $t$.

These equations reflect the "null model". Condition effects are examined in the within-study level model by introducing a dummy variable that codes for condition (condition = 0 if "repetition", condition = 1 if "switch"):

$$RT_{Older, it} = \beta_{0t} + \beta_{1t} * RT_{Younger, it} + \alpha_{0t}(condition) + \alpha_{1t}(condition * RT_{Younger, it}) + R_{it}$$

# Question

I assume this can easily be tested using lme4 in R, but I have no idea how I code the "null model", and how I would code the final equation. Then, the adequacy of the null model can be assessed by comparing that model with the final model, so I assume this can be done by likelihood tests or just by checking AIC/BIC?

• Your equations for $\beta_{0t}$ and $\beta_{1t}$ are missing $+$ signs, right? Surely the right-hand-sides are sums and not products? – Jake Westfall May 25 '16 at 22:47