I am trying to examine the effects of language (English/Mother Tongue) on functional connectivity between different regions of interest (ROI). Hence, I employed a nested Linear Mixed Effects Model approach to examine the fixed effect of language nested in each ROI. Wondering if this is a crossed-factored model or whether nested mixed effects would be even appropriate. Any clarification would help!

For reference, my model is specified as:

lmer(FCM ~ ROI_Pair / language + cov_1 + cov_2 + (1|subject), data = df)

The dataframe looks like this: enter image description here

  • $\begingroup$ I'm confused with part of your model. What's up with Pair / language? It may be helpful to also explain what each variable is supposed to be in this model. $\endgroup$ Feb 11, 2023 at 10:37
  • $\begingroup$ Hi! Language would be a categorical variable of 2 levels (English/Mother Tongue) and Pair or ROI_Pair would be a variable that specifies the ROI pair as "1", "2", "3"... etc. each pertaining to a different ROI Pairing. I updated my question as an example of what the dataframe should look like... Thanks for suggesting! Hope this helps in clarity $\endgroup$ Feb 11, 2023 at 11:11
  • $\begingroup$ Thanks for the edit. Let me know if my answer below is useful. $\endgroup$ Feb 11, 2023 at 11:24
  • $\begingroup$ Just a note from the domain expertise side of things - typically this sort of question is asked with a PPI analysis in the fMRI literature (fsl.fmrib.ox.ac.uk/fsl/fslwiki/PPI). Probably why you might be having a hard time finding a lot of literature on it. Depending on your task design (i.e., if languages alternated during the same task block), this could be quite critical. $\endgroup$
    – David B
    Feb 11, 2023 at 13:26
  • $\begingroup$ Hi David, thanks for the input! Yes I do have a very hard time finding literature on it. My task design would be an event-related fMRI design where we presented different types of words in English for one run and types of words in Mother Tongue for another run. So languages weren't alternated during the same task block per se. Would the proposed analysis be still valid in this case? $\endgroup$ Feb 11, 2023 at 16:32

1 Answer 1


Your Model

It looks like your model syntax is doing the following:

  • Use FCM as a DV with a normally distributed error
  • Model an interaction between ROI and language
  • Add two main effects from covariates
  • Estimate the random intercepts only for subjects (no random slopes are included here)

Nested Random Effects

This is neither nested nor crossed random effects. Nested effects typically have a hierarchy involved (students within schools or schools within districts). A typical hierarchical cluster has a random effect specification such as (1|g1/g2). Yours is just (1|g), which isn't inherently wrong, but simply doesn't model clusters within other clusters.

Crossed Random Effects

Crossed random effects expand the data frame by each random effect. If you have 20 subjects and 10 items, while modeling both as random intercepts, you would get 200 observations because each item is crossed with each subject. Here you only have one random effect, random intercepts, so it doesn't qualify.

Final Remarks

Whether or not this model is appropriate for you is based off your assumptions of the data. Keep in mind that this is essentially a repeated measures regression (you are estimating the repeated observations of each subject) and assumes that each subject has similar mean responses to the outcome. I'm not sure what each variable means here, but if you suspect any of them vary among subjects by a lot, you may consider including it as a random slope. Some examples are modeling something like (1+cov1|subject) for correlated slopes/intercepts or (1+cov1||subject) for uncorrelated slopes/intercepts. I'm also assuming FCM has a normal error (the residual distribution has a Gaussian shape). If not, consider also using the glmer function, which models different families of distributions.

Useful Citations

I've listed some useful articles if you are confused about random effects structures. The first is written by lme4's creator Douglas Bates and there is a page specifically showcasing model syntax. Another by Baayen et al., 2008 explains how crossed random effects work in a straightforward way. There are a few other "user-friendly" guides to using mixed models below as well.

  • Baayen, R. H., Davidson, D. J., & Bates, D. M. (2008). Mixed-effects modeling with crossed random effects for subjects and items. Journal of Memory and Language, 59, 390–412. https://doi.org/10.1016/j.jml.2007.12.005
  • Bates, D., Mächler, M., Bolker, B., & Walker, S. (2015). Fitting linear mixed-effects models using lme4. Journal of Statistical Software, 67(1). https://doi.org/10.18637/jss.v067.i01
  • Brown, V. A. (2021). An introduction to linear mixed-effects modeling in R. Advances in Methods and Practices in Psychological Science, 4(1), 1–19. https://doi.org/10.1177/2515245920960351
  • Harrison, X. A., Donaldson, L., Correa-Cano, M. E., Evans, J., Fisher, D. N., Goodwin, C. E. D., Robinson, B. S., Hodgson, D. J., & Inger, R. (2018). A brief introduction to mixed effects modelling and multi-model inference in ecology. PeerJ, 6, e4794. https://doi.org/10.7717/peerj.4794
  • Meteyard, L., & Davies, R. A. I. (2020). Best practice guidance for linear mixed-effects models in psychological science. Journal of Memory and Language, 112, 104092. https://doi.org/10.1016/j.jml.2020.104092
  • $\begingroup$ Thanks so much! I will consider the assumptions of my data and look into these articles. $\endgroup$ Feb 11, 2023 at 11:31
  • $\begingroup$ Glad the answer is helpful. Mixed models are a difficult topic. I also recommend this lecture series. The lecture notes are useful and there are some additional citations at the bottom if you need them: web.pdx.edu/~newsomj/mlrclass $\endgroup$ Feb 11, 2023 at 11:38
  • $\begingroup$ Hi Shawn, I have checked out the materials that you shared. They were very helpful! Could I also ask whether this part in the model "ROI_Pair/" accounts for the nesting part of the nested Linear Mixed Effects Model as well because your answer accounted for the random effects portion. $\endgroup$ Feb 13, 2023 at 6:43
  • $\begingroup$ No this just models an interaction. There is no nesting involved here. $\endgroup$ Feb 13, 2023 at 8:19
  • $\begingroup$ Thank you Shawn! $\endgroup$ Feb 13, 2023 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.