TY - JOUR
T1 - Generation of rule-based matrices with the matRiks package: a tutorial
AU - Epifania, Ottavia M.
AU - Brancaccio, Andrea
AU - Anselmi, Pasquale
AU - de Chiusole, Debora
N1 - 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.
PY - 2026/1/28
Y1 - 2026/1/28
N2 - 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.
AB - 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.
KW - fluid intelligence
KW - open-source
KW - R package
KW - reproducibility
KW - rule-based matrices
UR - https://www.scopus.com/pages/publications/105030238284
U2 - 10.3389/fpsyg.2025.1698995
DO - 10.3389/fpsyg.2025.1698995
M3 - Article
SN - 1664-1078
VL - 16
JO - Frontiers in Psychology
JF - Frontiers in Psychology
M1 - 1698995
ER -