School Happiness in Context: Social, Behavioral, and School-Based Predictors Among Primary Students — An Explainable Machine Learning Approach | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article School Happiness in Context: Social, Behavioral, and School-Based Predictors Among Primary Students — An Explainable Machine Learning Approach Cuneyt Akar, Taha İlter Akar This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9358940/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract This study examines the factors predicting school happiness among primary school students in Türkiye using an explainable machine learning approach. Data were collected from a nationally representative sample of 4,134 primary school students. School happiness was modeled as a continuous outcome variable, and sociodemographic, familial, behavioral, and school-contextual factors were analyzed using supervised regression techniques. Linear models were compared with tree-based ensemble models to capture nonlinear relationships and complex interactions among predictors. Results indicated that tree-based ensemble models outperformed linear models in out-of-sample prediction. The Gradient Boosting Regressor achieved the highest predictive performance, explaining approximately 23% of the variance in school happiness. Model diagnostics and calibration analyses supported the generalizability of the findings. Explainability analyses revealed that peer bullying was the strongest negative predictor of school happiness, whereas reading frequency and teacher intervention emerged as protective factors. Excessive mobile device use was associated with lower predicted happiness levels, particularly at higher usage durations. Overall, the findings demonstrate that school happiness can be reliably predicted using explainable machine learning methods. While the results are predictive rather than causal, they highlight bullying prevention, teacher support, and balanced digital media use as critical leverage points for school-based interventions and educational policy. Educational Psychology School happiness Child well-being Peer bullying Digital media use Explainable machine learning Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Introduction Children’s happiness has become an increasingly central focus in educational and psychological research (Ben-Arieh & Frønes, 2011; Diener et al., 2017; The Children’s Society, 2024; UNICEF Innocenti, 2025). This growing interest reflects an expanding recognition that subjective well-being is not only associated with individual health and academic achievement but is also closely linked to the sustainability of social well-being more broadly (Diener et al., 2017). The primary school period is particularly critical in this respect, as it represents a developmental stage in which self-concept is formed, social relationships are established, and the core components of happiness begin to take shape (Holder & Coleman, 2009). International organizations have similarly emphasized happiness as a fundamental educational outcome. The OECD (2019) identifies students’ life satisfaction as a key indicator for evaluating educational systems, while UNESCO’s Happy Schools framework positions happiness as a central goal of education, highlighting social connectedness, safety, pedagogical support, and participation as essential dimensions of quality education (UNESCO, 2016, 2024). Within this framework, school happiness emerges as a construct that extends beyond individual development to encompass broader concerns related to social cohesion and sustainability. Empirical research across diverse contexts supports this perspective. Studies conducted with children aged 7–14 in Italy have shown that self-esteem, self-concept, and loneliness are among the primary determinants of happiness (Baiocco et al., 2019). In Finland, research involving 737 students demonstrated a strong association between school-based happiness and overall life satisfaction, with this relationship being reinforced by social relationships and leisure activities (Uusitalo-Malmivaara, 2012). At the European level, school satisfaction among 10-year-old children has been identified as a robust predictor of overall childhood happiness (Gómez-Baya et al., 2021). Similarly, experimental evidence from Canada indicates that social–emotional learning programs enhance cognitive and emotional development and, in turn, support school happiness (Schonert-Reichl et al., 2015). School happiness can be conceptualized as a multidimensional form of subjective well-being that encompasses positive affect, life satisfaction, and context-specific domains such as school belonging and perceived social support (Huebner, 1991; Huebner et al., 2006). Within this framework, well-being is shaped not only by internal emotional states but also by children’s relational and environmental experiences. Prior research suggests that girls tend to report higher levels of happiness than boys (Çankaya & Meydan, 2018), that maternal education contributes positively to children’s social–emotional adjustment (Göcen, 2015), and that low socioeconomic status may increase children’s vulnerability to diminished well-being (Dilmaç & Özkan, 2019). In addition to demographic and socioeconomic factors, daily behavioral patterns play a meaningful role in shaping children’s happiness. Reading habits have been positively associated with well-being, whereas excessive screen time has been linked to loneliness and psychological difficulties (Burhan & Moradzadeh, 2020; Twenge & Campbell, 2018). Among the factors negatively associated with school happiness, peer bullying stands out as one of the most influential. A national study conducted in Thailand reported that nearly half of students experienced bullying, with a substantial proportion of these students reporting low levels of happiness (Aunampai et al., 2022). Similar findings have been documented in Türkiye, where bullying has been shown to be a strong predictor of reduced school happiness (Akar & Ay, 2025). Bullying is typically characterized by intentionality, repetition, and power imbalance, and may take physical, verbal, or relational forms (Olweus, 1993; Bradshaw et al., 2015). With increasing digitalization, cyberbullying has further intensified the risks to children’s well-being, adding complexity to the social environments in which children develop (Hinduja & Patchin, 2014; Kowalski et al., 2014; Gini et al., 2007; Juvonen & Gross, 2008). Consequently, bullying is best understood as an ecological phenomenon shaped by interactions among individual, familial, and school-level factors (Arseneault et al., 2010; Espelage, 2014; Hong et al., 2016). This complex network of relationships often involves nonlinear patterns and multivariate interactions that may not be adequately captured by traditional statistical approaches. In this context, machine learning offers a methodological advantage by enabling the modeling of complex interactions, ranking predictor importance, and improving predictive accuracy without restrictive linearity assumptions (Goldstein et al., 2017; Hilbert, 2021; Weller et al., 2021). Despite these advantages, nationally representative studies at the primary school level in Türkiye that simultaneously examine school happiness alongside both traditional and digital forms of bullying using machine learning approaches remain scarce. Moreover, official well-being statistics, such as those reported by the Turkish Statistical Institute (TÜİK, 2024), largely focus on adult populations and provide limited insight into children’s subjective well-being. Addressing this gap, the present study analyzes data from 4,134 primary school students sampled from Türkiye’s seven geographical regions to examine the factors predicting school happiness using machine learning techniques. Predictor variables were categorized into four domains: (a) Sociodemographic factors (gender, age, grade level, nationality, number of siblings, birth order, household size, and place of residence); (b) Family factors (parental education, employment status, cohabitation status, household income, and reporting bullying to family members); (c) Behavioral factors (reading frequency, television viewing time, and mobile device/tablet use); and (d) School-contextual factors (teacher intervention and a composite bullying score encompassing physical, verbal, relational, and cyber components). Accordingly, the primary aim of this study is to identify the relative importance of sociodemographic, familial, behavioral, and school-contextual predictors of school happiness among primary school students in Türkiye using machine learning algorithms. By adopting a predictive—rather than causal—framework, the study seeks to provide a data-driven basis for prioritizing key psychosocial and behavioral factors relevant to school-based interventions and educational policy. Research Questions Guided by machine learning analyses, the study addresses the following research question: Which sociodemographic, family-related, behavioral, and school-contextual variables demonstrate the strongest predictive power for school happiness among primary school students in Türkiye? Methods Research Design This study employed a descriptive, correlational research design to examine the factors predicting school happiness among primary school students. Given the multidimensional nature of school happiness and the need to assess the relative importance of demographic, familial, behavioral, and school-contextual predictors, machine learning approaches were adopted to accommodate complex, multivariate data structures. Traditional regression techniques are often constrained by linearity assumptions and limited capacity to model higher-order interactions (Goldstein et al., 2017; Hilbert, 2021). To address these limitations, the present study utilized supervised learning algorithms, which offer methodological advantages in handling heterogeneous predictors, modeling nonlinear relationships, and producing robust predictive performance (Weller et al., 2021). Accordingly, machine learning was used not as a replacement for theory-driven inquiry, but as a complementary analytical framework for identifying salient predictors within a high-dimensional feature space. Participants The study sample consisted of 4,134 primary school students selected from Türkiye’s seven geographical regions. A stratified probability sampling strategy was employed, with each geographical region treated as a distinct stratum to ensure regional representativeness. Participants ranged in age from 7 to 11 years. Türkiye is characterized by substantial regional diversity in terms of population density, socioeconomic conditions, and educational infrastructure. Ensuring national representativeness while maintaining feasibility in large-scale data collection poses both logistical and methodological challenges. To address these challenges, the sampling process prioritized not only numerical adequacy but also qualitative representativeness across regions. Within each geographical region, primary schools located in provinces and districts identified as having moderate socioeconomic profiles were selected in collaboration with local educational authorities. This selection process considered field accessibility, institutional cooperation, and the sustainability of the data collection process. To enhance statistical reliability and support subgroup-level comparisons, a minimum of 300 student responses was collected from each region. The determination of sample size was informed by methodological literature emphasizing the importance of adequate subgroup sizes in multivariate and predictive analyses (Memon et al., 2020; Althubaiti, 2022; Bujang et al., 2021). In addition, recent critiques of rigid sample size heuristics highlight the necessity of contextualized decision-making rather than reliance on universal “rules of thumb” (Aguinis & Harden, 2024). Guided by these considerations, the final sample structure was designed to balance representativeness, analytical power, and practical feasibility. Measures School Bullying Scale Students’ experiences of bullying were assessed using the School Violence/Bullying Scale originally developed by Çınkır and Karaman-Kepenekçi (2003), adapted for primary school students by Sarıgöl and Akar (2025) with the inclusion of a digital bullying dimension. The scale consists of 16 items across four subdimensions: physical bullying (4 items), verbal bullying (5 items), relational/emotional bullying (3 items), and digital bullying (4 items). Items are rated on a 5-point Likert-type scale ranging from 1 ( Never ) to 5 ( Every day ), with higher scores indicating more frequent exposure to bullying. Sample items include: physical bullying (“Have you ever been hit or kicked at school?”), verbal bullying (“Have you been insulted or verbally harassed at school?”), relational bullying (“Have you ever been excluded from games or groups at school?”), and digital bullying (“Have hurtful things been said to you in WhatsApp groups or on social media platforms?”). Confirmatory factor analysis (CFA) supported the structural validity of the scale (CMIN/DF = 1.87; RMSEA = .08; GFI = .85; AGFI = .80; CFI = .90; IFI = .91; RMR = .08), with all indices indicating acceptable model fit. Internal consistency was high, with a Cronbach’s alpha coefficient of .89, demonstrating strong reliability for use with primary school populations. School Happiness Scale School-based happiness was measured using the School Happiness Scale developed by Gündoğan and Akar (2019). The original version of the scale comprises nine items across two dimensions—happiness and unhappiness—and employs a 3-point Likert-type response format. Both exploratory and confirmatory factor analyses supported the construct validity of the scale (CFI = 0.989; RMSEA = 0.026), and internal consistency reliability was reported as α = .76. To enhance sensitivity for younger age groups, the scale was subsequently adapted by Akar and Ay (2025) to a 4-point Likert-type format ranging from 1 ( Never ) to 4 ( Always ). The present study employed this adapted version. In the current sample, the scale explained 66.86% of the total variance, and internal consistency reliability was satisfactory (Cronbach’s α = .81). Negatively worded items were reverse-coded prior to analysis. Total scores range from 9 to 36, with higher scores indicating higher levels of school happiness. Example items include “I look forward to going to school,” “School is a happy place,” and the reverse-coded item “I want school to end as soon as possible.” Personal Information Form A Personal Information Form developed by the researchers was used to collect data on participants’ individual, familial, behavioral, and school-contextual characteristics. The form was designed to systematically capture independent variables relevant to students’ school happiness and to facilitate structured categorization within the predictive modeling framework. The form included the following variable domains: Demographic variables: gender, age, grade level, nationality, number of siblings, birth order, household size, and type of residence (urban/rural). Family-related variables: maternal and paternal education levels, parental employment status, parental cohabitation status, household income level, and whether bullying experiences were reported to family members. Behavioral variables: reading frequency, daily television viewing time, and daily mobile device/tablet use. Teacher-related factor: perceived level of teacher intervention in response to bullying. Data Analysis Data from a nationally representative sample of 4,134 primary school students were used to model school happiness as a continuous outcome variable. The primary aim was to identify the relative importance of sociodemographic, familial, behavioral, and school-contextual predictors. Supervised machine learning approaches were employed to capture nonlinear relationships and complex interactions beyond the assumptions of linear models. Prior to analysis, the dataset underwent quality screening to identify insufficient effort responses and non-recoverable data entry errors (Meade & Craig, 2012; Van den Broeck et al., 2005). After cleaning, all 4,134 observations were retained. Missing data were negligible; therefore, complete-case analyses were conducted. School happiness was computed as the total score of a nine-item self-report scale with adequate internal consistency (Cronbach’s α = .80). Score distributions were approximately normal and free of floor or ceiling effects; thus, raw scores were used. To prevent data leakage, outcome-defining items and high-cardinality identifiers were excluded from the feature set. Three model families were compared: linear models (Linear Regression, Ridge, Lasso, Elastic Net), tree-based ensemble models (Random Forest, Gradient Boosting, HistGradientBoosting), and instance-based methods (k-Nearest Neighbors, Support Vector Regression). All models were implemented within a leakage-safe pipeline, with preprocessing steps learned exclusively from training data (Pedregosa et al., 2011). Model performance was evaluated using 10-fold cross-validation. Predictive accuracy was assessed using R², with MAE and RMSE reported as complementary metrics. Tree-based ensemble models consistently outperformed linear models, with the Gradient Boosting Regressor achieving the highest performance and explaining approximately 23% of the variance in school happiness. This model was therefore selected for interpretation. Results Predictive Performance Across Models and Validation Strategies Model comparison Under the primary reporting standard of 10-fold cross-validation, the Gradient Boosting Regressor (GBR) demonstrated the strongest out-of-sample predictive performance. The GBR achieved the highest explained variance (R² = 0.234) while producing the lowest error estimates (MAE = 3.70; RMSE = 4.72). As illustrated in Figure 2 and detailed in Table 1, these results indicate a clear performance advantage of tree-based ensemble models over linear baseline models. The Random Forest model yielded performance estimates closely comparable to those of the GBR (R² = 0.232; MAE = 3.69); however, the GBR exhibited a small yet consistent advantage in overall predictive stability. In contrast, the predictive capacity of linear models was notably limited. Both Linear Regression and RidgeCV models reached a performance plateau at approximately R² ≈ 0.199, whereas the Lasso model—characterized by stronger regularization—exhibited substantially weaker performance (R² = 0.061). Relative to the Dummy Baseline model, which generates mean-based predictions, the predictive gains achieved by the GBR were both substantial and statistically meaningful. This superiority was confirmed by non-overlapping confidence intervals across all performance metrics (see Supplementary Table S3). Model calibration Calibration analyses indicated that tree-based ensemble models exhibited acceptable levels of calibration. The calibration slope for the GBR was estimated at 1.13, while the Random Forest model demonstrated an almost proportional calibration slope (0.98; see Supplementary Table S6b). These findings suggest that both models effectively captured variability in students’ school happiness scores without exhibiting substantial overfitting. Decile-based calibration analyses further supported these conclusions, revealing a high degree of correspondence between observed and predicted mean happiness scores for both ensemble models (see Supplementary Tables S7a–S7b). Comparison of validation regimes Adjusted repeated-measures t-tests with Benjamini–Hochberg false discovery rate (BH–FDR) correction (α = 0.05) revealed no statistically significant differences in model performance across alternative validation regimes (all adjusted p-values ≥ 0.326; see Supplementary Table S4). This result provides statistical justification for retaining 10-fold K-Fold cross-validation as the primary reporting standard. Complementary linear model findings Complementary ordinary least squares (OLS) estimates presented in the supplementary materials (see Supplementary Table S13) were consistent with the patterns observed in the ensemble-based analyses. Specifically, exposure to peer bullying and mobile phone use emerged as negative predictors of school happiness, whereas teacher intervention and reading frequency were identified as positive predictors. Table 1 Cross-Validated Model Performance (10-Fold K-Fold with Unified Leakage-Safe Preprocessing) model R2_CV MAE_CV RMSE_CV R2_train MAE_train RMSE_train TrainingTime GradientBoostingRegressor 0.233983 3.70049 4.719097 0.3322 3.473809 4.414135 0.253869 RandomForest 0.2318 3.69399 4.72572 0.8962 1.350795 1.740051 0.799382 HistGB 0.2208 3.71925 4.758605 0.5548 2.831234 3.604194 0.272422 LinearRegression 0.1992 3.79193 4.823769 0.2099 3.771785 4.801402 0.006133 RidgeCV 0.1990 3.7948 4.824514 0.2098 3.773315 4.801602 0.008756 SVR 0.1989 3.76416 4.825898 0.2868 3.4468 4.561751 0.291988 ElasticNet 0.1207 4.03014 5.056126 0.124 4.025483 5.054082 0.005693 KNeighborsRegressor 0.0749 4.05577 5.185018 0.3927 3.277455 4.209372 0.007822 Lasso 0.0610 4.17668 5.224954 0.0639 4.174622 5.226094 0.006302 Explainability Analysis To enhance the interpretability of model predictions, the Gradient Boosting Regressor was selected as the primary explanatory model, while the Random Forest model was examined as a complementary reference. Feature importance profiles derived from both models showed substantial overlap, indicating a stable and consistent hierarchy of predictors. Across both models, peer bullying emerged as the strongest and most consistently negative predictor of school happiness. This was followed by gender, monthly reading frequency, and daily mobile device use. Higher reading frequency and stronger teacher intervention were associated with higher predicted levels of school happiness, whereas prolonged mobile device use was associated with lower happiness scores. The regional variable exhibited a context-sensitive, moderate effect on school happiness predictions. Parental education displayed a non-linear pattern, with students whose parents had moderate levels of education reporting relatively higher happiness, while the contribution of very high parental education levels appeared more limited. In contrast, household income, household size, and sibling order demonstrated weak and unstable contributions across models. Overall, the explainability analyses indicate that behavioral and psychosocial factors play a more prominent role in predicting school happiness than relatively stable sociodemographic characteristics. In particular, negative social experiences and daily interaction patterns emerged as dominant contributors to students’ predicted levels of school happiness. Combined (Consensus) Feature Importance Index To integrate the relative importance assigned to predictors across different models, feature importance estimates derived from the Gradient Boosting Regressor and the Random Forest models were normalized and combined to construct a model-agnostic consensus ranking. This combined index revealed a high degree of stability in the hierarchy of predictors across ensemble-based modeling approaches. The resulting ranking exhibited a three-tier structure. Peer bullying emerged as the strongest negative determinant of school happiness, occupying the top tier of the consensus index. The second tier included monthly reading frequency, geographical region, daily mobile device use, gender, and teacher intervention, all of which demonstrated comparatively strong contributions to school happiness predictions. The third tier comprised parental education, age, and reporting bullying to family members, which showed moderate yet consistent effects across models. In contrast, socioeconomic background indicators such as household income, household size, and parental occupation displayed limited contributions to school happiness predictions. Detailed importance values and stability analyses for all predictors are provided in the supplementary materials. Interpretation of Model Findings The modest differences observed between the Gradient Boosting Regressor and Random Forest models reflect their underlying algorithmic structures. Gradient Boosting is more sensitive to subtle nonlinear patterns, whereas Random Forest emphasizes broader behavioral variance. Combining feature importance estimates from both models into a consensus index balances these differences and yields a stable, interpretable hierarchy of predictors. Substantively, peer bullying and digital screen use emerged as the strongest negative predictors of school happiness, while teacher support and reading habits functioned as protective factors associated with higher predicted happiness. Parental education and family communication contributed at a secondary level, whereas the explanatory power of relatively static sociodemographic characteristics remained limited. This overall pattern suggests that school happiness is shaped primarily by behavioral and psychosocial experiences rather than fixed background attributes. To mitigate limitations associated with impurity-based feature importance measures, model interpretations were further examined using SHAP (SHapley Additive exPlanations). SHAP analyses provided model-agnostic validation by quantifying both the direction and magnitude of each predictor’s contribution to model predictions. Model-Agnostic Explainability via SHAP SHAP summary and importance plots closely aligned with impurity-based rankings, indicating a highly consistent explanatory structure. Peer bullying emerged as the most influential negative contributor, with higher levels associated with marked decreases in predicted happiness. Male gender was associated with systematically lower predicted happiness levels. Reading frequency showed a positive association, whereas higher levels of daily mobile device use were linked to reduced happiness. Regional effects were moderate and context-sensitive, while teacher intervention consistently contributed positively, functioning as a stabilizing factor across the distribution. Overall, SHAP-based findings confirm that behavioral and psychosocial indicators dominate the prediction of school happiness, while static sociodemographic variables play a more modest role. The convergence of results across multiple explainability approaches strengthens the robustness and interpretability of the identified predictive patterns. Each point represents an individual observation’s contribution to the model prediction, with color indicating the corresponding feature value (red = higher, blue = lower). The position along the x-axis reflects the SHAP value, capturing both the direction and magnitude of each feature’s effect on predicted school happiness. Features are ordered by mean absolute SHAP values, with higher-ranked variables exerting stronger global influence. Positive SHAP values indicate higher predicted happiness, whereas negative values indicate lower predicted happiness. Peer bullying emerged as the most influential negative contributor, followed by gender, monthly reading frequency, daily mobile device use, and teacher intervention. This pattern closely mirrors impurity-based feature importance rankings, providing convergent evidence for the robustness of the identified predictor hierarchy. The bars display the mean absolute SHAP values across the full sample, summarizing each predictor’s overall contribution to the model output regardless of effect direction. Larger bars indicate stronger global influence on predicted school happiness. Consistent with the beeswarm visualization, peer bullying emerged as the most influential predictor, followed by gender, monthly reading frequency, daily mobile device use, and teacher intervention. The close alignment between this ranking and impurity-based feature importance measures confirms the stability of the findings across explainability approaches. To further examine functional form and directionality, SHAP dependence plots were generated for the most influential predictors (Figures 7 and 8), revealing distinct behavioral and developmental patterns associated with systematic changes in predicted school happiness. Interpretation of SHAP Dependence Plots (a) Peer Bullying Score exhibited a pronounced threshold effect. For students with bullying scores above approximately 50, SHAP values consistently dropped below −2, indicating sharp declines in predicted school happiness. This pattern confirms peer bullying as a dominant behavioral risk factor with a strong nonlinear impact on school happiness predictions. (b) Gender displayed a clear categorical separation. Male students clustered around SHAP values of approximately −1.0, whereas female students were concentrated around positive SHAP values (approximately +0.6). This pattern indicates systematically lower predicted levels of school happiness among male students. (c) Monthly reading frequency demonstrated an almost linear positive gradient. Students who reported reading one book per month showed SHAP values around −1.2, while those reading four or more books per month exhibited SHAP values approaching +1.0. This pattern suggests cumulative benefits of reading frequency for school happiness predictions. (d) Daily mobile device use revealed a nonlinear and negative pattern. Moderate use (1–2 hours per day) was associated with largely neutral SHAP values, whereas usage exceeding three hours per day shifted SHAP values below −1.5. This finding indicates that prolonged screen exposure functions as a behavioral risk factor for reduced school happiness. (e) Geographical region exhibited moderate dispersion with context-sensitive effects. Students from western and southern regions tended to show relatively positive SHAP values (Δ ≈ +0.3 to +0.6), whereas those from eastern regions clustered more frequently in the negative range (Δ ≈ −0.4). This pattern suggests regional contextual differences in predicted school happiness. (f) Teacher intervention emerged as a balancing and protective factor. Students reporting frequent teacher intervention showed SHAP values above +0.8, while those indicating “never” or “rarely” clustered below zero. This pattern suggests that effective teacher involvement may mitigate the negative effects of adverse school experiences. Additional SHAP dependence plots for secondary predictors—including parental education, reporting bullying to family members, daily television viewing time, household income, and household size—are presented in Supplementary Figure 8 and Supplementary Figure S6. Although these variables exhibited relatively smaller absolute SHAP magnitudes (generally mean |SHAP| < 0.3), their directional effects remained consistent and supported the behavioral–psychosocial hierarchy identified in the primary analyses. This figure presents SHAP dependence relationships for five secondary predictors that exhibit moderate yet directionally consistent contributions to the prediction of school happiness: (a) age, (b) daily television viewing time, (c) paternal education level, (d) maternal education level, and (e) reporting experiences to family members. Each subplot reflects the marginal effect of the corresponding predictor on the model output (SHAP value) while holding other predictors constant. Yellow points represent individual observations, boxplots summarize the distributions, and red lines indicate median values. (a) Age displayed a mild but monotonic decreasing trend. Younger students (ages 6–7) exhibited positive SHAP values (median ≈ +0.3–0.4), indicating higher predicted happiness, whereas older students (age 10) clustered around near-zero or negative SHAP values (median ≈ −0.2). This pattern suggests a developmental decline in predicted well-being during middle childhood. (b) Daily television viewing time demonstrated a nonlinear negative pattern. Moderate viewing durations (1–2 hours per day) were associated with neutral or slightly positive SHAP values, whereas viewing times exceeding three hours per day shifted SHAP values markedly into the negative range (median ≈ −0.5 to −0.7). This finding is consistent with cumulative effects of prolonged screen exposure. (c) Paternal education level exhibited an inverted U-shaped pattern. Both low education levels (illiterate) and the highest level (university degree) were associated with negative SHAP values, while middle school and high school levels showed neutral or slightly positive contributions. This pattern indicates a nonlinear moderating role of paternal education. (d) Maternal education level showed a similar but attenuated pattern. University-level maternal education was associated with lower SHAP values (median ≈ −0.7), whereas primary and lower secondary education levels corresponded to slight positive SHAP shifts. This pattern may reflect differential parental expectations and interaction dynamics. (e) Reporting experiences to family members revealed a clear categorical separation. Students who reported sharing their problems or experiences with family members clustered around SHAP ≈ 0 (baseline), whereas those who did not report such experiences showed SHAP values concentrated below −1.0. This pattern indicates that the absence of family communication is associated with a substantial decrease in predicted school happiness. Overall, the absolute SHAP magnitudes of these secondary predictors (mean |SHAP| ≈ 0.30–0.36) were smaller than those of the dominant behavioral predictors (peer bullying, mobile device use, reading frequency, and teacher intervention). Nevertheless, the consistency of effect directions suggests that psychosocial and communicative factors contribute meaningfully—albeit at a moderate level—to subjective school happiness and reinforce the hierarchical explanatory structure of the model. Discussion Children’s happiness has increasingly become a central focus of research and policy agendas in education and psychology (The Children’s Society, 2024; UNICEF Innocenti, 2025). This emphasis reflects a growing consensus that subjective well-being is closely linked not only to individual health and academic achievement but also to the sustainability of societal well-being (Diener et al., 2017). Primary school years constitute a critical developmental period in which self-concept, social relationships, and the cognitive–affective foundations of happiness are formed (Holder & Coleman, 2009). The findings of the present study support this framework by showing that school happiness among primary school students is largely shaped by peer relationships, perceived safety, and everyday behavioral patterns. International organizations increasingly conceptualize school happiness as a core educational outcome and a measurable policy domain. The OECD positions students’ life satisfaction as a key indicator of educational quality (OECD, 2019), while UNESCO’s Happy Schools framework highlights social connectedness, safety, pedagogical support, and participation as foundational dimensions of quality education (UNESCO, 2016, 2024). In this context, the prominence of peer bullying and teacher intervention in the present findings closely aligns with the core pillars of the “happy school” approach. Peer Bullying and Safety: A Central Vulnerability in School Happiness The most salient finding of this study is the strong negative association between peer bullying and school happiness. School happiness is widely conceptualized as a multidimensional form of subjective well-being that encompasses positive affect, life satisfaction, and context-specific domains such as school belonging and perceived social support (Huebner, 1991; Huebner et al., 2006; Veenhoven, 2019). Within this framework, bullying directly undermines core components of well-being by eroding students’ sense of safety and belonging within the school environment. Characterized by intentionality, repetition, and power imbalance (Olweus, 1993; Bradshaw et al., 2015), bullying compromises students’ sense of security, trust in peers, and capacity to form positive social relationships. The identification of bullying as the primary risk factor is consistent with international and national evidence (Aunampai et al., 2022; Akar & Ay, 2025). The expansion of cyberbullying in digitalized contexts further intensifies risks to children’s well-being (Hinduja & Patchin, 2014; Kowalski et al., 2014; Juvonen & Gross, 2008). Accordingly, bullying should be understood as an ecological phenomenon shaped by interactions among individual, familial, and school-level factors (Arseneault et al., 2010; Espelage, 2014; Hong et al., 2016). From a school happiness perspective, bullying prevention represents a central leverage point for policy and practice. Digital Device Use and Daily Life Patterns The negative association between mobile device use and school happiness aligns with research linking excessive screen exposure to emotional and psychosocial difficulties, particularly during sensitive developmental periods (Twenge & Campbell, 2018; Burhan & Moradzadeh, 2020). Rather than a purely technological variable, digital device use appears to function as a broader indicator of daily life regulation intersecting with sleep, physical activity, and face-to-face social interaction. Moreover, prolonged digital use may indirectly increase exposure to online risks, including cyberbullying (Hinduja & Patchin, 2014; Kowalski et al., 2014), underscoring the need for balanced and developmentally sensitive guidance frameworks. Reading Habits and Protective Cultural Practices Reading frequency emerged as a protective factor for school happiness, highlighting the role of everyday cultural practices in supporting well-being. Beyond academic achievement, reading is associated with attention regulation, self-control, intrinsic motivation, and emotional functioning. Empirical evidence linking reading to higher happiness levels supports this interpretation (Burhan & Moradzadeh, 2020), suggesting that interventions should complement risk reduction with the promotion of protective daily practices. Teacher Intervention and the “Happy School” Climate Teacher intervention was identified as a robust protective factor, consistent with school climate research and UNESCO’s emphasis on pedagogical support and positive learning environments (UNESCO, 2016, 2024). Teachers’ responses to bullying and classroom social dynamics foster students’ perceptions of fairness, acceptance, and belonging. Experimental evidence indicates that social–emotional learning programs enhance both cognitive development and school happiness (Schonert-Reichl et al., 2015), highlighting teacher capacity building as a key implementation domain. Demographic and Socioeconomic Context Consistent with prior research, girls reported higher predicted happiness levels than boys (Çankaya & Meydan, 2018), while increasing age was associated with modest declines in school happiness (Goldbeck et al., 2007). Although family socioeconomic resources may indirectly shape well-being (Bradley & Corwyn, 2002; Eccles & Roeser, 2011; Evans & Cassells, 2014), the present findings suggest that psychosocial and behavioral factors play a more dominant role than relatively static background characteristics. This pattern underscores the importance of equity-oriented school policies that target relational and environmental conditions. Methodological Contribution School happiness reflects a multidimensional system shaped by interrelated individual, familial, and institutional contexts (Ben-Arieh & Frønes, 2011; UNICEF, 2021). In such contexts, machine learning—particularly tree-based ensemble models—offers clear advantages in capturing nonlinear relationships and ranking predictor importance (Goldstein et al., 2017; Hilbert, 2021; Weller et al., 2021). The scarcity of nationally representative, primary school–level studies in Türkiye integrating traditional and digital bullying within an explainable machine learning framework further strengthens the contribution of this research. Given that official well-being statistics largely focus on adults (TÜİK, 2024), the present findings provide timely evidence on children’s subjective well-being. Conclusion Using data from a nationally representative sample of 4,134 primary school students, this study examined the predictors of school happiness through supervised machine learning regression models. The findings demonstrate that school happiness is not a random or idiosyncratic outcome but can be predicted with moderate accuracy based on behavioral and psychosocial variables. Comparative analyses revealed that tree-based ensemble models outperformed linear models in out-of-sample prediction. The Gradient Boosting Regressor achieved the highest predictive performance, explaining approximately 23% of the variance in school happiness (R² = 0.234; MAE = 3.70; RMSE = 4.72), with the Random Forest model yielding comparable results. Diagnostic and calibration analyses indicated that this predictive performance was not driven by overfitting and that model estimates were generalizable. Across models, peer bullying emerged as the strongest negative predictor of school happiness, whereas reading frequency and teacher intervention functioned as protective factors. Excessive mobile device use—particularly at higher levels—was associated with reduced happiness, while demographic and socioeconomic variables contributed more modestly. An explained variance of approximately 23% represents a meaningful level of prediction for a complex subjective well-being construct. Overall, the findings suggest that school happiness is shaped more by students’ social experiences and daily behavioral patterns than by fixed background characteristics. From a policy perspective, bullying prevention, teacher capacity building, and balanced digital media use emerge as critical leverage points for school-based interventions. This study provides a strong empirical foundation for evidence-based educational policies aimed at enhancing school happiness in the Turkish context. Implications and Recommendations Anti-bullying initiatives should be a central school priority. Preventive, whole-school programs and safe reporting mechanisms should complement disciplinary approaches. Teachers’ intervention capacity should be systematically strengthened. Professional development focusing on classroom climate, peer dynamics, and bullying prevention is essential. Balanced digital media guidance should be promoted. Schools should provide age-appropriate guidance for students and families on healthy digital habits. Reading-oriented school cultures should be supported. Structured reading times, accessible libraries, and reading-based social activities can enhance well-being. Family–school communication should be reinforced. Trust-based and regular communication channels can support students’ emotional well-being. School happiness should be monitored as an educational outcome. Well-being indicators should complement academic metrics in educational evaluation systems. Limitations and Future Research Despite its strengths, the study is subject to several limitations. The cross-sectional design precludes causal inference, and although multiple predictors were included, not all potential determinants could be examined simultaneously (Creswell & Plano Clark, 2011). Future research should employ longitudinal designs, multiple data sources (e.g., teacher and parent reports, observational measures), and comparative modeling approaches to further elucidate the determinants of school happiness. Declarations Ethical Considerations This study was conducted in accordance with the Declaration of Helsinki (World Medical Association, 2013) and national ethical guidelines. Ethical approval was obtained from the relevant university ethics committee (Approval No: …). Parental consent and children’s informed assent were secured, participation was voluntary, and all data were anonymized. Particular care was taken when addressing bullying-related items, and students requiring psychosocial support were referred to school counseling services. Conflict of Interest The authors declare no conflict of interest. The study was conducted independently without external financial support. References Akar, C., & Ay, Ö. (2025). The impact of bullying on happiness at primary school: The role of sociodemographic and behavioral variables. Participatory Educational Research, 12 (4), 229–250. https://doi.org/10.17275/per.25.58.12.4 Arseneault, L., Bowes, L., & Shakoor, S. (2010). Bullying victimization in youths and mental health problems: “Much ado about nothing”? Psychological Medicine, 40 (5), 717–729. https://doi.org/10.1017/S0033291709991383 Aunampai, A., Techataweewan, W., & Suwanmonkha, S. (2022). Bullying victimization and happiness among Thai primary school students. Children and Youth Services Review, 136, 106393. https://doi.org/10.1016/j.childyouth.2022.106393 Baiocco, R., Laghi, F., Di Norcia, A., & Cacioppo, M. (2019). Happiness in children and early adolescents: The role of self-esteem, self-concept, and loneliness. Journal of Happiness Studies, 20 (5), 1681–1699. https://doi.org/10.1007/s10902-018-0005-0 Ben-Arieh, A., & Frønes, I. (2011). Taxonomy for child well-being indicators: A framework for the analysis of the well-being of children. Childhood, 18 (4), 460–476. https://doi.org/10.1177/0907568211398159 Bradley, R. H., & Corwyn, R. F. (2002). Socioeconomic status and child development. Annual Review of Psychology, 53 , 371–399. https://doi.org/10.1146/annurev.psych.53.100901.135233 Bradshaw, C. P., Sawyer, A. L., & O’Brennan, L. M. (2015). A social disorganization perspective on bullying‑related attitudes and behaviors: The influence of school context. American Journal of Community Psychology, 56 (3), 359–372. DOI: 10.1007/s10464-009-9240-1 Burhan, R. & Moradzadeh, J. (2020). The role of media consumption in adolescent mental health. Journal of Adolescence, 85, 65-77. https://doi.org/10.1016/j.adolescence. 2020.09.006. Creswell, J. W., & Plano Clark, V. L. (2011). Designing and conducting mixed methods research (2nd ed.). SAGE Publications. Çankaya, İ. (2011). İlköğretimde akran zorbalığı [Bullying among peers in primary school]. Uludağ Üniversitesi Eğitim Fakültesi Dergisi, 24(1), 81-92. Çankaya, Z. C., & Meydan, B. (2018). Ergenlik döneminde mutluluk ve umut [Happiness and hope in adolescence]. Elektronik Sosyal Bilimler Dergisi, 17(65), 207-222. https://doi.org/10.17755/esosder.316977. Diener, E., Oishi, S., & Lucas, R. E. (2017). If, why, and when subjective well‑being influences health, and future needed research. Applied Psychology: Health and Well‑Being, 9 (2), 133–167. https://doi.org/10.1111/aphw.12090 Dilmaç, B., & Özkan, C. (2019). Lise öğrencilerinde öznel mutluluk, suçluluk ve utancın yordayıcısı olarak siber zorbalık [Cyberbullying as a predictor of subjective happiness, guilt, and shame in high school students]. Türk Eğitim Bilimleri Dergisi, 17(1), 195-212. Espelage, D. L. (2014). Ecological Theory: Preventing Youth Bullying, Aggression, and Victimization . Theory Into Practice, 53(4), 257–264. https://doi.org/10.1080/00405841.2014.947216 Eccles, J. S., & Roeser, R. W. (2011). Schools as developmental contexts during adolescence. Journal of Research on Adolescence, 21 (1), 225–241. https://doi.org/10.1111/j.1532-7795.2010.00725.x Evans, G. W., & Cassells, R. C. (2014). Childhood poverty, cumulative risk exposure, and mental health in emerging adults. Clinical Psychological Science, 2 (3), 287–296. https://doi.org/10.1177/2167702613501496 Gini, G., Albiero, P., Benelli, B., & Altoè, G. (2007). Does empathy predict adolescents' bullying and defending behavior? Aggressive Behavior, 33 (5), 467–476. https://doi.org/10.1002/ab.20204 Goldstein, B. A., Navar, A. M., & Carter, R. E. (2017). Moving beyond regression techniques in cardiovascular risk prediction: Applying machine learning to address analytic challenges. European Heart Journal, 38 (23), 1805–1814. https://doi.org/10.1093/eurheartj/ehw302 Gómez‑Baya, D., García‑Moro, F. J., Muñoz‑Silva, A., & Martín‑Romero, N. (2021). School satisfaction and happiness in 10‑year‑old children from seven European countries. Children, 8 (5), 370. https://doi.org/10.3390/children8050370 Goldbeck, L., Schmitz, T. G., Besier, T., Herschbach, P., & Henrich, G. (2007). Life satisfaction decreases during adolescence. Quality of Life Research, 16 (6), 969–979. https://doi.org/10.1007/s11136-007-9205-5 Göcen, G. (2015). 11-12 Yaş grubundaki çocukların minnettarlıkları ve hayat memnuniyetlerine etki eden aile ile ilgili faktörler [Family-related factors affecting gratitude and life satisfaction in children of a specific age group]. Değerler Eğitimi Dergisi, 13(29), 83-116. Gündoğan, A., & Akar, C. (2019). İlkokul öğrencileri için okulda mutluluk ölçeği: Geçerlilik ve güvenirlik çalışması [The happiness at school scale for elementary school students: A validity and reliability study]. Türk Akademik Yayınlar Dergisi (Turkish Academic Publications Journal), 3 (1), 61-75. Hilbert, S., Coors, S., Kraus, E., Bischl, B., Lindl, A., Frei, M., Wild, J., Krauss, S., Goretzko, D., & Stachl, C. (2021). Machine learning for the educational sciences. Review of Education, 9 (3), e3310. https://doi.org/10.1002/rev3.3310 Hinduja, S., & Patchin, J. W. (2014). Bullying beyond the schoolyard: Preventing and responding to cyberbullying (2nd ed.). Corwin Press. Holder, M. D., & Coleman, B. (2009). The contribution of social relationships to children’s happiness. Journal of Happiness Studies, 10 (3), 329–349. https://doi.org/10.1007/s10902-007-9083-0 Hong, J. S., Lee, J., Espelage, D. L., Hunter, S. C., Patton, D. U., & Rivers, T. (2016). Understanding the correlates of face‑to‑face and cyberbullying victimization among U.S. adolescents: A social‑ecological analysis. Violence and Victims, 31 (4), 638–653. https://doi.org/10.1891/0886-6708.VV-D-15-00014 Huebner, E. S. (1991). Initial development of the Student’s Life Satisfaction Scale. School Psychology International, 12 (3), 231–240. https://doi.org/10.1177/0143034391123010 Huebner, E. S., Seligson, J. L., Valois, R. F., & Suldo, S. M. (2006). A review of the Brief Multidimensional Students’ Life Satisfaction Scale. Social Indicators Research, 79 (3), 477–484. https://doi.org/10.1007/s11205-005-5395-9 Juvonen, J., & Gross, E. F. (2008). Extending the school grounds? Bullying experiences in cyberspace. Journal of School Health, 78 (9), 496–505. https://doi.org/10.1111/j.1746-1561.2008.00335.x Kepenekçi, Y. K., & Çınkır, Ş. (2003). Öğrenciler arası zorbalık [Bullying among students]. Kuram ve Uygulamada Eğitim Yönetimi, 34 , 236–253. Kowalski, R. M., Giumetti, G. W., Schroeder, A. N., & Lattanner, M. R. (2014). Bullying in the digital age: A critical review and meta-analysis of cyberbullying research among youth. Psychological Bulletin, 140 (4), 1073–1138. https://doi.org/10.1037/a0035618 Meade, A. W., & Craig, S. B. (2012). Identifying careless responses in survey data. Psychological Methods, 17 (3), 437–455. https://doi.org/10.1037/a0028085 OECD. (2019). PISA 2018 results (Volume III): What school life means for students’ lives . https://doi.org/10.1787/acd78851-en Olweus, D. (1993). Bullying at school: What we know and what we can do. Blackwell. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., VanderPlas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, É. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12 , 2825–2830. Sarıgöl, M., & Akar, C. (2025). İlkokul öğrencilerinin zorbalığa maruz kalma düzeyleri ve demografik/kişisel faktörlerle ilişkisi [Primary school students’ exposure to bullying and its relationship with demographic/personal factors]. Uluslararası Liderlik Eğitimi Dergisi , 9 (1). 1-20. Schonert-Reichl, K. A., Oberle, E., Lawlor, M. S., Abbott, D., Thomson, K., Oberlander, T. F., & Diamond, A. (2015). Enhancing cognitive and social–emotional development through a simple-to-administer mindfulness-based school program for elementary school children: A randomized controlled trial. Developmental Psychology, 51 (1), 52–66. https://doi.org/10.1037/a0038454 The Children’s Society. (2024). The Good Childhood Report 2024. The Children’s Society. https://www.childrenssociety.org.uk/good-childhood Türkiye İstatistik Kurumu. (2024). Yaşam memnuniyeti araştırması, 2024. https://data.tuik.gov.tr Twenge, J. M., & Campbell, W. K. (2018). Associations between screen time and lower psychological well-being among children and adolescents: Evidence from a population-based study. Preventive Medicine Reports, 12 , 271–283. https://doi.org/10.1016/j.pmedr.2018.10.003 UNESCO. (2016). Happy schools! A framework for learner well-being. https://unesdoc.unesco.org/ UNESCO. (2024). Why the world needs happy schools: Global report on happiness in and for learning . UNESCO. https://unesdoc.unesco.org/ark:/48223/pf0000389119 UNICEF Innocenti. (2025). Child well-being in an unpredictable world (Innocenti Report Card 19). https://www.unicef.org/innocenti/reports/child-well-being-in-an-unpredictable-world UNICEF. (2021). The State of the World’s Children 2021: On my mind—Promoting, protecting and caring for children’s mental health . https://www.unicef.org/reports/state-worlds-children-2021 Uusitalo-Malmivaara, L. (2012). Global and school-related happiness in Finnish children. Journal of Happiness Studies, 13 (4), 601–619. https://doi.org/10.1007/s10902-011-9282-6 Van den Broeck, J., Cunningham, S. A., Eeckels, R., & Herbst, K. (2005). Data cleaning: Detecting, diagnosing, and editing data abnormalities. PLOS Medicine, 2 (10), e267. https://doi.org/10.1371/journal.pmed.0020267 Weller, D. L., Love, T. M. T., & Wiedmann, M. (2021). Interpretability versus accuracy: A comparison of machine learning models built using different algorithms, performance measures, and features to predict E. coli levels in agricultural water. Frontiers in Artificial Intelligence, 4, Article 628441. https://doi.org/10.3389/frai.2021.628441 Additional Declarations The authors declare no competing interests. Supplementary Files supplementary.docx Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-9358940","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":619772384,"identity":"48e99324-bf44-4fb7-b58b-4ef3ef0f59ff","order_by":0,"name":"Cuneyt Akar","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA40lEQVRIiWNgGAWjYDACHjiL+QCQkJAhQQsbWwJICw9upZhaeAxQbcUF+HsOP/vws+2OnMH9ns+vbtRY8DCwHz66AZ8WibNtxjN7254ZGxzj3WadcwzoMJ60tBt4rTnPYMzM2HY4cQNQi3EOG1CLBI8ZXi3y59k/g7TUbzjG88w45x8RWgzO9oBtSTA4xsP8OLeNCC2GZ84UM/acO2w481iaGXNunwQPGyG/yJ1J38zwo+ywPN/hw48/53yrk+NnP3wMv/dhQOEAA5sEiMFGlHIQkG9gYP5AtOpRMApGwSgYUQAAej1IB4l9GqEAAAAASUVORK5CYII=","orcid":"https://orcid.org/0000-0001-6028-2036","institution":"Usak Universty","correspondingAuthor":true,"prefix":"","firstName":"Cuneyt","middleName":"","lastName":"Akar","suffix":""},{"id":619772385,"identity":"0e6a076d-11a0-495e-846d-4290cefd1c3c","order_by":1,"name":"Taha İlter Akar","email":"","orcid":"https://orcid.org/0009-0004-1702-4049","institution":"Friedrich-Alexander-Universität","correspondingAuthor":false,"prefix":"","firstName":"Taha","middleName":"İlter","lastName":"Akar","suffix":""}],"badges":[],"createdAt":"2026-04-08 15:30:41","currentVersionCode":1,"declarations":{"humanSubjects":true,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":true,"humanSubjectConsent":true,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-9358940/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9358940/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":106591256,"identity":"161e86a0-fd24-4a29-b2aa-60a91538949f","added_by":"auto","created_at":"2026-04-10 08:41:59","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":47260,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003eDistribution of Cross-Validated R² Scores Across Models\u003c/em\u003e\u003c/p\u003e","description":"","filename":"floatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/4a00971d619fd9d235d0e9be.png"},{"id":106591240,"identity":"a466a8c1-75f2-4adc-ae8e-64a2572acade","added_by":"auto","created_at":"2026-04-10 08:41:54","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":54984,"visible":true,"origin":"","legend":"\u003cp\u003eRaw feature importance (Random Forest).\u003c/p\u003e","description":"","filename":"floatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/0b064a8d9798d10dd9b0d4ba.png"},{"id":106591319,"identity":"a02f1c20-8a0d-49fe-b02e-7c4de5600c6a","added_by":"auto","created_at":"2026-04-10 08:42:16","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":54752,"visible":true,"origin":"","legend":"\u003cp\u003eRaw feature importance (GradientBoostingRegressor).\u003c/p\u003e","description":"","filename":"floatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/4e2eb9837d26e3677ecc80b8.png"},{"id":106591243,"identity":"4fa6a6b8-eed2-4c9e-9d4b-66a753786d0e","added_by":"auto","created_at":"2026-04-10 08:41:54","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":310319,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003eCombined normalized feature importance index across RF and\u003c/em\u003e\u003c/p\u003e","description":"","filename":"floatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/4dc54f126df14c357a4b0d20.png"},{"id":106591238,"identity":"584dbff3-44f0-4367-8fdc-44da0e7530f5","added_by":"auto","created_at":"2026-04-10 08:41:53","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":52327,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003eGlobal SHAP summary plot for the Gradient Boosting Regressor.\u003c/em\u003e\u003c/p\u003e","description":"","filename":"floatimage5.png","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/43055f9f2e56e2db49341ea1.png"},{"id":106591257,"identity":"1d96da91-cfc4-46b0-8193-e6efc097ae58","added_by":"auto","created_at":"2026-04-10 08:41:59","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":18887,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003eMean absolute SHAP (|SHAP|) bar plot summarizing global feature importa\u003c/em\u003e\u003c/p\u003e","description":"","filename":"floatimage6.png","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/eda368849b7ff7184d053d2d.png"},{"id":106591285,"identity":"0be806ac-943f-458c-882d-a33360738add","added_by":"auto","created_at":"2026-04-10 08:42:05","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":510757,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003eSHAP dependence plots for the top six predictors of student happiness in the Gradient Boosting Regressor model\u003c/em\u003e\u003c/p\u003e","description":"","filename":"floatimage7.png","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/1c91636a9f24547244b1796e.png"},{"id":106591273,"identity":"4b8196c6-c0e0-4a02-9075-e60e64b0c6d7","added_by":"auto","created_at":"2026-04-10 08:42:03","extension":"png","order_by":8,"title":"Figure 8","display":"","copyAsset":false,"role":"figure","size":404801,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003eSHAP dependence plots for secondary predictors of student happiness in the Gradient Boosting Regressor model\u003c/em\u003e\u003c/p\u003e","description":"","filename":"floatimage8.png","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/9a8d0cb0a496366d1104650a.png"},{"id":106725745,"identity":"630038fd-25cf-44be-a606-6ccaf807e601","added_by":"auto","created_at":"2026-04-12 18:33:48","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":2435267,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/18361f0e-2b79-402e-8592-092b5b72115b.pdf"},{"id":106591284,"identity":"b06528d3-209f-44b9-a914-c440c112ff7a","added_by":"auto","created_at":"2026-04-10 08:42:05","extension":"docx","order_by":1,"title":"","display":"","copyAsset":false,"role":"supplement","size":2750848,"visible":true,"origin":"","legend":"","description":"","filename":"supplementary.docx","url":"https://assets-eu.researchsquare.com/files/rs-9358940/v1/9216b8afdce6413d6384d486.docx"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003e\u003cstrong\u003eSchool Happiness in Context: Social, Behavioral, and School-Based Predictors Among Primary Students — An Explainable Machine Learning Approach\u003c/strong\u003e\u003c/p\u003e","fulltext":[{"header":"Introduction","content":"\u003cp\u003eChildren\u0026rsquo;s happiness has become an increasingly central focus in educational and psychological research (Ben-Arieh \u0026amp; Fr\u0026oslash;nes, 2011; Diener et al., 2017; The Children\u0026rsquo;s Society, 2024; UNICEF Innocenti, 2025). This growing interest reflects an expanding recognition that subjective well-being is not only associated with individual health and academic achievement but is also closely linked to the sustainability of social well-being more broadly (Diener et al., 2017). The primary school period is particularly critical in this respect, as it represents a developmental stage in which self-concept is formed, social relationships are established, and the core components of happiness begin to take shape (Holder \u0026amp; Coleman, 2009).\u003c/p\u003e\n\u003cp\u003eInternational organizations have similarly emphasized happiness as a fundamental educational outcome. The OECD (2019) identifies students\u0026rsquo; life satisfaction as a key indicator for evaluating educational systems, while UNESCO\u0026rsquo;s Happy Schools framework positions happiness as a central goal of education, highlighting social connectedness, safety, pedagogical support, and participation as essential dimensions of quality education (UNESCO, 2016, 2024). Within this framework, school happiness emerges as a construct that extends beyond individual development to encompass broader concerns related to social cohesion and sustainability.\u003c/p\u003e\n\u003cp\u003eEmpirical research across diverse contexts supports this perspective. Studies conducted with children aged 7\u0026ndash;14 in Italy have shown that self-esteem, self-concept, and loneliness are among the primary determinants of happiness (Baiocco et al., 2019). In Finland, research involving 737 students demonstrated a strong association between school-based happiness and overall life satisfaction, with this relationship being reinforced by social relationships and leisure activities (Uusitalo-Malmivaara, 2012). At the European level, school satisfaction among 10-year-old children has been identified as a robust predictor of overall childhood happiness (G\u0026oacute;mez-Baya et al., 2021). Similarly, experimental evidence from Canada indicates that social\u0026ndash;emotional learning programs enhance cognitive and emotional development and, in turn, support school happiness (Schonert-Reichl et al., 2015).\u003c/p\u003e\n\u003cp\u003eSchool happiness can be conceptualized as a multidimensional form of subjective well-being that encompasses positive affect, life satisfaction, and context-specific domains such as school belonging and perceived social support (Huebner, 1991; Huebner et al., 2006). Within this framework, well-being is shaped not only by internal emotional states but also by children\u0026rsquo;s relational and environmental experiences. Prior research suggests that girls tend to report higher levels of happiness than boys (\u0026Ccedil;ankaya \u0026amp; Meydan, 2018), that maternal education contributes positively to children\u0026rsquo;s social\u0026ndash;emotional adjustment (G\u0026ouml;cen, 2015), and that low socioeconomic status may increase children\u0026rsquo;s vulnerability to diminished well-being (Dilma\u0026ccedil; \u0026amp; \u0026Ouml;zkan, 2019). In addition to demographic and socioeconomic factors, daily behavioral patterns play a meaningful role in shaping children\u0026rsquo;s happiness. Reading habits have been positively associated with well-being, whereas excessive screen time has been linked to loneliness and psychological difficulties (Burhan \u0026amp; Moradzadeh, 2020; Twenge \u0026amp; Campbell, 2018).\u003c/p\u003e\n\u003cp\u003eAmong the factors negatively associated with school happiness, peer bullying stands out as one of the most influential. A national study conducted in Thailand reported that nearly half of students experienced bullying, with a substantial proportion of these students reporting low levels of happiness (Aunampai et al., 2022). Similar findings have been documented in T\u0026uuml;rkiye, where bullying has been shown to be a strong predictor of reduced school happiness (Akar \u0026amp; Ay, 2025). Bullying is typically characterized by intentionality, repetition, and power imbalance, and may take physical, verbal, or relational forms (Olweus, 1993; Bradshaw et al., 2015). With increasing digitalization, cyberbullying has further intensified the risks to children\u0026rsquo;s well-being, adding complexity to the social environments in which children develop (Hinduja \u0026amp; Patchin, 2014; Kowalski et al., 2014; Gini et al., 2007; Juvonen \u0026amp; Gross, 2008). Consequently, bullying is best understood as an ecological phenomenon shaped by interactions among individual, familial, and school-level factors (Arseneault et al., 2010; Espelage, 2014; Hong et al., 2016).\u003c/p\u003e\n\u003cp\u003eThis complex network of relationships often involves nonlinear patterns and multivariate interactions that may not be adequately captured by traditional statistical approaches. In this context, machine learning offers a methodological advantage by enabling the modeling of complex interactions, ranking predictor importance, and improving predictive accuracy without restrictive linearity assumptions (Goldstein et al., 2017; Hilbert, 2021; Weller et al., 2021). Despite these advantages, nationally representative studies at the primary school level in T\u0026uuml;rkiye that simultaneously examine school happiness alongside both traditional and digital forms of bullying using machine learning approaches remain scarce. Moreover, official well-being statistics, such as those reported by the Turkish Statistical Institute (T\u0026Uuml;İK, 2024), largely focus on adult populations and provide limited insight into children\u0026rsquo;s subjective well-being.\u003c/p\u003e\n\u003cp\u003eAddressing this gap, the present study analyzes data from 4,134 primary school students sampled from T\u0026uuml;rkiye\u0026rsquo;s seven geographical regions to examine the factors predicting school happiness using machine learning techniques. Predictor variables were categorized into four domains:\u003cbr\u003e(a) \u003cstrong\u003eSociodemographic factors\u003c/strong\u003e (gender, age, grade level, nationality, number of siblings, birth order, household size, and place of residence);\u003c/p\u003e\n\u003cp\u003e(b) \u003cstrong\u003eFamily factors\u003c/strong\u003e (parental education, employment status, cohabitation status, household income, and reporting bullying to family members);\u003c/p\u003e\n\u003cp\u003e(c) \u003cstrong\u003eBehavioral factors\u003c/strong\u003e (reading frequency, television viewing time, and mobile device/tablet use); and\u003c/p\u003e\n\u003cp\u003e(d) \u003cstrong\u003eSchool-contextual factors\u003c/strong\u003e (teacher intervention and a composite bullying score encompassing physical, verbal, relational, and cyber components).\u003c/p\u003e\n\u003cp\u003eAccordingly, the primary aim of this study is to identify the relative importance of sociodemographic, familial, behavioral, and school-contextual predictors of school happiness among primary school students in T\u0026uuml;rkiye using machine learning algorithms. By adopting a predictive\u0026mdash;rather than causal\u0026mdash;framework, the study seeks to provide a data-driven basis for prioritizing key psychosocial and behavioral factors relevant to school-based interventions and educational policy.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eResearch Questions\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eGuided by machine learning analyses, the study addresses the following research question:\u003c/p\u003e\n\u003cp\u003eWhich sociodemographic, family-related, behavioral, and school-contextual variables demonstrate the strongest predictive power for school happiness among primary school students in T\u0026uuml;rkiye?\u003c/p\u003e"},{"header":"Methods","content":"\u003cp\u003e\u003cstrong\u003eResearch Design\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThis study employed a descriptive, correlational research design to examine the factors predicting school happiness among primary school students. Given the multidimensional nature of school happiness and the need to assess the relative importance of demographic, familial, behavioral, and school-contextual predictors, machine learning approaches were adopted to accommodate complex, multivariate data structures.\u003c/p\u003e\n\u003cp\u003eTraditional regression techniques are often constrained by linearity assumptions and limited capacity to model higher-order interactions (Goldstein et al., 2017; Hilbert, 2021). To address these limitations, the present study utilized supervised learning algorithms, which offer methodological advantages in handling heterogeneous predictors, modeling nonlinear relationships, and producing robust predictive performance (Weller et al., 2021). Accordingly, machine learning was used not as a replacement for theory-driven inquiry, but as a complementary analytical framework for identifying salient predictors within a high-dimensional feature space.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eParticipants\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe study sample consisted of 4,134 primary school students selected from T\u0026uuml;rkiye\u0026rsquo;s seven geographical regions. A stratified probability sampling strategy was employed, with each geographical region treated as a distinct stratum to ensure regional representativeness. Participants ranged in age from 7 to 11 years.\u003c/p\u003e\n\u003cp\u003eT\u0026uuml;rkiye is characterized by substantial regional diversity in terms of population density, socioeconomic conditions, and educational infrastructure. Ensuring national representativeness while maintaining feasibility in large-scale data collection poses both logistical and methodological challenges. To address these challenges, the sampling process prioritized not only numerical adequacy but also qualitative representativeness across regions.\u003c/p\u003e\n\u003cp\u003eWithin each geographical region, primary schools located in provinces and districts identified as having moderate socioeconomic profiles were selected in collaboration with local educational authorities. This selection process considered field accessibility, institutional cooperation, and the sustainability of the data collection process. To enhance statistical reliability and support subgroup-level comparisons, a minimum of 300 student responses was collected from each region.\u003c/p\u003e\n\u003cp\u003eThe determination of sample size was informed by methodological literature emphasizing the importance of adequate subgroup sizes in multivariate and predictive analyses (Memon et al., 2020; Althubaiti, 2022; Bujang et al., 2021). In addition, recent critiques of rigid sample size heuristics highlight the necessity of contextualized decision-making rather than reliance on universal \u0026ldquo;rules of thumb\u0026rdquo; (Aguinis \u0026amp; Harden, 2024). Guided by these considerations, the final sample structure was designed to balance representativeness, analytical power, and practical feasibility.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMeasures\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eSchool Bullying Scale\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eStudents\u0026rsquo; experiences of bullying were assessed using the \u003cem\u003eSchool Violence/Bullying Scale\u003c/em\u003e originally developed by \u0026Ccedil;ınkır and Karaman-Kepenek\u0026ccedil;i (2003), adapted for primary school students by Sarıg\u0026ouml;l and Akar (2025) with the inclusion of a digital bullying dimension. The scale consists of 16 items across four subdimensions: physical bullying (4 items), verbal bullying (5 items), relational/emotional bullying (3 items), and digital bullying (4 items).\u003c/p\u003e\n\u003cp\u003eItems are rated on a 5-point Likert-type scale ranging from 1 (\u003cem\u003eNever\u003c/em\u003e) to 5 (\u003cem\u003eEvery day\u003c/em\u003e), with higher scores indicating more frequent exposure to bullying. Sample items include: physical bullying (\u0026ldquo;Have you ever been hit or kicked at school?\u0026rdquo;), verbal bullying (\u0026ldquo;Have you been insulted or verbally harassed at school?\u0026rdquo;), relational bullying (\u0026ldquo;Have you ever been excluded from games or groups at school?\u0026rdquo;), and digital bullying (\u0026ldquo;Have hurtful things been said to you in WhatsApp groups or on social media platforms?\u0026rdquo;).\u003c/p\u003e\n\u003cp\u003eConfirmatory factor analysis (CFA) supported the structural validity of the scale (CMIN/DF = 1.87; RMSEA = .08; GFI = .85; AGFI = .80; CFI = .90; IFI = .91; RMR = .08), with all indices indicating acceptable model fit. Internal consistency was high, with a Cronbach\u0026rsquo;s alpha coefficient of .89, demonstrating strong reliability for use with primary school populations.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eSchool Happiness Scale\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eSchool-based happiness was measured using the \u003cem\u003eSchool Happiness Scale\u003c/em\u003e developed by G\u0026uuml;ndoğan and Akar (2019). The original version of the scale comprises nine items across two dimensions\u0026mdash;happiness and unhappiness\u0026mdash;and employs a 3-point Likert-type response format. Both exploratory and confirmatory factor analyses supported the construct validity of the scale (CFI = 0.989; RMSEA = 0.026), and internal consistency reliability was reported as \u0026alpha; = .76.\u003c/p\u003e\n\u003cp\u003eTo enhance sensitivity for younger age groups, the scale was subsequently adapted by Akar and Ay (2025) to a 4-point Likert-type format ranging from 1 (\u003cem\u003eNever\u003c/em\u003e) to 4 (\u003cem\u003eAlways\u003c/em\u003e). The present study employed this adapted version. In the current sample, the scale explained 66.86% of the total variance, and internal consistency reliability was satisfactory (Cronbach\u0026rsquo;s \u0026alpha; = .81).\u003c/p\u003e\n\u003cp\u003eNegatively worded items were reverse-coded prior to analysis. Total scores range from 9 to 36, with higher scores indicating higher levels of school happiness. Example items include \u0026ldquo;I look forward to going to school,\u0026rdquo; \u0026ldquo;School is a happy place,\u0026rdquo; and the reverse-coded item \u0026ldquo;I want school to end as soon as possible.\u0026rdquo;\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003ePersonal Information Form\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eA \u003cem\u003ePersonal Information Form\u003c/em\u003e developed by the researchers was used to collect data on participants\u0026rsquo; individual, familial, behavioral, and school-contextual characteristics. The form was designed to systematically capture independent variables relevant to students\u0026rsquo; school happiness and to facilitate structured categorization within the predictive modeling framework.\u003c/p\u003e\n\u003cp\u003eThe form included the following variable domains:\u003c/p\u003e\n\u003col start=\"1\" type=\"1\"\u003e\n \u003cli\u003e\u003cstrong\u003eDemographic variables:\u003c/strong\u003e gender, age, grade level, nationality, number of siblings, birth order, household size, and type of residence (urban/rural).\u003c/li\u003e\n \u003cli\u003e\u003cstrong\u003eFamily-related variables:\u003c/strong\u003e maternal and paternal education levels, parental employment status, parental cohabitation status, household income level, and whether bullying experiences were reported to family members.\u003c/li\u003e\n \u003cli\u003e\u003cstrong\u003eBehavioral variables:\u003c/strong\u003e reading frequency, daily television viewing time, and daily mobile device/tablet use.\u003c/li\u003e\n \u003cli\u003e\u003cstrong\u003eTeacher-related factor:\u003c/strong\u003e perceived level of teacher intervention in response to bullying.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cstrong\u003eData Analysis\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eData from a nationally representative sample of 4,134 primary school students were used to model school happiness as a continuous outcome variable. The primary aim was to identify the relative importance of sociodemographic, familial, behavioral, and school-contextual predictors. Supervised machine learning approaches were employed to capture nonlinear relationships and complex interactions beyond the assumptions of linear models.\u003c/p\u003e\n\u003cp\u003ePrior to analysis, the dataset underwent quality screening to identify insufficient effort responses and non-recoverable data entry errors (Meade \u0026amp; Craig, 2012; Van den Broeck et al., 2005). After cleaning, all 4,134 observations were retained. Missing data were negligible; therefore, complete-case analyses were conducted.\u003c/p\u003e\n\u003cp\u003eSchool happiness was computed as the total score of a nine-item self-report scale with adequate internal consistency (Cronbach\u0026rsquo;s \u0026alpha; = .80). Score distributions were approximately normal and free of floor or ceiling effects; thus, raw scores were used. To prevent data leakage, outcome-defining items and high-cardinality identifiers were excluded from the feature set.\u003c/p\u003e\n\u003cp\u003eThree model families were compared: linear models (Linear Regression, Ridge, Lasso, Elastic Net), tree-based ensemble models (Random Forest, Gradient Boosting, HistGradientBoosting), and instance-based methods (k-Nearest Neighbors, Support Vector Regression). All models were implemented within a leakage-safe pipeline, with preprocessing steps learned exclusively from training data (Pedregosa et al., 2011).\u003c/p\u003e\n\u003cp\u003eModel performance was evaluated using 10-fold cross-validation. Predictive accuracy was assessed using R\u0026sup2;, with MAE and RMSE reported as complementary metrics. Tree-based ensemble models consistently outperformed linear models, with the Gradient Boosting Regressor achieving the highest performance and explaining approximately 23% of the variance in school happiness. This model was therefore selected for interpretation.\u003c/p\u003e"},{"header":"Results","content":"\u003cp\u003e\u003cstrong\u003ePredictive Performance Across Models and Validation Strategies\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eModel comparison\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eUnder the primary reporting standard of 10-fold cross-validation, the Gradient Boosting Regressor (GBR) demonstrated the strongest out-of-sample predictive performance. The GBR achieved the highest explained variance (R\u0026sup2; = 0.234) while producing the lowest error estimates (MAE = 3.70; RMSE = 4.72). As illustrated in Figure 2 and detailed in Table 1, these results indicate a clear performance advantage of tree-based ensemble models over linear baseline models.\u003c/p\u003e\n\u003cp\u003eThe Random Forest model yielded performance estimates closely comparable to those of the GBR (R\u0026sup2; = 0.232; MAE = 3.69); however, the GBR exhibited a small yet consistent advantage in overall predictive stability. In contrast, the predictive capacity of linear models was notably limited. Both Linear Regression and RidgeCV models reached a performance plateau at approximately R\u0026sup2; \u0026asymp; 0.199, whereas the Lasso model\u0026mdash;characterized by stronger regularization\u0026mdash;exhibited substantially weaker performance (R\u0026sup2; = 0.061).\u003c/p\u003e\n\u003cp\u003eRelative to the Dummy Baseline model, which generates mean-based predictions, the predictive gains achieved by the GBR were both substantial and statistically meaningful. This superiority was confirmed by non-overlapping confidence intervals across all performance metrics (see Supplementary Table S3).\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eModel calibration\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eCalibration analyses indicated that tree-based ensemble models exhibited acceptable levels of calibration. The calibration slope for the GBR was estimated at 1.13, while the Random Forest model demonstrated an almost proportional calibration slope (0.98; see Supplementary Table S6b). These findings suggest that both models effectively captured variability in students\u0026rsquo; school happiness scores without exhibiting substantial overfitting.\u003c/p\u003e\n\u003cp\u003eDecile-based calibration analyses further supported these conclusions, revealing a high degree of correspondence between observed and predicted mean happiness scores for both ensemble models (see Supplementary Tables S7a\u0026ndash;S7b).\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eComparison of validation regimes\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eAdjusted repeated-measures t-tests with Benjamini\u0026ndash;Hochberg false discovery rate (BH\u0026ndash;FDR) correction (\u0026alpha; = 0.05) revealed no statistically significant differences in model performance across alternative validation regimes (all adjusted p-values \u0026ge; 0.326; see Supplementary Table S4). This result provides statistical justification for retaining 10-fold K-Fold cross-validation as the primary reporting standard.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eComplementary linear model findings\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eComplementary ordinary least squares (OLS) estimates presented in the supplementary materials (see Supplementary Table S13) were consistent with the patterns observed in the ensemble-based analyses. Specifically, exposure to peer bullying and mobile phone use emerged as negative predictors of school happiness, whereas teacher intervention and reading frequency were identified as positive predictors.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTable 1\u0026nbsp;\u003c/strong\u003e\u003cem\u003eCross-Validated Model Performance (10-Fold K-Fold with Unified Leakage-Safe Preprocessing)\u003c/em\u003e\u003c/p\u003e\n\u003ctable style=\"border: none; width: 100%;\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e\u003cstrong\u003e\u003cem\u003emodel\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e\u003cstrong\u003eR2_CV\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e\u003cstrong\u003eMAE_CV\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e\u003cstrong\u003eRMSE_CV\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e\u003cstrong\u003eR2_train\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e\u003cstrong\u003eMAE_train\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e\u003cstrong\u003eRMSE_train\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e\u003cstrong\u003eTrainingTime\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003eGradientBoostingRegressor\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.233983\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.70049\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.719097\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.3322\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.473809\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.414135\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.253869\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003eRandomForest\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.2318\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.69399\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.72572\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.8962\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e1.350795\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e1.740051\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.799382\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003eHistGB\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.2208\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.71925\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.758605\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.5548\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e2.831234\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.604194\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.272422\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003eLinearRegression\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.1992\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.79193\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.823769\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.2099\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.771785\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.801402\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.006133\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003eRidgeCV\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.1990\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.7948\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.824514\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.2098\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.773315\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.801602\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.008756\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003eSVR\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.1989\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.76416\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.825898\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.2868\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.4468\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.561751\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.291988\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003eElasticNet\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.1207\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.03014\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e5.056126\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.124\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.025483\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e5.054082\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.005693\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003eKNeighborsRegressor\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.0749\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.05577\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e5.185018\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.3927\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e3.277455\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.209372\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.007822\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003eLasso\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.0610\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.17668\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e5.224954\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.0639\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e4.174622\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e5.226094\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd nowrap=\"\"\u003e\n \u003cp\u003e0.006302\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003e\u003cstrong\u003eExplainability Analysis\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eTo enhance the interpretability of model predictions, the Gradient Boosting Regressor was selected as the primary explanatory model, while the Random Forest model was examined as a complementary reference. Feature importance profiles derived from both models showed substantial overlap, indicating a stable and consistent hierarchy of predictors.\u003c/p\u003e\n\u003cp\u003eAcross both models, peer bullying emerged as the strongest and most consistently negative predictor of school happiness. This was followed by gender, monthly reading frequency, and daily mobile device use. Higher reading frequency and stronger teacher intervention were associated with higher predicted levels of school happiness, whereas prolonged mobile device use was associated with lower happiness scores.\u003c/p\u003e\n\u003cp\u003eThe regional variable exhibited a context-sensitive, moderate effect on school happiness predictions. Parental education displayed a non-linear pattern, with students whose parents had moderate levels of education reporting relatively higher happiness, while the contribution of very high parental education levels appeared more limited. In contrast, household income, household size, and sibling order demonstrated weak and unstable contributions across models.\u003c/p\u003e\n\u003cp\u003eOverall, the explainability analyses indicate that behavioral and psychosocial factors play a more prominent role in predicting school happiness than relatively stable sociodemographic characteristics. In particular, negative social experiences and daily interaction patterns emerged as dominant contributors to students\u0026rsquo; predicted levels of school happiness.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCombined (Consensus) Feature Importance Index\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eTo integrate the relative importance assigned to predictors across different models, feature importance estimates derived from the Gradient Boosting Regressor and the Random Forest models were normalized and combined to construct a model-agnostic consensus ranking. This combined index revealed a high degree of stability in the hierarchy of predictors across ensemble-based modeling approaches.\u003c/p\u003e\n\u003cp\u003eThe resulting ranking exhibited a three-tier structure. Peer bullying emerged as the strongest negative determinant of school happiness, occupying the top tier of the consensus index. The second tier included monthly reading frequency, geographical region, daily mobile device use, gender, and teacher intervention, all of which demonstrated comparatively strong contributions to school happiness predictions. The third tier comprised parental education, age, and reporting bullying to family members, which showed moderate yet consistent effects across models.\u003c/p\u003e\n\u003cp\u003eIn contrast, socioeconomic background indicators such as household income, household size, and parental occupation displayed limited contributions to school happiness predictions. Detailed importance values and stability analyses for all predictors are provided in the supplementary materials.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eInterpretation of Model Findings\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe modest differences observed between the Gradient Boosting Regressor and Random Forest models reflect their underlying algorithmic structures. Gradient Boosting is more sensitive to subtle nonlinear patterns, whereas Random Forest emphasizes broader behavioral variance. Combining feature importance estimates from both models into a consensus index balances these differences and yields a stable, interpretable hierarchy of predictors.\u003c/p\u003e\n\u003cp\u003eSubstantively, peer bullying and digital screen use emerged as the strongest negative predictors of school happiness, while teacher support and reading habits functioned as protective factors associated with higher predicted happiness. Parental education and family communication contributed at a secondary level, whereas the explanatory power of relatively static sociodemographic characteristics remained limited. This overall pattern suggests that school happiness is shaped primarily by behavioral and psychosocial experiences rather than fixed background attributes.\u003c/p\u003e\n\u003cp\u003eTo mitigate limitations associated with impurity-based feature importance measures, model interpretations were further examined using SHAP (SHapley Additive exPlanations). SHAP analyses provided model-agnostic validation by quantifying both the direction and magnitude of each predictor\u0026rsquo;s contribution to model predictions.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eModel-Agnostic Explainability via SHAP\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eSHAP summary and importance plots closely aligned with impurity-based rankings, indicating a highly consistent explanatory structure. Peer bullying emerged as the most influential negative contributor, with higher levels associated with marked decreases in predicted happiness. Male gender was associated with systematically lower predicted happiness levels. Reading frequency showed a positive association, whereas higher levels of daily mobile device use were linked to reduced happiness. Regional effects were moderate and context-sensitive, while teacher intervention consistently contributed positively, functioning as a stabilizing factor across the distribution.\u003c/p\u003e\n\u003cp\u003eOverall, SHAP-based findings confirm that behavioral and psychosocial indicators dominate the prediction of school happiness, while static sociodemographic variables play a more modest role. The convergence of results across multiple explainability approaches strengthens the robustness and interpretability of the identified predictive patterns.\u003c/p\u003e\n\u003cp\u003eEach point represents an individual observation\u0026rsquo;s contribution to the model prediction, with color indicating the corresponding feature value (red = higher, blue = lower). The position along the x-axis reflects the SHAP value, capturing both the direction and magnitude of each feature\u0026rsquo;s effect on predicted school happiness. Features are ordered by mean absolute SHAP values, with higher-ranked variables exerting stronger global influence.\u003c/p\u003e\n\u003cp\u003ePositive SHAP values indicate higher predicted happiness, whereas negative values indicate lower predicted happiness. Peer bullying emerged as the most influential negative contributor, followed by gender, monthly reading frequency, daily mobile device use, and teacher intervention. This pattern closely mirrors impurity-based feature importance rankings, providing convergent evidence for the robustness of the identified predictor hierarchy.\u003c/p\u003e\n\u003cp\u003eThe bars display the mean absolute SHAP values across the full sample, summarizing each predictor\u0026rsquo;s overall contribution to the model output regardless of effect direction. Larger bars indicate stronger global influence on predicted school happiness.\u003c/p\u003e\n\u003cp\u003eConsistent with the beeswarm visualization, peer bullying emerged as the most influential predictor, followed by gender, monthly reading frequency, daily mobile device use, and teacher intervention. The close alignment between this ranking and impurity-based feature importance measures confirms the stability of the findings across explainability approaches.\u003c/p\u003e\n\u003cp\u003eTo further examine functional form and directionality, SHAP dependence plots were generated for the most influential predictors (Figures 7 and 8), revealing distinct behavioral and developmental patterns associated with systematic changes in predicted school happiness.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eInterpretation of SHAP Dependence Plots\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(a) Peer Bullying Score\u003c/strong\u003e exhibited a pronounced threshold effect. For students with bullying scores above approximately 50, SHAP values consistently dropped below \u0026minus;2, indicating sharp declines in predicted school happiness. This pattern confirms peer bullying as a dominant behavioral risk factor with a strong nonlinear impact on school happiness predictions.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(b) Gender\u003c/strong\u003e displayed a clear categorical separation. Male students clustered around SHAP values of approximately \u0026minus;1.0, whereas female students were concentrated around positive SHAP values (approximately +0.6). This pattern indicates systematically lower predicted levels of school happiness among male students.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(c) Monthly reading frequency\u003c/strong\u003e demonstrated an almost linear positive gradient. Students who reported reading one book per month showed SHAP values around \u0026minus;1.2, while those reading four or more books per month exhibited SHAP values approaching +1.0. This pattern suggests cumulative benefits of reading frequency for school happiness predictions.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(d) Daily mobile device use\u003c/strong\u003e revealed a nonlinear and negative pattern. Moderate use (1\u0026ndash;2 hours per day) was associated with largely neutral SHAP values, whereas usage exceeding three hours per day shifted SHAP values below \u0026minus;1.5. This finding indicates that prolonged screen exposure functions as a behavioral risk factor for reduced school happiness.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(e) Geographical region\u003c/strong\u003e exhibited moderate dispersion with context-sensitive effects. Students from western and southern regions tended to show relatively positive SHAP values (\u0026Delta; \u0026asymp; +0.3 to +0.6), whereas those from eastern regions clustered more frequently in the negative range (\u0026Delta; \u0026asymp; \u0026minus;0.4). This pattern suggests regional contextual differences in predicted school happiness.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(f) Teacher intervention\u003c/strong\u003e emerged as a balancing and protective factor. Students reporting frequent teacher intervention showed SHAP values above +0.8, while those indicating \u0026ldquo;never\u0026rdquo; or \u0026ldquo;rarely\u0026rdquo; clustered below zero. This pattern suggests that effective teacher involvement may mitigate the negative effects of adverse school experiences.\u003c/p\u003e\n\u003cp\u003eAdditional SHAP dependence plots for secondary predictors\u0026mdash;including parental education, reporting bullying to family members, daily television viewing time, household income, and household size\u0026mdash;are presented in Supplementary Figure 8 and Supplementary Figure S6. Although these variables exhibited relatively smaller absolute SHAP magnitudes (generally mean |SHAP| \u0026lt; 0.3), their directional effects remained consistent and supported the behavioral\u0026ndash;psychosocial hierarchy identified in the primary analyses.\u003c/p\u003e\n\u003cp\u003eThis figure presents SHAP dependence relationships for five secondary predictors that exhibit moderate yet directionally consistent contributions to the prediction of school happiness:\u003cbr\u003e\u0026nbsp;(a) age, (b) daily television viewing time, (c) paternal education level, (d) maternal education level, and (e) reporting experiences to family members. Each subplot reflects the marginal effect of the corresponding predictor on the model output (SHAP value) while holding other predictors constant. Yellow points represent individual observations, boxplots summarize the distributions, and red lines indicate median values.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(a) Age\u003c/strong\u003e displayed a mild but monotonic decreasing trend. Younger students (ages 6\u0026ndash;7) exhibited positive SHAP values (median \u0026asymp; +0.3\u0026ndash;0.4), indicating higher predicted happiness, whereas older students (age 10) clustered around near-zero or negative SHAP values (median \u0026asymp; \u0026minus;0.2). This pattern suggests a developmental decline in predicted well-being during middle childhood.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(b) Daily television viewing time\u003c/strong\u003e demonstrated a nonlinear negative pattern. Moderate viewing durations (1\u0026ndash;2 hours per day) were associated with neutral or slightly positive SHAP values, whereas viewing times exceeding three hours per day shifted SHAP values markedly into the negative range (median \u0026asymp; \u0026minus;0.5 to \u0026minus;0.7). This finding is consistent with cumulative effects of prolonged screen exposure.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(c) Paternal education level\u003c/strong\u003e exhibited an inverted U-shaped pattern. Both low education levels (illiterate) and the highest level (university degree) were associated with negative SHAP values, while middle school and high school levels showed neutral or slightly positive contributions. This pattern indicates a nonlinear moderating role of paternal education.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(d) Maternal education level\u003c/strong\u003e showed a similar but attenuated pattern. University-level maternal education was associated with lower SHAP values (median \u0026asymp; \u0026minus;0.7), whereas primary and lower secondary education levels corresponded to slight positive SHAP shifts. This pattern may reflect differential parental expectations and interaction dynamics.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e(e) Reporting experiences to family members\u003c/strong\u003e revealed a clear categorical separation. Students who reported sharing their problems or experiences with family members clustered around SHAP \u0026asymp; 0 (baseline), whereas those who did not report such experiences showed SHAP values concentrated below \u0026minus;1.0. This pattern indicates that the absence of family communication is associated with a substantial decrease in predicted school happiness.\u003c/p\u003e\n\u003cp\u003eOverall, the absolute SHAP magnitudes of these secondary predictors (mean |SHAP| \u0026asymp; 0.30\u0026ndash;0.36) were smaller than those of the dominant behavioral predictors (peer bullying, mobile device use, reading frequency, and teacher intervention). Nevertheless, the consistency of effect directions suggests that psychosocial and communicative factors contribute meaningfully\u0026mdash;albeit at a moderate level\u0026mdash;to subjective school happiness and reinforce the hierarchical explanatory structure of the model.\u003c/p\u003e"},{"header":"Discussion","content":"\u003cp\u003eChildren\u0026rsquo;s happiness has increasingly become a central focus of research and policy agendas in education and psychology (The Children\u0026rsquo;s Society, 2024; UNICEF Innocenti, 2025). This emphasis reflects a growing consensus that subjective well-being is closely linked not only to individual health and academic achievement but also to the sustainability of societal well-being (Diener et al., 2017). Primary school years constitute a critical developmental period in which self-concept, social relationships, and the cognitive\u0026ndash;affective foundations of happiness are formed (Holder \u0026amp; Coleman, 2009). The findings of the present study support this framework by showing that school happiness among primary school students is largely shaped by peer relationships, perceived safety, and everyday behavioral patterns.\u003c/p\u003e\n\u003cp\u003eInternational organizations increasingly conceptualize school happiness as a core educational outcome and a measurable policy domain. The OECD positions students\u0026rsquo; life satisfaction as a key indicator of educational quality (OECD, 2019), while UNESCO\u0026rsquo;s Happy Schools framework highlights social connectedness, safety, pedagogical support, and participation as foundational dimensions of quality education (UNESCO, 2016, 2024). In this context, the prominence of peer bullying and teacher intervention in the present findings closely aligns with the core pillars of the \u0026ldquo;happy school\u0026rdquo; approach.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003ePeer Bullying and Safety: A Central Vulnerability in School Happiness\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe most salient finding of this study is the strong negative association between peer bullying and school happiness. School happiness is widely conceptualized as a multidimensional form of subjective well-being that encompasses positive affect, life satisfaction, and context-specific domains such as school belonging and perceived social support (Huebner, 1991; Huebner et al., 2006; Veenhoven, 2019). Within this framework, bullying directly undermines core components of well-being by eroding students\u0026rsquo; sense of safety and belonging within the school environment. Characterized by intentionality, repetition, and power imbalance (Olweus, 1993; Bradshaw et al., 2015), bullying compromises students\u0026rsquo; sense of security, trust in peers, and capacity to form positive social relationships.\u003c/p\u003e\n\u003cp\u003eThe identification of bullying as the primary risk factor is consistent with international and national evidence (Aunampai et al., 2022; Akar \u0026amp; Ay, 2025). The expansion of cyberbullying in digitalized contexts further intensifies risks to children\u0026rsquo;s well-being (Hinduja \u0026amp; Patchin, 2014; Kowalski et al., 2014; Juvonen \u0026amp; Gross, 2008). Accordingly, bullying should be understood as an ecological phenomenon shaped by interactions among individual, familial, and school-level factors (Arseneault et al., 2010; Espelage, 2014; Hong et al., 2016). From a school happiness perspective, bullying prevention represents a central leverage point for policy and practice.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDigital Device Use and Daily Life Patterns\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe negative association between mobile device use and school happiness aligns with research linking excessive screen exposure to emotional and psychosocial difficulties, particularly during sensitive developmental periods (Twenge \u0026amp; Campbell, 2018; Burhan \u0026amp; Moradzadeh, 2020). Rather than a purely technological variable, digital device use appears to function as a broader indicator of daily life regulation intersecting with sleep, physical activity, and face-to-face social interaction. Moreover, prolonged digital use may indirectly increase exposure to online risks, including cyberbullying (Hinduja \u0026amp; Patchin, 2014; Kowalski et al., 2014), underscoring the need for balanced and developmentally sensitive guidance frameworks.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eReading Habits and Protective Cultural Practices\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eReading frequency emerged as a protective factor for school happiness, highlighting the role of everyday cultural practices in supporting well-being. Beyond academic achievement, reading is associated with attention regulation, self-control, intrinsic motivation, and emotional functioning. Empirical evidence linking reading to higher happiness levels supports this interpretation (Burhan \u0026amp; Moradzadeh, 2020), suggesting that interventions should complement risk reduction with the promotion of protective daily practices.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTeacher Intervention and the \u0026ldquo;Happy School\u0026rdquo; Climate\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eTeacher intervention was identified as a robust protective factor, consistent with school climate research and UNESCO\u0026rsquo;s emphasis on pedagogical support and positive learning environments (UNESCO, 2016, 2024). Teachers\u0026rsquo; responses to bullying and classroom social dynamics foster students\u0026rsquo; perceptions of fairness, acceptance, and belonging. Experimental evidence indicates that social\u0026ndash;emotional learning programs enhance both cognitive development and school happiness (Schonert-Reichl et al., 2015), highlighting teacher capacity building as a key implementation domain.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDemographic and Socioeconomic Context\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eConsistent with prior research, girls reported higher predicted happiness levels than boys (\u0026Ccedil;ankaya \u0026amp; Meydan, 2018), while increasing age was associated with modest declines in school happiness (Goldbeck et al., 2007). Although family socioeconomic resources may indirectly shape well-being (Bradley \u0026amp; Corwyn, 2002; Eccles \u0026amp; Roeser, 2011; Evans \u0026amp; Cassells, 2014), the present findings suggest that psychosocial and behavioral factors play a more dominant role than relatively static background characteristics. This pattern underscores the importance of equity-oriented school policies that target relational and environmental conditions.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMethodological Contribution\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eSchool happiness reflects a multidimensional system shaped by interrelated individual, familial, and institutional contexts (Ben-Arieh \u0026amp; Fr\u0026oslash;nes, 2011; UNICEF, 2021). In such contexts, machine learning\u0026mdash;particularly tree-based ensemble models\u0026mdash;offers clear advantages in capturing nonlinear relationships and ranking predictor importance (Goldstein et al., 2017; Hilbert, 2021; Weller et al., 2021). The scarcity of nationally representative, primary school\u0026ndash;level studies in T\u0026uuml;rkiye integrating traditional and digital bullying within an explainable machine learning framework further strengthens the contribution of this research. Given that official well-being statistics largely focus on adults (T\u0026Uuml;İK, 2024), the present findings provide timely evidence on children\u0026rsquo;s subjective well-being.\u003c/p\u003e"},{"header":"Conclusion","content":"\u003cp\u003eUsing data from a nationally representative sample of 4,134 primary school students, this study examined the predictors of school happiness through supervised machine learning regression models. The findings demonstrate that school happiness is not a random or idiosyncratic outcome but can be predicted with moderate accuracy based on behavioral and psychosocial variables.\u003c/p\u003e\n\u003cp\u003eComparative analyses revealed that tree-based ensemble models outperformed linear models in out-of-sample prediction. The Gradient Boosting Regressor achieved the highest predictive performance, explaining approximately 23% of the variance in school happiness (R\u0026sup2; = 0.234; MAE = 3.70; RMSE = 4.72), with the Random Forest model yielding comparable results. Diagnostic and calibration analyses indicated that this predictive performance was not driven by overfitting and that model estimates were generalizable.\u003c/p\u003e\n\u003cp\u003eAcross models, peer bullying emerged as the strongest negative predictor of school happiness, whereas reading frequency and teacher intervention functioned as protective factors. Excessive mobile device use\u0026mdash;particularly at higher levels\u0026mdash;was associated with reduced happiness, while demographic and socioeconomic variables contributed more modestly. An explained variance of approximately 23% represents a meaningful level of prediction for a complex subjective well-being construct.\u003c/p\u003e\n\u003cp\u003eOverall, the findings suggest that school happiness is shaped more by students\u0026rsquo; social experiences and daily behavioral patterns than by fixed background characteristics. From a policy perspective, bullying prevention, teacher capacity building, and balanced digital media use emerge as critical leverage points for school-based interventions. This study provides a strong empirical foundation for evidence-based educational policies aimed at enhancing school happiness in the Turkish context.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eImplications and Recommendations\u003c/strong\u003e\u003c/p\u003e\n\u003col start=\"1\" type=\"1\"\u003e\n \u003cli\u003e\u003cstrong\u003eAnti-bullying initiatives should be a central school priority.\u003c/strong\u003e Preventive, whole-school programs and safe reporting mechanisms should complement disciplinary approaches.\u003c/li\u003e\n \u003cli\u003e\u003cstrong\u003eTeachers\u0026rsquo; intervention capacity should be systematically strengthened.\u003c/strong\u003e Professional development focusing on classroom climate, peer dynamics, and bullying prevention is essential.\u003c/li\u003e\n \u003cli\u003e\u003cstrong\u003eBalanced digital media guidance should be promoted.\u003c/strong\u003e Schools should provide age-appropriate guidance for students and families on healthy digital habits.\u003c/li\u003e\n \u003cli\u003e\u003cstrong\u003eReading-oriented school cultures should be supported.\u003c/strong\u003e Structured reading times, accessible libraries, and reading-based social activities can enhance well-being.\u003c/li\u003e\n \u003cli\u003e\u003cstrong\u003eFamily\u0026ndash;school communication should be reinforced.\u003c/strong\u003e Trust-based and regular communication channels can support students\u0026rsquo; emotional well-being.\u003c/li\u003e\n \u003cli\u003e\u003cstrong\u003eSchool happiness should be monitored as an educational outcome.\u003c/strong\u003e Well-being indicators should complement academic metrics in educational evaluation systems.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cstrong\u003eLimitations and Future Research\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eDespite its strengths, the study is subject to several limitations. The cross-sectional design precludes causal inference, and although multiple predictors were included, not all potential determinants could be examined simultaneously (Creswell \u0026amp; Plano Clark, 2011). Future research should employ longitudinal designs, multiple data sources (e.g., teacher and parent reports, observational measures), and comparative modeling approaches to further elucidate the determinants of school happiness.\u003c/p\u003e"},{"header":"Declarations","content":"\u003cp\u003e\u003cstrong\u003eEthical Considerations\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThis study was conducted in accordance with the Declaration of Helsinki (World Medical Association, 2013) and national ethical guidelines. Ethical approval was obtained from the relevant university ethics committee (Approval No: \u0026hellip;). Parental consent and children\u0026rsquo;s informed assent were secured, participation was voluntary, and all data were anonymized. Particular care was taken when addressing bullying-related items, and students requiring psychosocial support were referred to school counseling services.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConflict of Interest\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe authors declare no conflict of interest. The study was conducted independently without external financial support.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n\u003cli\u003eAkar, C., \u0026amp; Ay, \u0026Ouml;. (2025). The impact of bullying on happiness at primary school: The role of sociodemographic and behavioral variables. \u003cem\u003eParticipatory Educational Research, 12\u003c/em\u003e(4), 229\u0026ndash;250. https://doi.org/10.17275/per.25.58.12.4\u003c/li\u003e\n\u003cli\u003eArseneault, L., Bowes, L., \u0026amp; Shakoor, S. (2010). Bullying victimization in youths and mental health problems: \u0026ldquo;Much ado about nothing\u0026rdquo;? \u003cem\u003ePsychological Medicine, 40\u003c/em\u003e(5), 717\u0026ndash;729. https://doi.org/10.1017/S0033291709991383\u003c/li\u003e\n\u003cli\u003eAunampai, A., Techataweewan, W., \u0026amp; Suwanmonkha, S. (2022). Bullying victimization and happiness among Thai primary school students. \u003cem\u003eChildren and Youth Services Review, 136,\u003c/em\u003e 106393. https://doi.org/10.1016/j.childyouth.2022.106393\u003c/li\u003e\n\u003cli\u003eBaiocco, R., Laghi, F., Di Norcia, A., \u0026amp; Cacioppo, M. (2019). Happiness in children and early adolescents: The role of self-esteem, self-concept, and loneliness. \u003cem\u003eJournal of Happiness Studies, 20\u003c/em\u003e(5), 1681\u0026ndash;1699. https://doi.org/10.1007/s10902-018-0005-0\u003c/li\u003e\n\u003cli\u003eBen-Arieh, A., \u0026amp; Fr\u0026oslash;nes, I. (2011). Taxonomy for child well-being indicators: A framework for the analysis of the well-being of children. \u003cem\u003eChildhood, 18\u003c/em\u003e(4), 460\u0026ndash;476. https://doi.org/10.1177/0907568211398159\u003c/li\u003e\n\u003cli\u003eBradley, R. H., \u0026amp; Corwyn, R. F. (2002). Socioeconomic status and child development. \u003cem\u003eAnnual Review of Psychology, 53\u003c/em\u003e, 371\u0026ndash;399. https://doi.org/10.1146/annurev.psych.53.100901.135233\u003c/li\u003e\n\u003cli\u003eBradshaw, C. P., Sawyer, A. L., \u0026amp; O\u0026rsquo;Brennan, L. M. (2015). A social disorganization perspective on bullying‑related attitudes and behaviors: The influence of school context. \u003cem\u003eAmerican Journal of Community Psychology, 56\u003c/em\u003e(3), 359\u0026ndash;372. DOI: 10.1007/s10464-009-9240-1\u003c/li\u003e\n\u003cli\u003eBurhan, R. \u0026amp; Moradzadeh, J. (2020). The role of media consumption in adolescent mental health. Journal of Adolescence, 85, 65-77. https://doi.org/10.1016/j.adolescence. 2020.09.006.\u003c/li\u003e\n\u003cli\u003eCreswell, J. W., \u0026amp; Plano Clark, V. L. (2011). \u003cem\u003eDesigning and conducting mixed methods research\u003c/em\u003e (2nd ed.). SAGE Publications.\u003c/li\u003e\n\u003cli\u003e\u0026Ccedil;ankaya, İ. (2011). İlk\u0026ouml;ğretimde akran zorbalığı [Bullying among peers in primary school]. Uludağ \u0026Uuml;niversitesi Eğitim Fak\u0026uuml;ltesi Dergisi, 24(1), 81-92. \u003c/li\u003e\n\u003cli\u003e\u0026Ccedil;ankaya, Z. C., \u0026amp; Meydan, B. (2018). Ergenlik d\u0026ouml;neminde mutluluk ve umut [Happiness and hope in adolescence]. Elektronik Sosyal Bilimler Dergisi, 17(65), 207-222. https://doi.org/10.17755/esosder.316977.\u003c/li\u003e\n\u003cli\u003eDiener, E., Oishi, S., \u0026amp; Lucas, R. E. (2017). If, why, and when subjective well‑being influences health, and future needed research. \u003cem\u003eApplied Psychology: Health and Well‑Being, 9\u003c/em\u003e(2), 133\u0026ndash;167. https://doi.org/10.1111/aphw.12090\u003c/li\u003e\n\u003cli\u003eDilma\u0026ccedil;, B., \u0026amp; \u0026Ouml;zkan, C. (2019). Lise \u0026ouml;ğrencilerinde \u0026ouml;znel mutluluk, su\u0026ccedil;luluk ve utancın yordayıcısı olarak siber zorbalık [Cyberbullying as a predictor of subjective happiness, guilt, and shame in high school students]. T\u0026uuml;rk Eğitim Bilimleri Dergisi, 17(1), 195-212.\u003c/li\u003e\n\u003cli\u003eEspelage, D. L. (2014). \u003cem\u003eEcological Theory: Preventing Youth Bullying, Aggression, and Victimization\u003c/em\u003e. Theory Into Practice, 53(4), 257\u0026ndash;264. https://doi.org/10.1080/00405841.2014.947216 \u003c/li\u003e\n\u003cli\u003eEccles, J. S., \u0026amp; Roeser, R. W. (2011). Schools as developmental contexts during adolescence. \u003cem\u003eJournal of Research on Adolescence, 21\u003c/em\u003e(1), 225\u0026ndash;241. https://doi.org/10.1111/j.1532-7795.2010.00725.x\u003c/li\u003e\n\u003cli\u003eEvans, G. W., \u0026amp; Cassells, R. C. (2014). Childhood poverty, cumulative risk exposure, and mental health in emerging adults. \u003cem\u003eClinical Psychological Science, 2\u003c/em\u003e(3), 287\u0026ndash;296. https://doi.org/10.1177/2167702613501496\u003c/li\u003e\n\u003cli\u003eGini, G., Albiero, P., Benelli, B., \u0026amp; Alto\u0026egrave;, G. (2007). Does empathy predict adolescents\u0026apos; bullying and defending behavior? \u003cem\u003eAggressive Behavior, 33\u003c/em\u003e(5), 467\u0026ndash;476. https://doi.org/10.1002/ab.20204\u003c/li\u003e\n\u003cli\u003eGoldstein, B. A., Navar, A. M., \u0026amp; Carter, R. E. (2017). Moving beyond regression techniques in cardiovascular risk prediction: Applying machine learning to address analytic challenges. \u003cem\u003eEuropean Heart Journal, 38\u003c/em\u003e(23), 1805\u0026ndash;1814. https://doi.org/10.1093/eurheartj/ehw302\u003c/li\u003e\n\u003cli\u003eG\u0026oacute;mez‑Baya, D., Garc\u0026iacute;a‑Moro, F. J., Mu\u0026ntilde;oz‑Silva, A., \u0026amp; Mart\u0026iacute;n‑Romero, N. (2021). School satisfaction and happiness in 10‑year‑old children from seven European countries. \u003cem\u003eChildren, 8\u003c/em\u003e(5), 370. https://doi.org/10.3390/children8050370\u003c/li\u003e\n\u003cli\u003eGoldbeck, L., Schmitz, T. G., Besier, T., Herschbach, P., \u0026amp; Henrich, G. (2007). Life satisfaction decreases during adolescence. \u003cem\u003eQuality of Life Research, 16\u003c/em\u003e(6), 969\u0026ndash;979. https://doi.org/10.1007/s11136-007-9205-5\u003c/li\u003e\n\u003cli\u003eG\u0026ouml;cen, G. (2015). 11-12 Yaş grubundaki \u0026ccedil;ocukların minnettarlıkları ve hayat memnuniyetlerine etki eden aile ile ilgili fakt\u0026ouml;rler [Family-related factors affecting gratitude and life satisfaction in children of a specific age group]. Değerler Eğitimi Dergisi, 13(29), 83-116.\u003c/li\u003e\n\u003cli\u003eG\u0026uuml;ndoğan, A., \u0026amp; Akar, C. (2019). \u003cem\u003eİlkokul \u0026ouml;ğrencileri i\u0026ccedil;in okulda mutluluk \u0026ouml;l\u0026ccedil;eği: Ge\u0026ccedil;erlilik ve g\u0026uuml;venirlik \u0026ccedil;alışması \u003c/em\u003e[The happiness at school scale for elementary school students: A validity and reliability study]. \u003cem\u003eT\u0026uuml;rk Akademik Yayınlar Dergisi (Turkish Academic Publications Journal), 3\u003c/em\u003e(1), 61-75.\u003c/li\u003e\n\u003cli\u003eHilbert, S., Coors, S., Kraus, E., Bischl, B., Lindl, A., Frei, M., Wild, J., Krauss, S., Goretzko, D., \u0026amp; Stachl, C. (2021). Machine learning for the educational sciences. \u003cem\u003eReview of Education, 9\u003c/em\u003e(3), e3310. https://doi.org/10.1002/rev3.3310\u003c/li\u003e\n\u003cli\u003eHinduja, S., \u0026amp; Patchin, J. W. (2014). \u003cem\u003eBullying beyond the schoolyard: Preventing and responding to cyberbullying\u003c/em\u003e (2nd ed.). Corwin Press.\u003c/li\u003e\n\u003cli\u003eHolder, M. D., \u0026amp; Coleman, B. (2009). The contribution of social relationships to children\u0026rsquo;s happiness. \u003cem\u003eJournal of Happiness Studies, 10\u003c/em\u003e(3), 329\u0026ndash;349. https://doi.org/10.1007/s10902-007-9083-0\u003c/li\u003e\n\u003cli\u003eHong, J. S., Lee, J., Espelage, D. L., Hunter, S. C., Patton, D. U., \u0026amp; Rivers, T. (2016). Understanding the correlates of face‑to‑face and cyberbullying victimization among U.S. adolescents: A social‑ecological analysis. \u003cem\u003eViolence and Victims, 31\u003c/em\u003e(4), 638\u0026ndash;653. https://doi.org/10.1891/0886-6708.VV-D-15-00014\u003c/li\u003e\n\u003cli\u003eHuebner, E. S. (1991). Initial development of the Student\u0026rsquo;s Life Satisfaction Scale. \u003cem\u003eSchool Psychology International, 12\u003c/em\u003e(3), 231\u0026ndash;240. https://doi.org/10.1177/0143034391123010\u003c/li\u003e\n\u003cli\u003eHuebner, E. S., Seligson, J. L., Valois, R. F., \u0026amp; Suldo, S. M. (2006). A review of the Brief Multidimensional Students\u0026rsquo; Life Satisfaction Scale. \u003cem\u003eSocial Indicators Research, 79\u003c/em\u003e(3), 477\u0026ndash;484. https://doi.org/10.1007/s11205-005-5395-9\u003c/li\u003e\n\u003cli\u003eJuvonen, J., \u0026amp; Gross, E. F. (2008). Extending the school grounds? Bullying experiences in cyberspace. \u003cem\u003eJournal of School Health, 78\u003c/em\u003e(9), 496\u0026ndash;505. https://doi.org/10.1111/j.1746-1561.2008.00335.x\u003c/li\u003e\n\u003cli\u003eKepenek\u0026ccedil;i, Y. K., \u0026amp; \u0026Ccedil;ınkır, Ş. (2003). \u0026Ouml;ğrenciler arası zorbalık [Bullying among students]. \u003cem\u003eKuram ve Uygulamada Eğitim Y\u0026ouml;netimi, 34\u003c/em\u003e, 236\u0026ndash;253.\u003c/li\u003e\n\u003cli\u003eKowalski, R. M., Giumetti, G. W., Schroeder, A. N., \u0026amp; Lattanner, M. R. (2014). Bullying in the digital age: A critical review and meta-analysis of cyberbullying research among youth. \u003cem\u003ePsychological Bulletin, 140\u003c/em\u003e(4), 1073\u0026ndash;1138. https://doi.org/10.1037/a0035618\u003c/li\u003e\n\u003cli\u003eMeade, A. W., \u0026amp; Craig, S. B. (2012). Identifying careless responses in survey data. \u003cem\u003ePsychological Methods, 17\u003c/em\u003e(3), 437\u0026ndash;455. https://doi.org/10.1037/a0028085\u003c/li\u003e\n\u003cli\u003eOECD. (2019). \u003cem\u003ePISA 2018 results (Volume III): What school life means for students\u0026rsquo; lives\u003c/em\u003e. https://doi.org/10.1787/acd78851-en\u003c/li\u003e\n\u003cli\u003eOlweus, D. (1993). \u003cem\u003eBullying at school: What we know and what we can do.\u003c/em\u003e Blackwell. \u003c/li\u003e\n\u003cli\u003ePedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., VanderPlas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., \u0026amp; Duchesnay, \u0026Eacute;. (2011). Scikit-learn: Machine learning in Python. \u003cem\u003eJournal of Machine Learning Research, 12\u003c/em\u003e, 2825\u0026ndash;2830.\u003c/li\u003e\n\u003cli\u003eSarıg\u0026ouml;l, M., \u0026amp; Akar, C. (2025). İlkokul \u0026ouml;ğrencilerinin zorbalığa maruz kalma d\u0026uuml;zeyleri ve demografik/kişisel fakt\u0026ouml;rlerle ilişkisi [Primary school students\u0026rsquo; exposure to bullying and its relationship with demographic/personal factors]. \u003cem\u003eUluslararası Liderlik Eğitimi Dergisi\u003c/em\u003e, \u003cem\u003e9\u003c/em\u003e(1). 1-20.\u003c/li\u003e\n\u003cli\u003eSchonert-Reichl, K. A., Oberle, E., Lawlor, M. S., Abbott, D., Thomson, K., Oberlander, T. F., \u0026amp; Diamond, A. (2015). Enhancing cognitive and social\u0026ndash;emotional development through a simple-to-administer mindfulness-based school program for elementary school children: A randomized controlled trial. \u003cem\u003eDevelopmental Psychology, 51\u003c/em\u003e(1), 52\u0026ndash;66. https://doi.org/10.1037/a0038454\u003c/li\u003e\n\u003cli\u003eThe Children\u0026rsquo;s Society. (2024). \u003cem\u003eThe Good Childhood Report 2024.\u003c/em\u003e The Children\u0026rsquo;s Society.\u003cbr\u003e https://www.childrenssociety.org.uk/good-childhood\u003c/li\u003e\n\u003cli\u003eT\u0026uuml;rkiye İstatistik Kurumu. (2024). \u003cem\u003eYaşam memnuniyeti araştırması, 2024.\u003c/em\u003e https://data.tuik.gov.tr \u003c/li\u003e\n\u003cli\u003eTwenge, J. M., \u0026amp; Campbell, W. K. (2018). Associations between screen time and lower psychological well-being among children and adolescents: Evidence from a population-based study. \u003cem\u003ePreventive Medicine Reports, 12\u003c/em\u003e, 271\u0026ndash;283. https://doi.org/10.1016/j.pmedr.2018.10.003 \u003c/li\u003e\n\u003cli\u003eUNESCO. (2016). \u003cem\u003eHappy schools! A framework for learner well-being.\u003c/em\u003e https://unesdoc.unesco.org/ \u003c/li\u003e\n\u003cli\u003eUNESCO. (2024). \u003cem\u003eWhy the world needs happy schools: Global report on happiness in and for learning\u003c/em\u003e. UNESCO. https://unesdoc.unesco.org/ark:/48223/pf0000389119\u003c/li\u003e\n\u003cli\u003eUNICEF Innocenti. (2025). \u003cem\u003eChild well-being in an unpredictable world (Innocenti Report Card 19).\u003c/em\u003e https://www.unicef.org/innocenti/reports/child-well-being-in-an-unpredictable-world\u003c/li\u003e\n\u003cli\u003eUNICEF. (2021). \u003cem\u003eThe State of the World\u0026rsquo;s Children 2021: On my mind\u0026mdash;Promoting, protecting and caring for children\u0026rsquo;s mental health\u003c/em\u003e. https://www.unicef.org/reports/state-worlds-children-2021\u003c/li\u003e\n\u003cli\u003eUusitalo-Malmivaara, L. (2012). Global and school-related happiness in Finnish children. \u003cem\u003eJournal of Happiness Studies, 13\u003c/em\u003e(4), 601\u0026ndash;619. https://doi.org/10.1007/s10902-011-9282-6\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eVan den Broeck, J., Cunningham, S. A., Eeckels, R., \u0026amp; Herbst, K. (2005).\u003c/strong\u003e Data cleaning: Detecting, diagnosing, and editing data abnormalities. \u003cem\u003ePLOS Medicine, 2\u003c/em\u003e(10), e267. https://doi.org/10.1371/journal.pmed.0020267\u003c/li\u003e\n\u003cli\u003eWeller, D. L., Love, T. M. T., \u0026amp; Wiedmann, M. (2021). Interpretability versus accuracy: A comparison of machine learning models built using different algorithms, performance measures, and features to predict \u003cem\u003eE. coli\u003c/em\u003e levels in agricultural water. \u003cem\u003eFrontiers in Artificial Intelligence, 4,\u003c/em\u003e Article 628441. https://doi.org/10.3389/frai.2021.628441\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Usak University","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"School happiness, Child well-being, Peer bullying, Digital media use, Explainable machine learning","lastPublishedDoi":"10.21203/rs.3.rs-9358940/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9358940/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eThis study examines the factors predicting school happiness among primary school students in T\u0026uuml;rkiye using an explainable machine learning approach. Data were collected from a nationally representative sample of 4,134 primary school students. School happiness was modeled as a continuous outcome variable, and sociodemographic, familial, behavioral, and school-contextual factors were analyzed using supervised regression techniques. Linear models were compared with tree-based ensemble models to capture nonlinear relationships and complex interactions among predictors. Results indicated that tree-based ensemble models outperformed linear models in out-of-sample prediction. The Gradient Boosting Regressor achieved the highest predictive performance, explaining approximately 23% of the variance in school happiness. Model diagnostics and calibration analyses supported the generalizability of the findings. Explainability analyses revealed that peer bullying was the strongest negative predictor of school happiness, whereas reading frequency and teacher intervention emerged as protective factors. Excessive mobile device use was associated with lower predicted happiness levels, particularly at higher usage durations. Overall, the findings demonstrate that school happiness can be reliably predicted using explainable machine learning methods. While the results are predictive rather than causal, they highlight bullying prevention, teacher support, and balanced digital media use as critical leverage points for school-based interventions and educational policy.\u003c/p\u003e","manuscriptTitle":"School Happiness in Context: Social, Behavioral, and School-Based Predictors Among Primary Students — An Explainable Machine Learning Approach","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-04-10 08:40:50","doi":"10.21203/rs.3.rs-9358940/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"1ee6a341-6380-4031-992f-894bd4532f18","owner":[],"postedDate":"April 10th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":65968600,"name":"Educational Psychology"}],"tags":[],"updatedAt":"2026-04-10T08:40:50+00:00","versionOfRecord":[],"versionCreatedAt":"2026-04-10 08:40:50","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9358940","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9358940","identity":"rs-9358940","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.