Answers are grounded in this paper and cite their sources.
Tutorial demonstrates using NLP and ML to classify ethnic-racial identity narratives, highlighting analytical workflows.
Studying how individuals construct a coherent identity has long been constrained by reliance on self-report surveys and labor-intensive qualitative coding, limiting the integration of identity processes with the nuanced content of lived experience. Advances in natural language processing (NLP) and machine learning (ML) now offer scalable, theoretically-informed tools for analyzing open-ended narratives. This tutorial provides a step-by-step framework for using NLP and a Random Forest classifier to predict individuals’ ethnic – racial identity (ERI) profile membership primarily from language in their written narratives. Using an ethnically and racially diverse sample, the tutorial demonstrates the full analytic workflow, including text cleaning, feature extraction, feature selection, preprocessing, hyperparameter tuning, model training, and model testing. Each step includes methodological guidance tailored to Random Forests, highlighting key decisions, trade-offs, and interpretive considerations relevant to identity research. Results show that linguistic patterns, complemented by select non-linguistic features, contain meaningful psychological information that enables reliable classification of empirically-derived profiles of ERI aligned with theory and previous research. All code and data are openly available to promote transparency and reproducibility. By integrating computational tools with identity theory, this tutorial equips researchers to analyze narrative data at scale and advance more nuanced, rigorous, and ecologically-grounded approaches to studying identity development.
No takes yet. Share an insight, caveat, or question.
Ta-Johnson et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: