Smartphone-derived daily step counts and depressive and anxiety symptom severity in Chinese university students: Associations and dose-response patterns
Figures
Abstract
Background
Smartphone-derived step counts provide an objective and scalable measure of daily physical activity, but instrumental variable (IV)-based and dose–response relationships remain poorly understood.
Objective
To estimate the IV-based associations between average daily step counts and depressive and anxiety symptom severity and characterize potential nonlinear dose-response patterns in Chinese university students.
Methods
We analyzed data from 794 university students utilizing 14-day average daily step counts and PHQ-9 and GAD-7 scores. Dormitory-to-academic-building distance was used as an IV, supported by its strong association with step counts, balanced measured covariates across distance groups, and institutional allocation practices. Restricted cubic spline (RCS) regression and varying coefficient network (VCNet) were used to characterize potential nonlinear dose-response patterns.
Results
In the IV analysis, each additional 1,000 steps/day was associated with lower PHQ-9 (β = −0.404; 95% CI, −0.502 to −0.306, P < .001) and GAD-7 scores (β = −0.708; 95% CI, −0.865 to −0.551, P < .001). These changes were statistically significant but modest. In RCS analysis, PHQ-9 scores decreased up to approximately 9,180 steps/day and increased thereafter (overall association, P = .032; nonlinearity, P = .040). No significant overall or nonlinear association was observed for GAD-7 (overall association, P = .365; nonlinearity, P = .264). VCNet showed a similar descriptive U-shaped pattern for PHQ-9.
Conclusions
This study illustrates a practical, low-cost approach to examining physical activity and mental health in real-world settings by integrating smartphone-derived step counts with linear IV analysis and separate observational dose-response analyses. Evidence of nonlinearity was observed only for depressive symptoms (PHQ-9), with no statistically supported nonlinear pattern for anxiety symptoms (GAD-7). Causal interpretation and generalizability remain limited by IV assumptions, the short single-university design, voluntary participation, and self-reported outcomes. These findings support further multicenter longitudinal evaluation of step-count patterns as complementary behavioral indicators of mental health.
Citation: Zou L, Zhao X, Tan J, Liu Z, Cao L, Li X, et al. (2026) Smartphone-derived daily step counts and depressive and anxiety symptom severity in Chinese university students: Associations and dose-response patterns. PLoS One 21(11): e0363752. https://doi.org/10.1371/journal.pone.0363752
Editor: Jiaci Lin, Nanjing University, CHINA
Received: June 11, 2026; Accepted: November 12, 2026; Published: November 30, 2026
Copyright: © 2026 Zou et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: The raw individual-level data cannot be deposited in an unrestricted public repository because they contain sensitive information from university students, including mental health scale scores, smartphone-derived behavioral records, and campus-related variables, and public release could create a risk of participant re-identification. This restriction is based on the requirements associated with approval by the Human Biomedical Research Ethics Committee of NingboTech University (Approval No. LL2025080801). De-identified data necessary to reproduce the main findings may be made available to qualified researchers upon reasonable formal request, subject to review and approval by the Committee and applicable privacy requirements. Data access requests should be directed to the Human Biomedical Research Ethics Committee of NingboTech University through its designated non-author administrative liaison, Shijie Fang (fsj@nbt.edu.cn). The Committee, rather than the authors, will determine whether access can be granted. Because the participant-level dataset has not been deposited in a public repository, no public dataset DOI or accession number is available.
Funding: This research was supported by the Ningbo Natural Science Foundation project under Grant No.2024J215, by Zhejiang Provincial Natural Science Foundation of China under Grant No. LY23F020013, by the National Natural Science Foundation of China under Grant No. 61972350, by the Ningbo 2025 Major Project of Science and Technology Innovation under Grant No. 2021Z109, Major Technological Innovation Projects of Ningbo High tech Zone under Grant No. 2022BCX050002, by 2023 Ningbo Key Research Plan under Grant No. 2023Z040, Ningbo Science and Technology Innovation Yongjiang 2035 Key Technology Breakthrough Plan under Grant No. 2024Z261, by the Ningbo Public Welfare Research Program under Grant No. 2023S108, by Planning issues of philosophy and social sciences No. 23LMJX16YB, by the Talent Project from NingboTech University under Grant No. 1149957G20230232. These grants were awarded to the research team. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors have declared that no competing interests exist.
1. Introduction
Depression and anxiety are among the most common and burdensome mental disorders worldwide [1]. Among university students, the prevalence of depressive and anxiety symptoms remains high [2,3] and has continued to increase over the past decade [4]. In China, a 2022 survey of 30,475 university students identified high-risk depressive and anxiety symptoms in 10.0% and 23.3% of participants, respectively [5]. However, conventional approaches for assessing these symptoms rely largely on clinician-administered interviews and self-report questionnaires, which require trained professionals and are susceptible to recall bias [6–8]. Although these approaches remain essential for assessing symptom severity, they may not capture continuous behavioral fluctuations in daily life. As a result, many cases may not be identified in a timely manner, delaying early recognition and intervention, particularly in university students [9]. In addition, the etiology and pathophysiological mechanisms of depression and anxiety remain not fully understood [10,11]. Together, these limitations highlight the need for scalable, objective approaches to monitoring mental health and providing complementary insights into its underlying mechanisms.
Physical activity has been consistently associated with mental health. Prospective cohort studies suggest that low levels of physical activity are associated with an increased risk of depression onset [12–14], and longitudinal evidence indicates that declines in physical activity may precede worsening depressive symptoms [15]. However, many epidemiologic studies have relied on self-report questionnaires to assess physical activity, which may introduce recall bias. Among commonly used indicators of physical activity, daily step count is a simple, objective, and relatively robust proxy of overall ambulatory activity in everyday life [16]. Recent advances in wearable devices and smartphone-embedded sensors, including accelerometers, gyroscopes, and GPS, have made it increasingly feasible to monitor daily step count continuously and objectively in real-world settings [17,18]. Prior studies have found that daily step count is associated with the severity of depressive and anxiety symptoms [19–21]. However, existing dose-response studies have largely reported adjusted associations, whereas causal studies have focused mainly on average effects, leaving nonlinear relationships based on objective step-count data insufficiently characterized [22–25]. It also remains unclear whether these relationships remain consistent or change across step-count levels, especially among Chinese university students. Physical activity may support mental health by attenuating negative affective responses to daily stressors, thereby facilitating mood regulation and stress recovery [26]. In university settings, campus walkability and walking attitudes may shape affective walking experiences [27]. Physical activity may also be related to sleep through changes in rumination and depressive symptoms [28]. Because these affective, cognitive, and sleep-related pathways may operate differently across levels and contexts of walking, nonlinear associations between daily steps and symptom severity are plausible.
Causal inference in observational studies remains challenging because exposures are not randomly assigned and assumptions concerning assignment mechanisms and covariate balance may not hold, particularly in naturalistic wearable-data settings [29]. Unmeasured factors, such as personality and lifestyle, may also influence both physical activity and mental health, limiting conventional regression-based adjustment [29]. Although randomized controlled trials (RCTs) can address these concerns, they are often difficult to implement in real-world behavioral research. Instrumental variable (IV) approaches therefore provide an alternative for addressing unmeasured confounding in observational settings [30]. A valid IV must be associated with physical activity, be independent of factors affecting mental health, and affect mental health only through physical activity [23,30]. When these assumptions are satisfied, IV methods can estimate causal effects despite unmeasured confounding. This approach is particularly relevant to Chinese universities, where students commonly live in centrally managed campus housing and dormitory assignments are largely determined administratively rather than by individual preference. Dormitory-to-academic-building distance may therefore provide a plausible source of exogenous variation in daily step counts because longer distances require more routine walking and are less likely to reflect students’ mental health or activity preferences. Nevertheless, possible pathways from distance to mental health other than walking mean that the exclusion restriction requires careful evaluation. Conventional IV methods also typically rely on linearity assumptions and may not capture complex nonlinear behavioral relationships [31]. Restricted cubic spline (RCS) regression provides a conventional and interpretable approach to dose-response modeling [32], whereas varying coefficient network (VCNet) offers a more flexible analysis [33–35].
We therefore leveraged data collected through a social app–based platform developed by our research group, which enabled the synchronized collection of objective daily step counts and validated self-reported depression and anxiety measures [20]. Passive behavioral data are intended to complement, rather than replace, validated clinical assessments of depressive and anxiety symptoms. In early-stage digital biomarker research, validated depression and anxiety questionnaires serve as reference outcomes for relating objectively measured behaviors to symptom severity [17,20,21]. Accordingly, we treated smartphone-derived step counts as an objective behavioral exposure and questionnaire scores as reference outcomes, with the longer-term aim of evaluating whether passive behavioral signals can support scalable mental health screening alongside established assessments. We therefore used IV analysis as a quasi-experimental approach to help distinguish potential causal effects from associations confounded by unmeasured lifestyle factors, conditional on its identifying assumptions. Specifically, we first assessed the proposed dormitory-to-academic-building distance instrument by examining its relevance and measured-covariate balance and by considering the independence and exclusion assumptions in the campus context. We then applied IV analysis to estimate the association between daily step counts and depressive and anxiety symptoms under the standard IV assumptions. RCS was used as the primary nonlinear analysis, with VCNet additionally applied as a secondary analysis to characterize potential dose-response patterns.
2. Materials and methods
2.1. Data set
2.1.1. Participants.
2.1.2. Procedure.
2.1.3. Questionnaire.
Depressive and anxiety symptoms were assessed using the 9-item Patient Health Questionnaire (PHQ-9) and the 7-item Generalized Anxiety Disorder scale (GAD-7), respectively. The PHQ-9 consists of nine items evaluating the frequency of depressive symptoms over the past two weeks, with each item scored from 0 to 3 and total scores ranging from 0 to 27 [36]. The GAD-7 consists of seven items assessing anxiety symptoms over the past two weeks using the same 0–3 scoring system, with total scores ranging from 0 to 21 [37]. Higher scores on both scales indicate greater symptom severity. The psychometric qualities of the Chinese versions of the PHQ-9 and GAD-7 were assessed in the present sample by evaluating their internal consistency reliability using Cronbach’s α [38]. In addition to the two psychological scales, a basic questionnaire also collected demographic, physical, and contextual information.
2.1.4. Inclusion Criteria.
Daily step counts were obtained through WeRun. Participants were required to have complete questionnaire data and sufficient daily step count records for analysis. To ensure data quality, participants with fewer than 11 days of valid step records during the 14-day observation period were excluded. Sensitivity analyses were conducted by repeating the IV models with stricter requirements of at least 12, 13, and 14 valid days of step records. Previous reliability research suggests that 7–10 valid monitoring days may be needed to obtain reliable aggregate estimates of device-measured physical activity [39]. More measurement days may be required among younger adults and smartphone users. We therefore required a minimum of 11 valid days as a conservative criterion, ensuring that average daily step count was based on most of the 14-day observation period while allowing no more than three missing days. Days with zero recorded steps were treated as missing days rather than valid observations because, in passive smartphone-based activity monitoring, zero values may reflect either genuine inactivity or missing data caused by unavailable recording, such as unavailable permissions, interrupted background recording, or other technical failures [40]. For participants with 1–3 missing days, missing daily step counts were imputed using linear interpolation. Linear interpolation was selected because it is a commonly used time-series gap-filling approach for short missing intervals, relying on observed values immediately before and after the missing period without requiring additional distributional assumptions about the overall activity distribution. Given the short duration of missing periods in this study, linear interpolation was considered appropriate to preserve the planned 14-day exposure window while reducing information loss caused by incomplete records [41]. To represent overall physical activity during the observation period, average daily step count over the 14-day observation period was calculated and denoted as Avg_Daily_Steps. The RCS and VCNet implementations used in this study required non-missing model inputs. To assess sensitivity to linear interpolation, both analyses were repeated among the 730 participants with all 14 valid step-recording days. Average daily step counts were calculated solely from observed records, without interpolation. The IV sensitivity analysis used the same complete-case sample for consistency (Table S5 in S1 File). The corresponding RCS and VCNet results are presented in Fig S2 in S1 File.
2.1.5. Covariates.
To reduce potential confounding, the analysis adjusted for demographics, physical, and health-related covariates that may be associated with both physical activity and mental health [26]. Covariates included gender, grade, weight, height, BMI, chronic disease, course load, and dormitory floor.
Course load was defined as the cumulative class-load score over the 14-day observation period. For each day, it was coded as 0 if no classes were scheduled in either the morning or afternoon, 1 if classes were scheduled in either the morning or afternoon only, and 2 if classes were scheduled in both the morning and afternoon. Daily scores were then summed across 14 days, with higher values indicating a heavier class schedule. Dormitory floor was included to account for differences in stair use. Chronic disease was included to account for underlying health conditions that may be related to both physical activity and mental health.
2.2. Analytical methods
2.2.1. Instrumental variable.
To estimate the IV-based association between physical activity and mental health, we used the distance between dormitories and academic buildings as an IV. The validity of this IV was evaluated with respect to the standard assumptions of relevance, independence, and the exclusion restriction [42]. Prior studies on campus built environments suggest that walkability and spatial accessibility can influence students’ walking behavior and overall physical activity levels [23,27]. In the present study, instrument strength was assessed in the first-stage regression by examining the association between dormitory-to-academic-building distance and Avg_Daily_Steps, together with the corresponding F-statistic. The F-statistic exceeded conventional thresholds, suggesting that weak-instrument bias was unlikely [43].
At NingboTech University, like most other universities in China, dormitory allocation is typically determined by administrative factors such as gender, grade, campus layout, and institutional arrangements, rather than by students’ mental health status or exercise preferences. After adjustment for dormitory-allocation-related and course-related covariates, dormitory-to-academic-building distance was considered unlikely to reflect individual self-selection. To examine the plausibility of the independence assumption with respect to measured characteristics, covariate distributions were compared across the five dormitory-distance levels. Categorical covariates were evaluated using chi-square tests with Cramer’s V, whereas continuous covariates were evaluated using one-way analysis of variance with eta-squared as the corresponding effect-size measure (Table S4 in S1 File). These analyses were treated as covariate-balance diagnostics rather than as a definitive statistical test of the independence assumption.
The exclusion restriction requires that dormitory-to-academic-building distance affect depressive and anxiety symptoms only through its effect on daily step count. Because this assumption cannot be directly tested statistically, its plausibility was evaluated on theoretical and contextual grounds [44]. In the campus setting, this distance primarily determines the amount of routine walking required to travel between dormitories and academic buildings. Accumulated daily walking was therefore considered the primary hypothesized pathway linking the instrument to depressive and anxiety symptoms. Similar distance-based measures have previously been used as instrumental variables to investigate the relationship between physical activity and mental health among university students [23]. We therefore considered the exclusion restriction plausible, while recognizing that the interpretation of the IV estimates remained conditional on this assumption. However, residual direct pathways, such as commuting-related reductions in study time, cannot be ruled out by the present analyses.
Dormitory-to-academic-building distances were measured using Amap, a digital mapping and navigation application widely used in China. A schematic representation of the campus layout and the relative locations of the dormitory and academic-building zones is shown in Fig 1. Dormitories were grouped into five zones (A–E), and the corresponding distances were calculated accordingly.
Contains information from OpenStreetMap and OpenStreetMap Foundation, which is made available under the Open Database License.
2.2.2. Statistical analysis using instrumental variable.
Data were analyzed using Python version 3.9.23, with statistical significance set at P < .05. To obtain IV-based estimates of the relationship between physical activity and mental health among university students, we applied an instrumental variable approach using two-stage least squares (2SLS). Average daily step count over the 14-day observation period was scaled in units of 1,000 steps/day and denoted as Avg_Daily_Steps.
In the first-stage regression (1), Avg_Daily_Steps was regressed on the IV and covariates:
(1)The first-stage model generated the predicted values of Avg_Daily_Steps. In the second-stage regression (2), the mental health outcome was regressed on the predicted values from the first stage and the same set of covariates:
(2)Separate models were fitted for PHQ-9 and GAD-7 scores. Under the standard instrumental variable assumptions, was interpreted as the estimated change in PHQ-9 or GAD-7 score associated with each additional 1,000 steps/day. Heteroskedasticity-robust standard errors and 95% confidence intervals were reported.
2.3. Dose-response analyses
2.3.1. Restricted cubic spline analysis.
RCS regression was used as the primary approach to characterize potential nonlinear associations between average daily step count and PHQ-9 and GAD-7 scores. Separate models were fitted for PHQ-9 and GAD-7.
Before model fitting, PHQ-9, GAD-7, and all non-categorical covariates were standardized using z-scores. Avg_Daily_Steps was log-transformed to reduce skewness and improve numerical stability. The models were adjusted for the same prespecified covariates used in the main analyses. After estimation, predicted symptom scores and step-count values were back-transformed to their original scales for interpretation.
The main RCS models used four knots at the 5th, 35th, 65th, and 95th percentiles of the exposure distribution, following commonly recommended percentile locations that balance model flexibility and stability [32]. To assess robustness to knot specification, sensitivity analyses were conducted using three knots at the 10th, 50th, and 90th percentiles and five knots at the 5th, 27.5th, 50th, 72.5th, and 95th percentiles (Fig S1 in S1 File). Adjusted marginal mean scores and pointwise 95% confidence intervals were estimated across the observed step-count range. The overall association was assessed using a joint F test of the spline terms, whereas nonlinearity was evaluated by comparing each RCS model with its corresponding adjusted linear model using a nested-model F test. The minimum of each fitted curve was reported as a model-derived threshold rather than as a definitive clinical threshold.
(3)Where denotes the standardized PHQ-9 or GAD-7 score for participant i, () represents the set of restricted cubic spline basis functions constructed from log-transformed Avg_Daily_Steps, and represents their corresponding coefficients. denotes the covariate vector, denotes the corresponding coefficient vector, and is the error term.
2.3.2. Varying Coefficient Network analysis.
As a secondary analysis, we additionally applied the VCNet, a neural-network method developed for continuous exposures [35], to characterize the dose-response relationship using a more flexible modeling approach. VCNet was used to estimate the average dose-response function (ADRF) relating Avg_Daily_Steps to PHQ-9 and GAD-7 scores while adjusting for the same prespecified covariates. The VCNet architecture is shown in Fig 2.
To facilitate direct comparison with the primary RCS analysis, VCNet used the same exposure transformation, outcome and covariate standardization, covariate set, and back-transformation procedure described above. VCNet was used to flexibly characterize covariate-adjusted, potentially nonlinear observational dose-response associations between Avg_Daily_Steps and PHQ-9 or GAD-7 scores.
(4)Where ⊆ denotes the subset of covariates used to model heterogeneity in the association between daily step count and symptom scores. To quantify uncertainty in the estimated ADRFs, we performed 200 participant-level bootstrap replicates. The VCNet model was then refitted for 500 epochs, and the ADRF was recalculated. Pointwise 95% percentile confidence intervals were obtained from the 2.5th and 97.5th percentiles of the bootstrap estimates at each step-count value. The estimated ADRFs and their confidence intervals were back-transformed to the original step-count and symptom-score scales. The step count corresponding to the minimum predicted score on each fitted curve was reported as the model-derived threshold. For the PHQ-9 analysis, parameter sensitivity was assessed by changing the weight-decay value from 0.005 to 0.0025 or 0.01 and by extending training from 500 to 1,000 epochs, while all other settings were held constant (Fig S1 in S1 File).
3. Results
3.1. Summary statistics
A total of 921 students participated in the study, of whom 127 were excluded according to the predefined screening criteria because they had fewer than 11 valid step-record days during the 14-day observation period. The final analytic sample comprised 794 participants. The final analytic sample of 794 participants substantially exceeded the minimum sample size of 114 estimated by the sample-size calculation (Table S6 in S1 File). Characteristics of participants included in and excluded from the final analysis are compared in Table S3 in S1 File. Kruskal–Wallis tests showed no significant between-group differences in PHQ-9 scores (H = 0.037, P = .847), GAD-7 scores (H = 0.44, P = .506), or mean step counts on observed valid days (H = 0.207, P = .649). Consistently, the corresponding absolute standardized mean differences (SMDs) were small (0.013, 0.093, and 0.069, respectively), indicating no potentially meaningful imbalance in these variables, whereas potentially meaningful differences were observed in grade composition, height, and dormitory floor. The marked difference in valid step-recording days was expected because this variable formed part of the eligibility criterion. Baseline demographic, clinical, and behavioral characteristics are summarized in Table 1. In the current sample, both PHQ-9 and GAD-7 showed excellent internal consistency, with Cronbach’s α values of 0.901 and 0.925, respectively (Table S1 in S1 File).
3.2. Instrumental variable estimation
Table 2 presents the 2SLS results for the relationship between average daily step count over the 14-day observation period and university students’ mental health. In these models, average daily step count was scaled in units of 1,000 steps/day. Model 1 examined the IV-based association of daily step count on depressive symptom severity, and Model 2 examined the corresponding association on anxiety symptom severity. After adjustment for observed covariates, each additional 1,000 steps/day was associated with lower PHQ-9 scores (β = −0.404; 95% CI, −0.502 to −0.306; P < .001) and lower GAD-7 scores (β = −0.708; 95% CI, −0.865 to −0.551; P < .001). The first-stage F-statistic was 51.23 (> 10 [commonly used threshold]), indicating the strength of the IV (Table S2 in S1 File). Covariate-balance diagnostics showed no evidence of meaningful imbalance in measured characteristics across the five dormitory-distance levels; all omnibus tests were nonsignificant, and the corresponding effect sizes were small (Table S4 in S1 File). Sensitivity analyses using stricter valid step-recording day thresholds (minimum 12, 13, and 14 valid days) yielded consistent IV estimates with the same direction and comparable effect sizes for both PHQ-9 and GAD-7 scores (Table S5 in S1 File).
3.3. Dose-response estimation using restricted cubic splines and VCNet
For depressive symptoms (Fig 3a and 3c), both RCS and VCNet produced U-shaped adjusted dose-response curves. The RCS model showed an overall association (P = .032) and evidence of nonlinearity (P = .040). The RCS curve reached its minimum at approximately 9,180 steps/day, with an adjusted PHQ-9 score of 3.69 (pointwise 95% CI, 3.32–4.06). VCNet estimated a model-derived threshold at approximately 10,204 steps/day, with an adjusted PHQ-9 score of 3.31 (pointwise 95% CI, 2.96–4.84). Across the alternative RCS knot specifications and VCNet parameter settings, the U-shaped PHQ-9 pattern was retained, with estimated thresholds ranging from 8,401–10,127 steps/day for RCS and from 9,295–10,204 steps/day for VCNet (Fig S1 in S1 File).
Panels (a, b) show RCS results for PHQ-9 and GAD-7, respectively; panels (c, d) show the corresponding VCNet results. Shaded bands indicate pointwise 95% confidence intervals. Dotted vertical lines indicate model-derived thresholds, defined as the step counts corresponding to the fitted curve minima. Histograms beneath each curve show the empirical distribution of average daily step counts in the main analytic sample (n = 794).
For anxiety symptoms (Fig 3b and 3d), the RCS curve reached its minimum at approximately 8,923 steps/day, with an adjusted GAD-7 score of 2.60 (pointwise 95% CI, 2.27–2.93). However, neither the overall association (P = .365) nor the nonlinear component (P = .264) was statistically significant. Therefore, this RCS-derived minimum was interpreted descriptively. VCNet produced a descriptively U-shaped curve, with a model-derived threshold at approximately 7,572 steps/day. The adjusted GAD-7 score at this point was 3.06 (pointwise 95% CI, 2.28–3.55). The histograms in Fig 3 show fewer observations below 4,000 and above 12,000 steps/day than in the central step-count range. Pointwise 95% confidence intervals widened in these regions, indicating greater uncertainty in the estimated associations.
Complete-case sensitivity analyses included 730 participants with all 14 valid step-recording days and required no linear interpolation (Fig S2 in S1 File). For PHQ-9, RCS and VCNet retained descriptively U-shaped curves, with model-derived thresholds at approximately 9,535 and 10,596 steps/day, respectively. For PHQ-9, the RCS test results were as follows: overall association (P = .094) and nonlinearity (P = .085). For GAD-7, neither the RCS overall association (P = .474) nor nonlinearity (P = .369) was statistically significant. The model-derived thresholds for GAD-7 were approximately 8,716 steps/day for RCS and 9,743 steps/day for VCNet, and were interpreted descriptively.
4. Discussion
This study examined the relationships between average daily step counts and depressive and anxiety symptoms among university students using 14-day step data, IV analysis, and nonlinear dose-response models. In the IV analysis, higher daily step counts were associated with lower PHQ-9 and GAD-7 scores. In the primary RCS analysis, the results suggested a possible nonlinear association with depressive symptoms: predicted PHQ-9 scores decreased with increasing daily step counts up to approximately 9,180 steps/day, after which the direction reversed and predicted scores increased. The secondary VCNet analysis showed a broadly similar U-shaped pattern, although the estimated minimum occurred at a somewhat different step-count level. For anxiety symptoms, RCS showed no statistically significant overall or nonlinear association, while VCNet suggested only a descriptive U-shaped pattern. These findings support a possible nonlinear relationship with depressive symptoms but do not establish definitive causality. To our knowledge, this was the first study to evaluate dormitory-to-academic-building distance as an IV in this context.
In the IV analysis, each additional 1,000 steps/day was associated with a 0.404-point decrease in PHQ-9 score and a 0.708-point decrease in GAD-7 score after adjustment for covariates. The instrument showed strong first-stage relevance, and measured covariates were generally balanced across the dormitory-distance levels. Administrative dormitory assignment further reduced the likelihood of self-selection according to activity preferences or mental health status. Nevertheless, these observations do not verify the independence or exclusion assumptions. Dormitory distance may also influence mental health through commuting burden, time pressure, sleep, or other pathways that were not measured in this study. The IV estimates should therefore be interpreted conditionally on the underlying assumptions rather than as definitive causal effects. The estimated differences per 1,000 steps/day were small in score units, and their statistical significance should be distinguished from clinical importance. For PHQ-9, the estimated difference was small relative to a 3-point change considered here as an illustrative benchmark. The IV coefficients represent model-based associations rather than demonstrated within-person improvements following a walking intervention. These estimates should not be interpreted as the walking dose needed for individual improvement or used to formulate clinical intervention recommendations. Their clinical relevance requires prospective evaluation. Building on earlier studies reporting negative associations between physical activity and symptom severity, the present study extended the existing literature both methodologically and empirically by applying an IV design to real-world step count data in a university setting [2,21,24]. A prospective adolescent cohort reported the lowest odds of mental health problems among participants reporting 30–59 minutes/day of moderate-intensity physical activity [25]. These findings concern activity intensity and duration, whereas daily step counts combine walking across different intensities and contexts. The possible U-shaped association in our study therefore motivates further investigation rather than defining a walking dose for symptom improvement. Importantly, objective measurement in this study applied to physical activity, whereas PHQ-9 and GAD-7 remained self-reported reference outcomes [36,37]; smartphone-derived step counts should therefore complement rather than replace established assessments. Their potential role in mental health screening requires further replication and clinical validation [17,20,21].
Although all three models adjust for measured covariates, the linear IV and nonlinear analyses serve different analytical purposes. The IV analysis uses a linear specification to estimate a single step-count coefficient, whereas RCS and VCNet explore potentially nonlinear patterns across step-count levels. The linear IV model does not capture the change in direction suggested by the fitted PHQ-9 curves, and its negative coefficient does not establish a uniformly decreasing relationship across the full step-count range. RCS and VCNet do not inherit IV-based identification and remain susceptible to unmeasured confounding. The IV analysis can address unmeasured confounding only if its identifying assumptions hold; its estimates may also be biased if unmeasured factors violate instrument independence or the exclusion restriction. The high-step upturn may also be influenced by unmeasured confounding. The IV estimates and nonlinear curves are therefore interpreted separately, rather than as mutually validating evidence.
Several physiological and psychosocial mechanisms may underlie this pattern. Moderate aerobic activity may regulate the hypothalamic-pituitary-adrenal axis, increase brain-derived neurotrophic factor, and improve inflammatory status [2], while walking may also benefit mood through attention, sensory processing, self-efficacy, and social interaction [45,46]. At higher activity levels, fatigue or insufficient recovery may contribute to physiological stress [47]. However, step counts alone cannot determine exercise intensity or establish an overtraining-like state, and the upward portion of the fitted curve should not be interpreted as evidence that walking above a specific step-count level is inherently harmful.
Among university students, higher step counts may partly reflect required campus travel and frequent movement associated with academic schedules, which may co-occur with stress, reduced rest, and insufficient sleep [28,48]. These factors provide plausible alternative explanations for the upward portion of the PHQ-9 curve, although the present study could not distinguish voluntary exercise from required campus mobility. Accordingly, the estimated minimum should be regarded as a model-derived feature indicating a possible nonlinear relationship rather than as a clinical threshold or step-count recommendation, and this pattern requires validation in future longitudinal and multicenter studies. For anxiety symptoms, RCS showed no significant overall or nonlinear association and VCNet only a descriptive U-shaped pattern, providing no consistent evidence of a nonlinear dose-response relationship.
Despite its methodological and empirical contributions, this study has several limitations. First, participants were recruited through convenience sampling from a single university, which may limit generalizability to more diverse populations. Because participation was voluntary, students who chose to participate may also have differed from nonparticipants in physical activity, mental health, smartphone use, or health awareness, resulting in potential selection bias. Although the characteristics of participants included in and excluded from the final analysis were compared (Table S3 in S1 File), unmeasured differences and residual confounding may remain. Second, despite strong instrument relevance and measured covariate balance, the independence and exclusion assumptions cannot be definitively verified, as dormitory distance may also affect mental health through commuting burden, time pressure, sleep, or social interaction. The IV estimates therefore remain conditional on these assumptions and may primarily apply to students whose activity was influenced by dormitory distance. Third, smartphone-derived step counts, although more objective than self-reported activity, depended on consistent phone carrying and enabled tracking and may therefore contain measurement error. Linear interpolation of short missing periods may also have smoothed abrupt day-to-day fluctuations in activity. Fourth, the 14-day observational window limited assessment of long-term trajectories and temporal direction, raising the possibility of reverse causality because depressive or anxiety symptoms may themselves influence daily activity. Fifth, PHQ-9 and GAD-7 scores were self-reported reference outcomes. Although both scales are widely used and demonstrated satisfactory internal consistency in the present sample (Table S1 in S1 File), responses may still be affected by recall bias, reporting bias, and self-presentation. Future studies should validate passive behavioral signals against clinician-administered assessments and longitudinal clinical outcomes before considering their use in screening. Finally, for depressive symptoms, differences in the model-derived threshold between RCS and VCNet and wider confidence intervals at the exposure extremes further indicate that these estimates are model-dependent and should not be treated as clinical thresholds.
In conclusion, this study found that higher daily step counts were associated with lower depressive and anxiety symptom severity in the IV analysis, conditional on the standard IV assumptions. The primary RCS analysis suggested a possible U-shaped relationship with depressive symptoms, with a broadly similar pattern observed in the secondary VCNet analysis, although the model-derived threshold differed. Evidence for a nonlinear relationship with anxiety symptoms was not consistent across the two methods. These findings extend previous research by examining IV-based associations and nonlinear dose-response patterns in parallel, while indicating that the observed model-derived threshold should not be interpreted as universal step-count targets. Overall, this study highlights the value of smartphone-derived step counts for characterizing real-world behavioral patterns related to mental health and provides a useful basis for future longitudinal and multicenter research.
References
- 1. Xiong P, Liu M, Liu B, Hall BJ. Trends in the incidence and DALYs of anxiety disorders at the global, regional, and national levels: estimates from the Global Burden of Disease Study 2019. J Affect Disord. 2022;297:83–93. pmid:34678404
- 2. Li W, Zhao Z, Chen D, Peng Y, Lu Z. Prevalence and associated factors of depression and anxiety symptoms among college students: a systematic review and meta-analysis. J Child Psychol Psychiatry. 2022;63(11):1222–30. pmid:35297041
- 3. Suresh K, Dar AA. Mental health of young adults pursuing higher education in Tier-1 cities of India: a cross-sectional study. Asian J Psychiatr. 2025;106:104447. pmid:40088751
- 4. Sivertsen B, Skogen JC, Petrie KJ, O’Connor RC, Knudsen AKS, Kirkøen B, et al. Mental health and suicidal ideation from 2010 to 2023 among university students: national repeated cross-sectional analysis. Br J Psychiatry. 2025;:1–9. pmid:41164982
- 5. Li B, Han S-S, Ye Y-P, Li Y-X, Meng S-Q, Feng S, et al. Cross sectional associations of physical activity and sleep with mental health among Chinese university students. Sci Rep. 2024;14(1):31614. pmid:39738254
- 6. Kerr DCR, Shaman J, Washburn IJ, Vuchinich S, Neppl TK, Capaldi DM, et al. Two longterm studies of seasonal variation in depressive symptoms among community participants. J Affect Disord. 2013;151(3):837–42. pmid:24075247
- 7. Loprinzi PD. Interrelationships between depression, exercise and subjective memory complaints. Rev Neurol (Paris). 2019;175(5):319–23. pmid:31027861
- 8. Mata J, Thompson RJ, Jaeggi SM, Buschkuehl M, Jonides J, Gotlib IH. Walk on the bright side: physical activity and affect in major depressive disorder. J Abnorm Psychol. 2012;121(2):297–308. pmid:21553939
- 9. Pei J, Amanvermez Y, Vigo D, Puyat J, Kessler RC, Mortier P, et al. Sociodemographic correlates of mental health treatment seeking among college students: a systematic review and meta-analysis. Psychiatr Serv. 2024;75(6):556–69. pmid:38291886
- 10. Ménard C, Hodes GE, Russo SJ. Pathogenesis of depression: Insights from human and rodent studies. Neuroscience. 2016;321:138–62. pmid:26037806
- 11. Pizzagalli DA. Depression, stress, and anhedonia: toward a synthesis and integrated model. Annu Rev Clin Psychol. 2014;10:393–423. pmid:24471371
- 12. Schuch FB, Vancampfort D, Firth J, Rosenbaum S, Ward PB, Silva ES, et al. Physical activity and incident depression: a meta-analysis of prospective cohort studies. Am J Psychiatry. 2018;175(7):631–48. pmid:29690792
- 13. Wanjau MN, Möller H, Haigh F, Milat A, Hayek R, Lucas P, et al. Physical activity and depression and anxiety disorders: a systematic review of reviews and assessment of causality. AJPM Focus. 2023;2(2):100074. pmid:37790636
- 14. Zhang Y, Folarin A, Ellis HL, Zhong R, Stewart C, Sankesara H. Physical activity trajectories preceding incident major depressive disorder diagnosis using consumer wearable devices in the All of Us Research Program: case-control study. arXiv. 2026.
- 15. Azevedo Da Silva M, Singh-Manoux A, Brunner EJ, Kaffashian S, Shipley MJ, Kivimäki M, et al. Bidirectional association between physical activity and symptoms of anxiety and depression: the Whitehall II study. Eur J Epidemiol. 2012;27(7):537–46. pmid:22623145
- 16. Tudor-Locke C, Craig CL, Brown WJ, Clemes SA, De Cocker K, Giles-Corti B, et al. How many steps/day are enough? For adults. Int J Behav Nutr Phys Act. 2011;8:79. pmid:21798015
- 17. Shen S, Qi W, Zeng J, Li S, Liu X, Zhu X, et al. Passive sensing for mental health monitoring using machine learning with wearables and smartphones: scoping review. J Med Internet Res. 2025;27:e77066. pmid:40811794
- 18. Gu B, Kim HS, Kim H, Yoo J-I. Advancements in wearable sensor technologies for health monitoring in terms of clinical applications, rehabilitation, and disease risk assessment: systematic review. JMIR Mhealth Uhealth. 2026;14:e76084. pmid:41511829
- 19. Bai Y, Liu Y, Zhang Y, Tolba A. Smartphone sensor-based depression detection in campus environments: a proof-of-concept study with small-sample behavioral analysis. Front Psychiatry. 2025;16:1468334. pmid:40852149
- 20. Huang J, Zhang Y, Zhou D, Li X, Li H, Lian B, et al. Leveraging low-cost app-based step count data to assess depression and anxiety in university students: a cross-sectional mobile health study. J Affect Disord. 2026;397:120880. pmid:41407112
- 21. Zhang Y, Stewart C, Ranjan Y, Conde P, Sankesara H, Rashid Z, et al. Large-scale digital phenotyping: identifying depression and anxiety indicators in a general UK population with over 10,000 participants. J Affect Disord. 2025;375:412–22. pmid:39892753
- 22. Švihrová R, Dei Rossi A, Marzorati D, Tzovara A, Faraci FD. Designing digital health interventions with causal inference and multi-armed bandits: a review. Front Digit Health. 2025;7:1435917. pmid:40538569
- 23. Zhu L, Xiong X, Li Z, Meng S, Zhai Y. The relationship between exercise habits and mental health among university students in China: a cross-sectional study based on instrumental variable analysis. BMC Public Health. 2024;24(1):3353. pmid:39623405
- 24. Bernard P, Doré I, Romain A-J, Hains-Monfette G, Kingsbury C, Sabiston C. Dose response association of objective physical activity with mental health in a representative national sample of adults: a cross-sectional study. PLoS One. 2018;13(10):e0204682. pmid:30356252
- 25. Zhang Y, Wang Z, Zhang R, Wang Y, Yang J, Wang F, et al. Non-linear dose-response association between physical activity and mental health in adolescents: a prospective cohort study based on SEARCH. Int J Behav Nutr Phys Act. 2025;22(1):146. pmid:41267100
- 26. Puterman E, Weiss J, Beauchamp MR, Mogle J, Almeida DM. Physical activity and negative affective reactivity in daily life. Health Psychol. 2017;36(12):1186–94. pmid:29016149
- 27. Liao B, Xu Y, Li X, Li J. Association between campus walkability and affective walking experience, and the mediating role of walking attitude. Int J Environ Res Public Health. 2022;19(21):14519. pmid:36361398
- 28. Xu L, Yan W, Hua G, He Z, Wu C, Hao M. Effects of physical activity on sleep quality among university students: chain mediation between rumination and depression levels. BMC Psychiatry. 2025;25(1):7. pmid:39748322
- 29. Jung G, Park S, Ma E-Y, Kim H, Lee U. Tutorial on matching-based causal analysis of human behaviors using smartphone sensor data. ACM Comput Surv. 2024;56(9):1–33.
- 30. Stock JH, Trebbi F. Retrospectives: who invented instrumental variable regression? J Econ Perspect. 2003;17(3):177–94.
- 31.
Hartford J, Lewis G, Leyton-Brown K, Taddy M. Deep IV: a flexible approach for counterfactual prediction. In: Proceedings of the 34th International Conference on Machine Learning; 2017. pp. 1414–23. Available from: https://proceedings.mlr.press/v70/hartford17a.html
- 32. Desquilbet L, Mariotti F. Dose-response analyses using restricted cubic spline functions in public health research. Stat Med. 2010;29(9):1037–57. pmid:20087875
- 33. Shalit U, Johansson FD, Sontag D. Estimating individual treatment effect: generalization bounds and algorithms. arXiv. 2016.
- 34. Assaad S, Zeng S, Tao C, Datta S, Mehta N, Henao R. Counterfactual representation learning with balancing weights. arXiv. 2020.
- 35. Nie L, Ye M, Liu Q, Nicolae D. VCNet and functional targeted regularization for learning causal effects of continuous treatments. arXiv. 2021.
- 36. Kroenke K, Spitzer RL, Williams JB. The PHQ-9: validity of a brief depression severity measure. J Gen Intern Med. 2001;16(9):606–13. pmid:11556941
- 37. Spitzer RL, Kroenke K, Williams JBW, Löwe B. A brief measure for assessing generalized anxiety disorder: the GAD-7. Arch Intern Med. 2006;166(10):1092–7. pmid:16717171
- 38. Cronbach LJ. Coefficient alpha and the internal structure of tests. Psychometrika. 1951;16(3):297–334.
- 39. Hilden P, Schwartz JE, Pascual C, Diaz KM, Goldsmith J. How many days are needed? Measurement reliability of wearable device data to assess physical activity. PLoS One. 2023;18(2):e0282162. pmid:36827427
- 40. Tackney MS, Cook DG, Stahl D, Ismail K, Williamson E, Carpenter J. A framework for handling missing accelerometer outcome data in trials. Trials. 2021;22(1):379. pmid:34090494
- 41. Weed L, Lok R, Chawra D, Zeitzer J. The impact of missing data and imputation methods on the analysis of 24-hour activity patterns. Clocks Sleep. 2022;4(4):497–507.
- 42.
Huang B, Fan W, Zhu Y. Causal inference: applications in education and other social sciences. Beijing: Educational Science Publishing House; 2022. pp. 214–68.
- 43. Steigerwald DG, Vagnoni RJ. Identifying a source of financial volatility. In: Andrews DWK, Stock JH, editors. Identification and inference for econometric models: essays in honor of Thomas Rothenberg. Cambridge: Cambridge University Press; 2005. pp. 121–46.
- 44. Hernán MA, Robins JM. Instruments for causal inference: an epidemiologist’s dream? Epidemiology. 2006;17(4):360–72. pmid:16755261
- 45. Cao L, Händel B. Walking enhances peripheral visual processing in humans. PLoS Biol. 2019;17(10):e3000511. pmid:31603894
- 46. Peluso MAM, Guerra de Andrade LHS. Physical activity and mental health: the association between exercise and mood. Clinics (Sao Paulo). 2005;60(1):61–70. pmid:15838583
- 47. Kreher JB, Schwartz JB. Overtraining syndrome: a practical guide. Sports Health. 2012;4(2):128–38. pmid:23016079
- 48. Zhang Y, Folarin AA, Sun S, Cummins N, Bendayan R, Ranjan Y, et al. Relationship between major depression symptom severity and sleep collected using a wristband wearable device: multicenter longitudinal observational study. JMIR Mhealth Uhealth. 2021;9(4):e24604. pmid:33843591