- Segundo Marcos, Rafael Ibán
Este archivo contiene el código en R (script) necesario para reproducir el análisis metodológico del estudio sobre los predictores contextuales del rendimiento académico (matemáticas, lectura y ciencias) y el pensamiento creativo en la muestra española de PISA 2022. El pipeline analítico está diseñado específicamente para manejar arquitecturas de datos de evaluaciones internacionales a gran escala e incluye tres fases principales:
1. Imputación múltiple no paramétrica de valores perdidos mediante el algoritmo missForest.
2. Selección de características (cribado) mediante regresión LASSO con validación cruzada, iterada sobre 10 Valores Plausibles (Plausible Values) para garantizar la selección por estabilidad.
3. Clasificación de importancia de variables (Permutation Importance) mediante modelos de aprendizaje automático Random Forest, incorporando los pesos de muestreo oficiales de los estudiantes de la OCDE (W_FSTUWT) para asegurar la representatividad poblacional.
Requisitos técnicos:
• Lenguaje: R (versión 4.0 o superior)
• Librerías requeridas: missForest, glmnet, ranger, dplyr, doParallel.
Notas de uso: Por motivos de licencias y políticas de distribución, la base de datos original no se adjunta con este código. Para ejecutar el script, los investigadores deben descargar la base de datos pública de PISA 2022 desde el repositorio oficial de la OCDE (https://www.oecd.org/pisa/data/2022database/) y ajustar la ruta del archivo de entrada en el código.
Palabras clave: PISA 2022, Pensamiento Creativo, Machine Learning, Random Forest, LASSO, Valores Plausibles, Educación.
Replication Code: Predictors of Academic Performance and Creative Thinking in PISA 2022 Spain via LASSO and Random Forest Analyses.
This file contains the R code (script) required to replicate the methodological analysis of the study examining contextual predictors of academic performance (mathematics, reading, and science) and creative thinking in the Spanish PISA 2022 sample. The analytical pipeline is specifically tailored to handle complex data structures from international large-scale assessments and comprises three main stages:
1. Non-parametric multiple imputation of missing values using the missForest algorithm.
2. Feature selection (screening) via LASSO regression with cross-validation, iterated across 10 Plausible Values to ensure stability selection.
3. Variable importance ranking (Permutation Importance) using Random Forest machine learning models, incorporating the official OECD student sampling weights (W_FSTUWT) to ensure population representativeness.
Technical Requirements:
• Language: R (version 4.0 or higher)
• Required packages: missForest, glmnet, ranger, dplyr, doParallel.
Usage Notes: Due to licensing and distribution policies, the original dataset is not bundled with this code. To execute the script, researchers must download the public PISA 2022 database from the official OECD repository (https://www.oecd.org/pisa/data/2022database/) and specify the input file path in the script.
Keywords: PISA 2022, Creative Thinking, Machine Learning, Random Forest, LASSO, Plausible Values, Education.