Skip to main content
Applied Psychological Measurement logoLink to Applied Psychological Measurement
. 2025 Sep 2:01466216251374826. Online ahead of print. doi: 10.1177/01466216251374826

Automatic Generation of Rule-Based Raven-Like Matrices in R: The matRiks Package

Andrea Brancaccio 1, Ottavia M Epifania 2,3,, Pasquale Anselmi 4, Debora de Chiusole 4
PMCID: PMC12405199  PMID: 40909241

Description

Fluid intelligence (FI) denotes the capacity for novel problem-solving and abstract reasoning, relatively uninfluenced by culturally acquired knowledge or educational experience (Cattell, 1963). Raven’s Progressive Matrices (RPMs; Raven, 1938) are visually structured puzzles that assess individuals’ ability to identify patterns and relationships among abstract elements, and they are among the most widely used tools to measure FI. Each matrix is accompanied by set of response options from which the respondent must select the correct answer. To preserve the novelty of the task, RPMs should be administered only once or after a substantial delay.

Automatic generation tools for Raven-like matrices enable their use across various contexts without reusing the same items. These matrices can be generated using transformational rules that define the relationship between the elements. According to spatial rules, transformations involve the graphical and spatial features of the elements (e.g., orientation). According to logical rules, transformations involve the logical relationships between the elements (e.g., set intersection). Although some resources exist for the automatic generation of Raven-like matrices, they present different shortcomings, such as the small variety of implemented transformational rules or the need for advanced programming skills.

matRiks (Brancaccio et al., 2024) is an R package (R Core Team, 2024) for generating Raven-like matrices, which implements both spatial and logical rules. The package generates coherent sets of response options for each generated matrix, which include the correct answer and incorrect options based on the typical error response styles identified in the literature on RPMs. The final stimuli (i.e., the matrices and their response options) align with the literature on both transformational rules and error responses.

Stimuli from the matRiks package support FI test development in both general and clinical populations (e.g., de Chiusole et al., 2024).

Availability

The matRiks package, its associated manual, and the vignettes illustrating its functioning are available on the Comprehensive R Archive Network (CRAN) repository (https://cran.rproject.org/web/packages/matRiks/index.html). The development version of the package can be installed from GitHub (https://github.com/OttaviaE/matRiks).

Supplemental Material

Supplemental Material - Automatic Generation of Rule-Based Raven-like Matrices in R: The matRiks Package

Supplemental Material for Automatic Generation of Rule-Based Raven-like Matrices in R: The matRiks Package by Andrea Brancaccio, Ottavia M. Epifania, Pasquale Anselmi, and Debora de Chiusole in Applied Psychological Measurement

Funding: The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This package has been developed within the PRIN2020 Project (Prot. 20209WKCLL) titled “Computerized, Adaptive and Personalized Assessment of Executive Functions and Fluid Intelligence” and founded by the Italian Ministry of Education and Research.

The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Supplemental Material: Supplemental material for this article is available online

ORCID iDs

Andrea Brancaccio https://orcid.org/0000-0001-5919-6990

Ottavia M. Epifania https://orcid.org/0000-0001-8552-568X

Pasquale Anselmi https://orcid.org/0000-0003-2982-7178

References

  1. Brancaccio A., Epifania O. M., de Chiusole D. (2024). matRiks: Generates raven-like matrices according to rules. 10.32614/CRAN.package. https://CRAN.R-project.org/package=matRiks [DOI]
  2. Cattell R. B. (1963). Theory of fluid and crystallized intelligence: A critical experiment. Journal of Educational Psychology, 54(1), 1. [DOI] [PubMed] [Google Scholar]
  3. de Chiusole D., Spinoso M., Anselmi P., Bacherini A., Balboni G., Mazzoni N., Brancaccio A., Epifania O. M., Orsoni M., Giovagnoli S., Garofalo S., Benassi M., Robusto E., Stefanutti L., Pierluigi I. (2024). PsycAssist: A web-based artificial intelligence system designed for adaptive neuropsychological assessment and training. Brain Sciences, 14(2), 122. 10.3390/brainsci14020122 [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Raven J. (1938). Raven’s progressive matrices (2, p. 5). Western Psychological Services. [Google Scholar]
  5. R Core Team . (2024). R: A language and environment for statistical computing. R Foundation for Statistical Computing. Available at: https://www.R-project.org/ [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplemental Material - Automatic Generation of Rule-Based Raven-like Matrices in R: The matRiks Package

Supplemental Material for Automatic Generation of Rule-Based Raven-like Matrices in R: The matRiks Package by Andrea Brancaccio, Ottavia M. Epifania, Pasquale Anselmi, and Debora de Chiusole in Applied Psychological Measurement


Articles from Applied Psychological Measurement are provided here courtesy of SAGE Publications

RESOURCES