Generation of rule-based matrices with the matRiks package: a tutorial

Epifania, Ottavia M., Brancaccio, Andrea, Anselmi, Pasquale and de Chiusole, Debora (2026) Generation of rule-based matrices with the matRiks package: a tutorial. Frontiers in Psychology, 16. ISSN 1664-1078

[thumbnail of rba08-Brancaccio_etal_Generatio] Microsoft Word (rba08-Brancaccio_etal_Generatio) - Published Version
Available under License Creative Commons Attribution.

Download (597kB)

Abstract

Few resources are available for the automatic generation of Raven-like matrices. Some of them are no longer working, while others are hardly customizable without advanced programming skills. Although an R package exists for generating stimuli for psychological assessments, it currently only supports creating rotations of the same shape. The matRiks package has been developed to address the above-mentioned issues. This package generates matrices based on different types of transformation rules. Some rely on visuospatial features, such as shape, size, or orientation. Others are based on logical operations, such as set intersection or union. The package also introduces a key innovation, the automatic generation of distractors based on the common error patterns observed in Raven's tests. This allows for the construction of realistic and diagnostically meaningful response options for each matrix. Overall, the matRiks package provides a flexible and systematic framework for generating well-structured and cognitively interpretable matrix reasoning tasks, based on clearly defined transformation rules. It enables precise control over matrix complexity and supports scalable matrix creation for experimental and assessment purposes. Developed in the R environment, the matRiks package is fully open-source, facilitates the reproducibility of stimuli, and is designed to be easy to use for people with basic knowledge of the R language.

Item Type: Article
Additional Information: Data availability statement: The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.
Uncontrolled Keywords: fluid intelligence,open-source,r package,reproducibility,rule-based matrices
Faculty \ School: Faculty of Social Sciences > School of Psychology
Depositing User: LivePure Connector
Date Deposited: 28 Jan 2026 14:30
Last Modified: 28 Jan 2026 14:30
URI: https://ueaeprints.uea.ac.uk/id/eprint/101771
DOI: 10.3389/fpsyg.2025.1698995

Downloads

Downloads per month over past year

Actions (login required)

View Item View Item