Introduction

Digital technology has transformed the way people live, work, and interact with the world. In 2022, the number of global smartphone users is estimated to be 6.6 billion people1, which accounts for an adoption rate of over 82 percent of the world population2. While the widespread use of digital technology has many benefits, such as instant access to information and communication, the large-scale use raises concerns about its potential impact on people’s mental health, particularly on the mental health of young people3. A study in 2020 from the UK reported that the participants had an average of 7.2 (±3.8) h of screen time per day, which was higher in younger adults aged below 34 years (8.8 ± 3.7 h per day) compared to those aged 65 years or above (5.2 ± 2.9 h per day)4. Such increased use of digital devices calls for in-depth research on its impact on young adult’s mental health. Current studies tend to focus on teenagers, with less attention to emerging adults3,5,6,7,8. Emerging adults are at a crucial life transition, dealing with changes from school to work and complex romantic relationships, making the study of their mental health and social adaptation a key issue9. Frequent use of digital devices can affect their attention, perceived pressure, and social skills, thus impacting their overall well-being10,11,12,13.

Current findings on digital use and well-being present a complex picture, showing both positive and negative impacts, with ongoing debates about the extent of these effects14. Some research claimed that digital use had a significantly negative effect on people’s well-being, increasing unhappiness15, depression16,17, anxiety6, loneliness18, and suicide risk factors19. Conversely, other investigations suggest no significant association between social media and depression20 or other negative outcomes21, and some even report digital use as a mitigator of loneliness22. Because these disparate findings may be due to the different uses of digital technology, researchers introduced a categorization of digital usage into active and passive modes23,24, suggesting active use might be beneficial while passive use could harm well-being. However, this classification has been critiqued for oversimplifying the complex nature of this relationship23. A significant challenge lies in empirically and conceptually distinguishing whether specific digital engagements constitute active or passive usage25, as definitions vary among researchers26,27,28. To resolve these contradictions and enhance the consistency and comparability of research, a more definitive and universally accepted classification system is needed25. A promising approach is to categorize digital use into private (one-to-one communication, the direct communication between two individuals who engage in reciprocal interaction) and public (one-to-many communication, the communication other than direct two-way interaction) usage29. This method focuses on the target and scope of communication, offering a clearer, objective framework for analyzing digital media’s specific impacts, moving beyond subjective interpretations associated with the active/passive usage dichotomy.

The ongoing debate about the effects of digital usage on mental health also involves the issue that time devoted to digital media potentially reduces time allocated for activities like face-to-face interactions, physical exercise, or adequate sleep, which have positive effects on mental health and well-being30. This so-called displacement hypothesis31,32 is still controversial, however. Some studies support it, with the results that excessive digital media use, especially social media and gaming, can reduce face-to-face social interactions33 and physical exercise34. Other studies suggest that digital media can help to maintain relationships and promote interpersonal interactions, rather than simply displacing them35,36. The potential source of these inconsistencies in the results is the lack of adequate measurement methods or the design to record both digital use and other parts of life activities to see their interactions29. To investigate the evidence for the displacement effect and the specific impacts of digital use, it’s crucial to examine activities beyond digital engagement, such as face-to-face communication. Another concern came from the substantial cross-sectional designs in previous studies. To gain a more precise conclusion, more sophisticated methodologies such as the experience sampling method (ESM), a technique that allows us to record psychological states in everyday life situations37,38, should be considered. This method enables a comprehensive analysis and comparison of the cumulative daily ‘within digital use’ and ‘without digital use’, providing deep insights into the complex effects of digital use on mental health, including displacement hypothesis mechanisms.

Taken together, to understand how digital use differentially affects mental health, we adopted an ESM design with a once-per-day report over 21 days to record both daily digital use and in-person offline activities. We selected the well-known and dynamically changing measures of happiness and loneliness to respectively assess well-being and ill-being, instead of more stable variables like life satisfaction32,39. We analyzed the data with traditional multilevel models40 and advanced network analysis41,42. This network analysis allowed us to explore the relationships between more than three variables over an extended period42, gaining a more comprehensive understanding of how social media usage interacts with offline activities and impacts well-being. We preregistered a series of hypotheses for this ESM study (see https://osf.io/ywcs9). Although this paper focuses on select hypotheses for brevity and clarity, additional hypotheses will be explored in future research. The hypotheses under investigation in the current study are as follows:

  1. 1.

    One-to-one online communications promote mental health while one-to-many decrease it. Specifically, one-to-many online communications may lack sufficient social support, potentially increasing loneliness, while one-to-one online communications can provide some emotional support, likely having little to no effect on loneliness. For happiness, which depends on deeper connections, one-to-one communications may have a positive effect, whereas one-to-many communications are likely to have minimal impact.

  2. 2.

    The effects of digital use on mental health are smaller compared to face-to-face offline communications. Face-to-face communications are expected to be more effective in promoting happiness and reducing loneliness by providing direct social support and fulfilling deeper emotional needs.

  3. 3.

    The competing time between digital and offline communications can indirectly influence mental health, with face-to-face communication potentially mediating the impact of digital use. This mediation effect may be more pronounced for loneliness, as one-to-many online communications in digital use may reduce opportunities for face-to-face support, with smaller impacts on happiness.

Results

Descriptive statistics

We provided the basic demographic information in Tables 1 and 2 (For the comparison among genders, see Supplementary Fig. 1). A strong correlation between the number of close friends reported in the demographic survey and the final survey (r = 0.77, p < 0.001) confirmed the validity of participants’ responses. For all ESM variables we included in the analysis, the day-level correlation analysis showed that these variables of time spent in different activities had a low correlation with each other (|r | < 0.3) (see Supplementary Table 1).

Table 1 Comparison of demographic variables
Table 2 Correlation of demographic variables and daily mood

H1: One-to-one online communications promote mental health while one-to-many decrease it

We conducted the linear mixed model (LMM) to compare the exact effects of the different activities, which included the variables of communications such as “one-to-many (1toM)-online (public),” “one-to-one (1to1)-online (private),” “one-to-one(1to1)-offline,” and the non-communicative variables such as “game,” and “movie” (see Fig. 1 and Supplementary Table 2). The results showed that 1toM-online had a significant but small association with loneliness (standardize β = 0.026, 95% CI = 0.003, 0.049, Cohen’s D = 0.051, p < 0.05). However, it is also worth noting that 1to1-online (standardize β = 0.040, 95% CI = 0.018, 0.062, Cohen’s D = 0.082, p < 0.001) and movie (standardize β = 0.059, 95% CI = 0.035, 0.083, Cohen’s D = 0.111, p < 0.001) had significant small effects on happiness in a positive direction, while the effects on loneliness did not reach statistical significance in a negative direction. These results highlight the fact that different forms of digital use have distinct effects on well-being depending on their specific characteristics. This supports our H1.

Fig. 1: Linear mixed model results of loneliness and happiness.
figure 1

A showed the effect size of different activities on loneliness and B showed that on happiness. The same kind of activity was represented by the same color and arranged according to size. The value presented each effect size. “*“ signified that p < 0.05, “**“ meant that p < 0.01, and “***“ implied that p < 0.001.

H2: The effects of digital use on mental health are smaller compared to face-to-face offline communications

To clarify the exact effect size of digital use, we compared the impact of four types of digital device use (1toM-online (public), 1to1-online (private), game, movie), and face-to-face communication. The results of LMMs showed that 1to1-offline had a much greater impact on both happiness (standardize β = −0.215, 95% CI = −0.236, −0.195, Cohen’s D = −0.478, p < 0.001) and loneliness (standardize β = 0.268, 95% CI = 0.246, 289, Cohen’s D = 0.572, p < 0.001) than any of digital use (see Fig. 1). When controlled for “age,” “educational level,” and “relationship status” as covariate variables, these results remained unchanged (see Supplementary Tables 2 and 3). Therefore, this result supports our H2.

H3: The competing time between digital and offline communication can indirectly influence mental health

The existing results may not adequately explain the inconsistencies in the results of previous studies, and some deeper reasons need to be further considered. Thus, we tested the time displacement hypothesis: digital use can influence well-being through an indirect pathway by reducing offline communication time. We first constructed a simple LMM with 1to1-offline communication time as the outcome variable and day order as a control variable. The result showed that all types of digital use had a negative effect on 1to1-offline communication time (standardize β: 1to1-online = −0.072, 1toM-online = −0.115, game = −0.091, movie = −0.141, details see Supplementary Table 4). When considering all variables of digital use together, the aggregated variable also showed a strong negative influence on 1to1-offline communication time (standardized β = −0.238, 95% CI = −0.263, −0.213, Cohen’s D = −0.437, p < 0.001).

We then constructed a multilevel mediation model (indirect path: “total digital use” (X) ==> “1to1-offline” (M) ==> “loneliness” (Y)) with several covariates such as “day”, “age”, “gender” and others (see Fig. 2 and Supplementary Table 5). The analysis revealed a significant indirect effect, and the indirect effect can account for almost two-thirds of the total effect (indirect effect: 0.034 ± 0.003, p < 0.001, direct effect: 0.019 ± 0.008, p = 0.013, total effect: 0.053 ± 0.008, p < 0.001). Given the high proportion of time spent on 1toM-online communication in digital use (48.67%), we conducted a second multilevel mediation model (indirect path: “1toM-online” (X) ==> “1to1-offline” (M) ==> “loneliness” (Y)). This also showed a significant indirect effect (indirect effect: 0.032 ± 0.004, p < 0.001, direct effect: 0.028 ± 0.013, p = 0.034, total effect: 0.061 ± 0.014, p < 0.001), indicating that 1to1-offline communication time partially mediates the relationship between 1toM-online and loneliness. Similar mediation models were conducted for happiness (see Supplementary Table 6), revealing significant indirect effects in both total digital use and 1-to-many online communication.

Fig. 2: The results of the multilevel mediation models.
figure 2

The mediating variable was 1to1- offline communication, and the dependent variable was loneliness. The independent variable in (A) was the total duration of all digital use and in (B) was the “1toM-online”. The value presented each effect size. “*“ signified that p < 0.05, “**“ meant that p < 0.01, and “***“ implied that p < 0.001.

Together, these findings provided evidence for our H3 that competing with offline communication time is likely a main path through which digital use negatively affects people’s mental health. This indirect effect is evident, particularly regarding 1toM-online communication.

Analysis with network models

The mediation analysis, while revealing key insights, has limitations in fully capturing the unique and direct/indirect effects of digital device use on well-being, due to its inability to examine interrelationships among multiple variables. To address this and confirm previous findings, we employed multilevel vector autoregression (mlVAR) analysis, incorporating all variables into network models for a comprehensive investigation. We limited our analysis to 101 participants who provided complete responses for the 21-day period, as this approach requires a sufficient number (>20) of individual data points.

Several tests were conducted to check the assumptions of the network analysis41. Kolmogorov–Smirnov tests indicated that no variable was normally distributed (p < 0.001). Within-person mean levels were normally distributed for 1toM-online, happiness, and loneliness (p > 0.05), but not for the game (p < 0.001), 1to1-online (p < 0.001), movie (p < 0.01), and 1to1-offline (p < 0.05). Kwiatkowski–Phillips–Schmidt–Shin unit root tests suggested stationary data for all variables in all participants43. These results have all undergone Bonferroni correction, and suggest the mlVAR analysis was applicable.

Our analysis generated three figures depicting between-person relations, within-person contemporaneous relations, and within-person temporal relations at a specific lag of 1 (see Fig. 3), and revealed several key findings:

Fig. 3: The results of network analysis (multilevel vector autoregression) (N = 101).
figure 3

A showed an undirected network revealing within-person same-day (contemporaneous) relationships among variables, B provided a directed temporal network revealing within-person time-lagged (t = 1, previous day) relationships among variables, and C represented an undirected between-person network identifying variables that fluctuate at the between-person level. Only relationships that reach significance (p < 0.05) were shown. The value showed the specific effect size of relationships. The green line indicated a positive relationship, while the red line indicated a negative one.

Within-person contemporaneous relations

Negative correlations were found between various forms of digital use and one-to-one offline communication (Fig. 3A), aligning with LMM outcomes and supporting the hypothesis of online-offline time competition (see Supplementary Table 4). The 1to1-offline variable was strongly correlated with loneliness (r = −0.17) and happiness (r = 0.19), consistent with LMM findings that 1to1-offline has a larger effect on mental health than digital use.

Time-lagged (t = 1) relations

Positive auto-correlations were observed for loneliness, happiness, gaming, movie watching, and one-to-many online communication (Fig. 3B), indicating the persistence of these states or behaviors across days.

Between-person relations

This highlighted relationships at the level of individual differences (Fig. 3C), showing correlations between game and movie use, and between various forms of communication. Notably, happiness and loneliness had a strong negative correlation.

To ensure robustness, we replicated these analyses using the full dataset (n = 418), confirming the findings’ reliability (see Supplementary Fig. 2). Overall, the significant negative correlation between digital use duration and offline communication underscores a time competition between these variables. The network analysis results corroborate findings from LMM and mediation analyses, providing additional evidence for H3 of the competitive relationship between digital and offline activities in affecting well-being.

Exploratory analysis of potential influencing factors

We explored several potential influencing factors on our results. First, we examined the relationship between distance in communication. We conducted a daily interaction analysis, which included detailed communication variables such as “1toM-online”, “1to1-online-distant”, “1to1-online-close”, “1to1-offline-distant”, “1to1-offline-close”, as well as non-communicative variables like “game” and “movie” (see Supplementary Tables 7 and 8). Our findings revealed a positive effect of close online communication on happiness. Second, we analyzed the impact of gender. We performed LMM analysis and network analysis on both genders, highlighting more significant potential harm among females (see Supplementary Tables 914 and Supplementary Figs. 3 and 4). Lastly, we explored the association between communication time and relational mobility. The findings revealed opposite patterns for different genders, which may explain the gender differences in communication patterns across various modes of communication (see Supplementary Table 15).

Discussion

The potential influence of digital use on mental health has attracted intense attention in the research community5,7. Researchers have been asking why the results of the relevant studies are inconsistent and whether there is a theory to explain this contradiction. Given that the recent studies often suffer from effects of aggregating variables and are limited to cross-sectional analysis44, we used a more fine-grained and temporally-resolved study design, a 21-day ESM experiment, to examine the specific impacts of digital use and how they affect daily happiness and loneliness. Our findings support our hypotheses: One-to-one online communications promotes happiness while one-to-many increases loneliness (H1), digital use has smaller effects on happiness and loneliness compared to offline communication (H2), and competition with offline communication time partially explains the negative impact of digital use (H3). Additionally, our results suggest a small but direct negative impact of one-to-many online communication.

Firstly, our findings reveal the varying effects of different digital communication types. One-to-one online communication promotes happiness, while one-to-many online communication increases loneliness (see Fig. 1). The varying effects of different communication types can be explained by the different interactive nature of such interactions with distinct audiences24. One-to-one online communication, offering tailored messages and active engagement, increases happiness by providing social support45. In contrast, one-to-many communication, generally passive and broad, increases loneliness as it lacks mutual concern and positive interaction between these audiences46. This aligns with prior research suggesting passive digital engagement harms well-being, while active engagement enhances it47,48, demonstrating the effectiveness of our method of differentiation of communication types. The traditional active/passive categorization, applied to all electronic device use and based on subjective assessment, sometimes yields ambiguous results25. Our approach, while bearing similarities to the traditional active/passive distinction, uniquely focuses on communication modes by differentiating one-to-one (private) from one-to-many (public) interactions, thereby providing a more objective criterion29. Additionally, our study employs objective measures of social media screen time, potentially helping to reduce the inconsistency of research results.

Secondly, our findings show that digital use has a significantly smaller impact on happiness and loneliness compared to offline communication (see Fig. 1). Since there is only finite time in each day, it is reasonable to propose a time competition between digital engagement and offline communication, similar to the time displacement hypothesis, which states that time devoted to digital media potentially reduces time allocated for potentially more beneficial activities like face-to-face interactions49. Previous ESM studies with shorter intervals yielded inconclusive results, while longer intervals might be better to observe more reliable displacement effects by reducing the noise of the measurements. Our results confirmed this hypothesis (see Fig. 2), suggesting that allocating more time to digital activities reduces offline interactions33,34,50,51, potentially affecting overall well-being. While certain forms of digital use may have direct effects on well-being, the indirect effects, such as reducing the significant benefit of offline communication, provide a possible explanation for the contradictions of the effects of digital use in social communication.

Furthermore, to control for the aforementioned multivariate relationships, we employed a novel mlVAR analysis and compared its results with those from traditional approaches. The consistent findings from both analyses (see Figs. 1 and 3, and Supplementary Table 4) demonstrate the effectiveness of the network analysis. Specifically, the network analysis offers valuable insights by revealing complex and dynamic relationships among multiple variables of different activities42. In our case, the direct relationships between the variables of digital use and happiness/loneliness are actually scarce whereas the relationships between offline communication and happiness/loneliness are dense. Furthermore, offline communication and the different variables of digital use also form clear patterns of negative relationships. This further corroborates the findings of indirect effects of digital use on well-being, which were obtained with more traditional analysis methods such as LMM and mediation analyses in our study. Previous studies on well-being using similar networks mainly focused on the interplay of symptoms and examined various aspects of well-being52, often considering only physical activities53 or digital use41. In contrast, our study adopts a more comprehensive approach by integrating a wide spectrum of digital activities, offline interactions, and mental health variables. This allows us to gain a holistic understanding of the intricate multivariate relationships of the different events in everyday life, especially in both online and offline worlds of our life.

Specifically, our research brings attention to the impact of 1toM-online communication on female mental health. The results indicate that 1toM-online is strongly linked with decreased happiness and increased loneliness among female users (See Supplementary Tables 11 and 12, and Supplementary Figs. (3 and 4). Given the increasing prevalence of social media usage in recent years, these findings are especially concerning as they suggest a potential disproportionate harm to the mental health and well-being of female users. The potentially harmful effects of 1toM-online on females may be attributed to several factors, including social comparison and self-presentation concerns20,54,55. Females may be more likely to compare themselves to others on social media and experience negative emotions as a result, leading to increased loneliness and decreased happiness56,57. Moreover, the pressure to present oneself in a positive light on social media may also contribute to negative psychological outcomes, particularly for females who may face greater scrutiny and criticism of their appearance and behavior58. To address these concerns, targeted interventions may be needed to mitigate the negative impact of digital technology on mental health, particularly among female users59.

Finally, our study on Japanese youth adds valuable insight to digital media use and well-being research, which have primarily focused on WEIRD cultures, thus addressing a bias in the literature. However, Japanese young adults may exhibit unique patterns, as over 18% (n = 78) reported no offline interaction for more than half of our 21-day study, highlighting cultural differences and the need for more cross-cultural research. Our focus on young adults, excluding adolescents, necessitates caution in generalizing findings across age groups. Additionally, the study duration was just sufficient for mlVAR analysis, with longer periods likely yielding more robust results. We also did not document if online communication aimed at offline meetings or harmful content such as cyber-bullying. These limitations highlight areas for future research but do not undermine the validity of our findings.

In all, our study provides a comprehensive understanding of the nuanced effects of digital use on mental health. We found that the overall effect is small but varies by types of communication. Key findings include the indirect impact of digital use on mental health through reduced offline communication, and the notable negative effects of one-to-many (public) online interactions, which dominate most digital use. This research provides crucial insights for promoting healthier digital habits among the young, informing educators and policymakers about specific digital behaviors and their mental health implications.

Methods

Ethics information

This study was approved by the Institute of Physical and Chemical Research in Japan (RIKEN). The experiment was conducted in accordance with the Declaration of Helsinki and the guidelines of the local institute (RIKEN) where the study took place. Informed consent was obtained from all participants consistent with the Declaration of Helsinki and the methods were carried out in accordance with the approved guidelines. No harmful procedures were used and data collection was anonymous. Participants could withdraw from the study at any time without penalty. All participants took part on a voluntary basis.

Pilot study

As mentioned in our pre-registration, a pilot study was conducted with 46 participants to confirm that the 21-day continuous recording was feasible. We got 905 complete responses in total (93.69% of the total signals). We excluded participants whose response days were less than 70% of the total experimental duration, resulting in 43 valid participants. No other analyses were conducted on the pilot data before pre-registration, and subsequent analyses were conducted on all data after the completion of the experiment.

Participants

The main study was conducted from October 2022 to February 2023. All participants were recruited through a Japanese website (https://www.jikken-baito.com/), which was designed to post recruitment advertisements for psychological experiments. Based on pilot responses and power analyses, we recruited a total of 418 valid participants (43 from the pilot and 375 from the main experiment) with a gender distribution of 179 males (age = 23.18 ± 3.39 years) and 235 females (age = 24.81 ± 5.42 years). These participants are drawn from diverse regions across Japan and can serve as representative samples of the country’s youth. Participants completed a minimum of 70% of the responses (mean response day = 20.69, median = 21). For the analysis, we excluded responses where the screen use time was less than the total time spent communicating online with close and distant individuals. Finally, we included 7508 valid responses from 418 participants (with a median of 19 response days and a maximum of 21 days) in the analysis.

Procedure

We utilized an online Japanese questionnaire service called EXKUMA (https://exkuma.com/) to collect ESM data and demographic data. Once a questionnaire was set up on the website of the service, it will provide a dedicated link to allow participants to register. Participants received three links in total for three phases of the experiment, namely the demographic survey, the daily ESM survey, and the final survey. The participants were required to register with the same email address for all phases of the experiment. The demographic phase and final phase were performed in single sessions, and participants could complete them directly after the registration. As for the ESM phase, participants were assigned a specific number upon registration and were instructed to send this number to the lab channel on LINE, a commonly used communication application in Japan. The signals were then sent to participants automatically from the lab channel chat box on LINE through EXKUMA, and no other unnecessary apps were required to be installed by participants. Signals were sent once a day at 9:00 pm for three consecutive weeks (21 days). Participants were asked to report their daily activities and daily mood before they went to bed every night. After 2:00 am, the link for last night would become invalid and the participants would not be able to report. Participants received ¥3000 Amazon gift cards for answering at least 70% of daily signals and finishing the demographic survey phase and the final survey phase.

Measures

During this ESM recording phase (21 days), the participants responded to 18 questions each evening (see Table 3). For more information, you can preview the survey via: https://exkuma.com/preview/OTI4LTE1N2I1Nw/.

Table 3 Daily ESM survey

During the demographic survey conducted prior to the daily ESM phase, participants were required to provide some demographic information60,61, which include age, gender, education, area of residence, employment status, income, cohabitants, physical health, scores of loneliness, time spent outside each day, number of close friends, preference of communication, and the relational mobility scores62,63 for both online communication and offline communication (see Table 4). For more information, you can preview the survey via: https://exkuma.com/preview/OTUzLWYzNjU1Zg/.

Table 4 Specific definitions and measurements of demographic variables

After daily ESM phase, we asked them to report their physical health, loneliness, number of close friends, and significant events64 during this final period of the experiment. For more information, you can preview the survey via: https://exkuma.com/preview/OTU0LTI4MWU0Mw/.

Categories of questions in daily ESM

To assess participants’ engagement in various digital activities, we requested participants to report the amount of time spent in each of the following activities: watching television (including movies and other videos), playing video games (on PC, Xbox, Switch, PS, etc.), using social media applications (such as LINE, Instagram, Twitter, etc.)65, as well as the duration of online communication with closely connected and distantly connected individuals.

For online communication, we also required the subjects to report the number of people with whom they had such communications on that day and the overall feeling of that communications66. Participants were asked to respond on a sliding scale from 0 (“cold”) to 6 (“warm”). If participants did not report themselves engaging in a particular type of communication on a given day, they would not be asked to provide quality ratings for those interactions, and the time spent would be automatically recorded as 0.

Similar to online communication, offline communication was divided into two types: communications with closely connected and communications with distantly connected individuals. For each type of communication, participants were asked to report the number of people they communicated with on that day, the total time they spent on that specific type of communication, and their overall feelings about those interactions. Also, if participants reported no specific type of offline communication on a given day, no quality of such interactions would be asked and the time spent would be automatically recorded as 0.

Every day, the participants were also required to report their free time, which was defined as the time they had free control and did not have communications with others on that day67.

Due to limitations in the number of questions, we have chosen to measure well-being and ill-being primarily through the assessment of “happiness” and “loneliness.” We measured loneliness by asking participants the question “How lonely did you feel today?” The participants answered the question by moving the slide from 0 (not at all lonely) to 6 (very lonely)31. We also measured happiness by asking the participants the question “How happy did you feel today?” The participants answered the question by moving the slide from 0 (very unhappy) to 6 (very happy)47.

Statistical analysis

We conducted the analyses to test our hypotheses following the methods outlined in the pre-registration.

The initial processing steps, such as signal checking and preprocessing, were carried out using MATLAB (Version: 2021a), while all other analyses were performed using R (version: 4.2.2). We checked the validity and plausibility of the data and removed signals with total online communication time less than online social applications time. Participants with less than 30% valid signals were then removed68.

To facilitate further calculations, we established and computed the duration of daily activities using the following definition. Social digital application usage includes both one-to-one direct online communication (1to1-online) and one-to-many non-direct communication (1toM-online) (see Fig. 4), such as commenting or liking posts on Instagram. Therefore, we calculated the online one-to-many time (1toM-online) by subtracting total social app usage time from online one-to-one close time (1to1-online-close) and online one-to-one distant time (1to1-online-distant). Offline communication time (1to1-offline) was defined as the sum of all offline communication time, including offline one-to-one close communication (1to1-offline-close) and offline one-to-one distant communication (1to1-offline-distant).

$$1{\rm{to}}1\_{\rm{online}}=1{\rm{to}}1\_{\rm{online}}\_{\rm{close}}+\,1{\rm{to}}1\_{\rm{online}}\_{\rm{distant}}$$
(1)
$$1{\rm{to}}1\_{\rm{offline}}=1{\rm{to}}1\_{\rm{offline}}\_{\rm{close}}+\,1{\rm{to}}1\_{\rm{offline}}\_{\rm{distant}}$$
(2)
$$1{\rm{toM}}\_{\rm{online}}={\rm{social}}\; {\rm{media}}\; {\rm{applications}}-\,1{\rm{to}}1\_{\rm{online}}$$
(3)
Fig. 4: Experimental design flowchart.
figure 4

A showed the main daily variables recorded and B showed the recording frequency and overall duration of the study.

To accommodate the nested nature of the ESM data, we mainly used multilevel models69 to test the relationship between different digital activities with daily mood (happiness and loneliness). We mainly used R to build mixed linear models with measurement occasions (level 1) nested within persons (level 2), using the “lme4” Package70. “apaTables71 Package was used to describe the variables results and “EMAtools72 Package were used to describe the models.

To compare the impact of different variables on well-being, we used more complex linear mixed-effect models with multiple fixed effects predictors, such as time spent on different digital activities, and one random intercept (q = 1) for each subject.

Taking loneliness as an example:

Level 1 (within person):

$$\begin{array}{l}{Y}_{{ti}}=\,{\beta }_{0i}+{\beta }_{1i}* 1{to}1{\rm{\_}}{offline}+{\beta }_{2i}* 1{to}1{\rm{\_}}{online}\\\qquad+{\beta }_{3i}* 1{toM}{\rm{\_}}{online}+{\beta }_{4i}* {game}+{\beta }_{5i}* {movie}+{\beta }_{6i}* {day}+{\varepsilon }_{{ti}};\end{array}$$
(4)

Level 2 (between persons):

$${\beta }_{0i}={\gamma }_{00}+{\gamma }_{01}* {Age}+{\gamma }_{02}* {Education}+{\gamma }_{03}* {Relationship}+{\mu }_{0i};$$
(5)
$${\beta }_{1i}={\gamma }_{10}+{\mu }_{1i};$$
(6)
$${\beta }_{2i}={\gamma }_{20}+{\mu }_{2i};$$
(7)
$${\beta }_{3i}={\gamma }_{30}+{\mu }_{3i};$$
(8)
$${\beta }_{4i}={\gamma }_{40}+{\mu }_{4i};$$
(9)
$${\beta }_{5i}={\gamma }_{50}+{\mu }_{5i};$$
(10)
$${\beta }_{6i}={\gamma }_{60}+{\mu }_{6i};$$
(11)

Fixed vs. random models were compared to see if random models explain additional variance compared to fixed models. Although the random model provided a significant improvement compared to the fixed model, the model itself revealed a singular fit. Thus, only random residual was taken into the final models40,69. We also built similar models using offline communication as an outcome to check the competition between digital activities and offline communication.

To test the potential pathway of digital activities on well-being, we used multilevel vector autoregressive (mlVAR) models to isolate within- and between-person relationships among multiple variables41. The mlVAR models allow for simultaneous evaluations of reciprocal linkages between dynamic processes and individual differences. Using Package “mlVAR” based on R42, we generated three networks describing the relationships among different variables: (1) a directed temporal network revealing within-person time-lagged (previous day) relationships among variables, (2) an undirected network revealing within-person same-day (contemporaneous) relationships among variables, and (3) an undirected between-person network identifying variables that fluctuate at the between-person level. Before the network analysis, Kolmogorov–Smirnov tests and Kwiatkowski–Phillips–Schmidt–Shin tests were conducted to check the assumptions of the network analysis41. The networks between the full dataset and the strict dataset were compared to validate the reliability of the model results.

A multilevel mediation model was used to test the possible pathways and quantify the mediated effects73. Here we used the “PROCESS” function from the BruceR package in R74. This is a powerful tool that supports a total of 24 kinds of SPSS PROCESS models75 and also supports multilevel mediation/moderation analyses. We used it to test whether the offline social interactions mediate the influence of digital activities on well-being.