Exploratory analysis of machine learning models for state and trait anxiety based on Spielberger questionnaire data in nursing students

This study aimed to explore the ability of machine learning models to assess state and trait anxiety using data collected from the Spielberger State-Trait Anxiety Inventory (STAI). Considering the significant impact of mental health on the academic and professional performance of medical students, the research sought to determine whether machine learning could complement traditional assessment methods and provide insights into the relative influence of demographic and physiological factors on anxiety levels. A census sampling approach was applied, including all 106 eligible students from the Tabas Faculty of Nursing. Participants with a history of anxiety disorders or use of psychoactive medications were excluded. State and trait anxiety were measured using the STAI. Data analysis was performed using SPSS and MATLAB. Bivariate tests (Kruskal-Wallis and Chi-Square) examined associations between anxiety and demographic/physiological variables. Multiple linear regression was used as an exploratory modeling approach to predict anxiety, with model performance evaluated via 10-fold cross-validation, RMSE, and R². Standardized coefficients were calculated to estimate the relative importance of predictors. Participants had a mean age of 21.36 years, with 58.5% being female. Most demographic and physiological variables were not significantly associated with anxiety, except for marital status and the strong correlation between state and trait anxiety (p < .001). The regression model captured overall trends in anxiety scores but showed moderate predictive accuracy, particularly for extreme values (state anxiety: RMSE ≈ 8.89, R² ≈ 0.13; trait anxiety: RMSE ≈ 8.70, R² ≈ 0.11). Gender, academic major, and some physiological factors (e.g., SpO₂, body temperature) were the most influential predictors, while other variables had minimal contribution. These results reflect relative associations rather than precise individual-level predictions. This study confirms the strong relationship between state and trait anxiety and highlights the relative influence of social and demographic factors over physiological indicators in this population. Although predictive accuracy was moderate, machine learning models can reveal complex patterns that may be overlooked by traditional statistical methods, offering guidance for exploratory assessment and targeted interventions for anxiety among nursing students.

Authors

Institutions

Publication Details

Journal
BMC Medical Education
Published
2026-02-21
DOI
https://doi.org/10.1186/s12909-026-08842-3
Primary Topic
Nursing education and management
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Exploratory analysis of machine learning models for state and trait anxiety based on Spielberger questionnaire data in nursing students

Reza Salehinia, Marzieh Nasiri Sangari, Hossein Abbassian, Sajjad Salehian et al.
BMC Medical Education
Nursing education and management
article

Exploratory analysis of machine learning models for state and trait anxiety based on Spielberger questionnaire data in nursing students

Reza Salehinia, Marzieh Nasiri Sangari, Hossein Abbassian, Sajjad Salehian, Mohammad Amin Nasiri Sangari
article en

Abstract

This study aimed to explore the ability of machine learning models to assess state and trait anxiety using data collected from the Spielberger State-Trait Anxiety Inventory (STAI). Considering the significant impact of mental health on the academic and professional performance of medical students, the research sought to determine whether machine learning could complement traditional assessment methods and provide insights into the relative influence of demographic and physiological factors on anxiety levels. A census sampling approach was applied, including all 106 eligible students from the Tabas Faculty of Nursing. Participants with a history of anxiety disorders or use of psychoactive medications were excluded. State and trait anxiety were measured using the STAI. Data analysis was performed using SPSS and MATLAB. Bivariate tests (Kruskal-Wallis and Chi-Square) examined associations between anxiety and demographic/physiological variables. Multiple linear regression was used as an exploratory modeling approach to predict anxiety, with model performance evaluated via 10-fold cross-validation, RMSE, and R². Standardized coefficients were calculated to estimate the relative importance of predictors. Participants had a mean age of 21.36 years, with 58.5% being female. Most demographic and physiological variables were not significantly associated with anxiety, except for marital status and the strong correlation between state and trait anxiety (p < .001). The regression model captured overall trends in anxiety scores but showed moderate predictive accuracy, particularly for extreme values (state anxiety: RMSE ≈ 8.89, R² ≈ 0.13; trait anxiety: RMSE ≈ 8.70, R² ≈ 0.11). Gender, academic major, and some physiological factors (e.g., SpO₂, body temperature) were the most influential predictors, while other variables had minimal contribution. These results reflect relative associations rather than precise individual-level predictions. This study confirms the strong relationship between state and trait anxiety and highlights the relative influence of social and demographic factors over physiological indicators in this population. Although predictive accuracy was moderate, machine learning models can reveal complex patterns that may be overlooked by traditional statistical methods, offering guidance for exploratory assessment and targeted interventions for anxiety among nursing students.

BMC Medical EducationVol. 26(1)
Shiraz University (IR), Birjand University of Medical Sciences (IR)
Quality Education
Openalex Percentile: Top 47%
Nursing education and management
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.