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.
MethodsA 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.
FindingsParticipants 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.
ConclusionThis 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.