Introduction

The COVID-19 pandemic is ongoing and new COVID-19 cases continue to rise globally1. As of March 14, 2021, over 119 million global cases of COVID-19 and nearly 2.6 million global deaths have been documented1,2 Although mass vaccination programs started in December 2020 in high-income countries3, only 439 million vaccine doses, equivalent to 5.7 doses for every 100 people, have been administered worldwide so far4. Moreover, inequities in vaccine allocation and delivery among lower-income countries remain a significant threat to worldwide control of the pandemic5. Current estimates suggest that it will be at least 2023 until there are sufficient vaccine doses to cover the world’s population6. Therefore, nonpharmaceutical interventions, including social distancing and face mask use, will continue to play a key role to mitigate the risk of COVID-19 for the foreseeable future7,8. Furthermore, social distancing and face mask use remain strongly recommended even after vaccination9 because vaccines cannot completely prevent infection10 and their role in preventing asymptomatic transmission of COVID-19 is uncertain. Therefore, given the continued burden of COVID-19, there is a high unmet need for real-world data to investigate the effect of social distancing and face mask use to mitigate the risk of COVID-19.

To date, much of the evidence on the efficacy of social distancing and face mask use is based on modeling using mostly community-level data in relation to disease burden as assessed through testing, hospitalizations, or mortality11,12,13,14,15,16,17,18,19,20,21,22,23. Such studies are unable to concurrently account for personal risk factors for infection or optimally assess the latency between social distancing or face mask-use interventions and infection rates given the significant lag between the onset of symptoms, testing, and medical care. Moreover, most evidence with individual-level data includes a relatively limited number of participants24,25,26,27,28. Here, we conducted a large size of a prospective study in the US using a smartphone-based application that collected self-reported, individual-level information on COVID-19-like symptoms, face mask use, and other personal risk factors, in combination with community-level social-distancing measures to investigate the relative effectiveness of social distancing and face mask-use policies with the risk of COVID-19.

Results

Between March 29 and July 16, 2020, we enrolled 277,798 participants who provided baseline information. We excluded 79,721 individuals who did not live in a county with available Unacast data, reported any symptoms or a positive COVID-19 test at enrollment, had <24 h of follow-up time, or who reported a positive COVID-19 test or symptoms of predicted COVID-19 within 24 h of enrollment. This left 198,077 participants in our prospective inception cohort, in which we subsequently documented 4488 cases of predicted COVID-19 over 11,428,442 person-days of follow-up for the social-distancing analysis. Among 198,077 participants, we excluded 63,480 who did not answer to face mask-use questions for the face mask-use analysis. This left 134,597 participants in our prospective inception cohort, in which we subsequently documented 1194 cases of predicted COVID-19 over 4,209,237 person-days of follow-up for the face mask-use analysis. Compared to others, individuals who lived in communities with poor social distancing (Grade = F) at baseline were younger, more likely to be male, more likely to smoke currently, have less lung disease, had more interaction with suspected or documented COVID-19 individuals, and more likely to live in areas with higher neighborhood deprivation index (Table 1). In contrast, individuals living in communities with excellent social distancing (Grade = A/B) were older and more likely to live in areas with lower population density (Table 1).

Table 1 Baseline characteristics of study participants according to overall social distancing grade.

Risk of predicted COVID-19 according to overall community social distancing grade at various time lags

To test the association between community-level social distancing and risk of subsequent predicted COVID-19, we evaluated lag times of 7–28 days. Living in a community with a greater social-distancing grade (F to A/B) was associated with a lower risk of predicted COVID-19 for all lag times evaluated (Table 2). The maximal association was first observed with a fourteen-day lag and the benefit plateaued beyond that time period (Fig. 1). Compared to participants living in communities with overall poor social distancing (Grade = F), the adjusted HRs for predicted COVID-19 at 14 days were 0.85 (95% CI 0.77–0.95) for fair (Grade = D), 0.80 (95% CI 0.70–0.91) for good (Grade = C), and 0.69 (95% CI 0.55–0.86) for excellent (Grade = A/B) social distancing (Plinear-trend < 0.001) after adjusting for personal risk factors for COVID-19 (Table 2). There was a negative but not statistically significant association with a 0-day lag. When we further adjusted for county-level test-positive COVID-19 incidence in the community at the time of assessment for the social-distancing measures, we observed similar results (adjusted HR, 0.67; 95% CI 0.53–0.85) for excellent social distancing (Grade = A/B) compared to participants living in communities with overall poor social distancing (Grade = F). For subsequent analyses, we focused on models using a fourteen-day latency since the reduction in predicted COVID-19 appeared maximal at 14 days, and this is considered a plausible interval for exposure to symptom-based disease prediction.

Table 2 Risk of predicted Covid-19 according to living in a community with overall social-distancing grade at various time lags.
Fig. 1: Risk of predicted Covid-19 according to living in a community with overall social-distancing grade at various time lags.
figure 1

Overall social-distancing grades are denoted as Poor (F grade), Fair (D grade), Good (C grade), and Excellent (A + B grade). Overall social-grade categories (A, B, C, D, and F) are provided by Unacast. Cox proportional hazards regression models were used to calculate adjusted HRs and 95% CIs of predicted COVID-19. Adjusted models were stratified by age (<25, 25–34, 35–44, 45–54, 55–64, ≥65), state, and calendar date at study entry and further adjusted for race (White, Black, Asian, or other), sex (male or female), population density of residence (quartiles), current smoking, frontline healthcare worker, interaction with suspected or documented Covid-19, history of diabetes, heart disease, lung disease, and kidney disease (each yes or no). HR hazard ratio, CI confidence interval.

Risk of predicted COVID-19 according to community social-distancing metrics and demographics

We also assessed the three individual components of the Unacast social-distancing grade: including average distance traveled, nonessential visitation, and human encounters (Table 3). Reduction in average distance traveled (adjusted HR, 0.78; 95% CI 0.65–0.92 < 25% versus >55%) and nonessential visitation (adjusted HR, 0.79; 95% CI 0.70–0.89 < 55% versus >65%) were both associated with lower risk of predicted COVID-19. The reduction in human encounters, based on phone-to-phone proximity measures, was not associated with lower risk of predicted Covid-19. In subgroup analyses, the association of social-distancing grade and COVID-19 appeared to differ according to age (Pinteraction = 0.001). The association of Excellent (A/B) social distancing and the risk of predicted COVID-19 compared to Poor (F) was the greatest among the middle-age participants (35–55 years, adjusted HR, 0.47; 95% CI 0.26–0.84), than among younger (age < 35 years) or older participants (>55). We assessed for effect modification by other demographic including race, sex, and health problems limiting activities, and found no significant interactions between social-distancing grades and these factors (all Pinteraction > 0.05; Supplementary Table 2). In addition, despite the limited power, we found a protective but not statistically significant association between community social distancing and risk of a positive COVID-19 test (Supplementary Table 4).

Table 3 Risk of predicted Covid-19 within 14 days according to individual metrics of social distancinga.

Furthermore, to evaluate whether the impact of social distancing on the risk of predicted COVID-19 was modified by local transmissibility, we performed subgroup analysis according to Rt. During the epidemic slowing/maintenance period (Rt ≤ 1.0), compared to participants living in communities with overall poor social distancing (Grade = F), the adjusted HRs for predicted COVID-19 were 0.88 (95% CI 0.76–1.02) for fair (Grade = D), 0.79 (95% CI 0.66–0.95) for good (Grade = C), and 0.63 (95% CI 0.47–0.85) for excellent (Grade = A/B) social distancing (Plinear-trend = 0.002) after adjusting for personal risk factors for COVID-19 (Supplementary Table 6). This trend was also observed with similar magnitudes albeit with no statistical significance (Plinear-trend = 0.11) during the epidemic growth period (Rt > 1.0).

Risk of predicted COVID-19 according to personal face mask use

We examined the association between self-reported personal face mask use and risk of predicted COVID-19 among the 134,597 participants who provided this information.

Compared to individuals who wore face masks none of the time, the adjusted HRs for predicted COVID-19 were 0.27 (95% CI 0.19–0.39) for individuals who wore face masks sometimes, 0.34 (95% CI 0.27–0.43) for individuals who wore face masks most of the time, and 0.36 (95% CI 0.30–0.44) for individuals who wore face masks always (Plinear-trend < 0.001) after adjusting for personal risk factors for COVID-19 (Table 4). Individuals who reported frequent face mask use were observed to have a reduced risk of predicted COVID-19 even in communities with poor social distancing. Among the individuals living in communities with poor social-distancing grade, the adjusted HRs for predicted COVID-19 were 0.27 (95% CI 0.18–0.41) for individuals who wore face masks sometimes, 0.38 (95% CI 0.30–0.48) for individuals who wore face masks most of the time, and 0.38 (95% CI 0.31–0.46) for individuals who wore face mask always (Plinear-trend < 0.001) compared to individuals who wore face masks none of the time (Table 4). The results remained similar after additional adjustment for actual COVID-19 incidence. Furthermore, observed associations were not substantially different when analyses were restricted to participants living in Texas, Arizona, California, and Florida, states which were among the states in which social-distancing policy was relaxed earlier during the initial phase of the pandemic.

Table 4 Personal use of a face mask outside the home and risk of predicted Covid-19.

In subgroup analyses, we assessed for effect modification by demographic factors including race, sex, and health problems limiting activities (Supplementary Table 3). Despite no statistical evidence of heterogeneity, we observed that compared to individuals who wore face mask none of the time, individuals who always wore face mask appeared to have a lower risk of predicted COVID-19 if they were younger, had interacted with suspected or documented COVID-19 patients, regularly use a mobility aid, or had health problems that limited activities of daily living. In addition, despite the limited power, we found a similar association between face mask use and the risk of a positive COVID-19 test (Supplementary Table 5). Finally, the association of face mask use with predicted COVID-19 did not appear to substantially different according to Rt (Supplementary Table 7).

Risk of predicted COVID-19 with social distancing and face mask use after adjusting for socioeconomic status

To account for socioeconomic status, we examined the association of social distancing and face mask use with the risk of COVID-19 after additionally adjusting for the neighborhood deprivation index. For social distance analysis, compared to participants living in communities with overall poor social distancing (Grade = F), the adjusted HRs for predicted COVID-19 were 0.87 (95% CI 0.78–0.97) for fair (Grade = D), 0.85 (95% CI 0.74–0.97) for good (Grade = C), and 0.75 (95% CI 0.60–0.93) for excellent (Grade = A/B) social distancing (Plinear-trend = 0.01) after further adjusting for the neighborhood deprivation index (quartiles). For face mask-use analysis, compared to individuals who wore face masks none of the time, the adjusted HRs for predicted COVID-19 were 0.27 (95% CI 0.19–0.39) for individuals who wore face masks sometimes, 0.35 (95% CI 0.28–0.43) for individuals who wore face masks most of the time, and 0.36 (95% CI 0.30–0.44) for individuals who wore face masks always (Plinear-trend < 0.001) after further adjusting for the neighborhood deprivation index (quartiles).

Risk of predicted COVID-19 with social distancing and face mask use using inverse probability weighting (IPW)

To investigate the generalizability of our results, we conducted inverse probability weighting (IPW) analyses to examine whether correction for age, sex, race, and ethnicity-based demographic differences changes our main finding for social distancing and face mask use. In IPW analyses, we observed a similar association of social distancing and the slightly stronger association of face mask use with the risk of predicted COVID-19. Compared to participants living in communities with overall poor social distancing (Grade = F), the adjusted HRs for predicted COVID-19 at 14 days were 0.82 (95% CI 0.72–0.94) for fair (Grade = D), 0.78 (95% CI 0.66–0.93) for good (Grade = C), and 0.68 (95% CI 0.51–0.91) for excellent (Grade = A/B) social distancing using IPW (Plinear-trend = 0.004). Moreover, compared to individuals who wore face masks none of the time, the adjusted HRs for predicted COVID-19 were 0.20 (95% CI 0.13–0.30) for individuals who wore face masks sometimes, 0.31 (95% CI 0.24–0.40) for individuals who wore face masks most of the time, and 0.30 (95% CI 0.25–0.38) for individuals who wore face masks always using IPW (Plinear-trend < 0.001).

Quantitative bias analysis

We classified a participant to have ‘Predicted COVID-19’ based on a symptom score based on a stringent threshold which yields high specificity for COVID-19 with a tradeoff for sensitivity. Therefore, we ran ~2000 simulation models to calculate the likely value of the true HR assuming a range of possible sensitivity values from 10 to 100%, and calculated the mean HR assuming that the true proportion of COVID-19 cases is greater than 2% during the follow-up period. We can infer that if the Predicted COVID-19 model has a sensitivity of at least 30%, our finding of a reduced risk of COVID-19 associated with stronger community-level social-distancing measures is likely true (Supplementary Table 8). Also, our estimates of HR = 0.69 are unlikely to be strongly biased away from the null assuming a sensitivity of at least 60%. Thus, our findings using the predicted COVID-19 model may be robust to a possible range of sensitivities (given the high specificity of the threshold that we selected). For mask use, we observed that our findings were robust even if the Predicted COVID-19 model has a sensitivity as low as 10% (Supplementary Table 9).

Discussion

In this prospective study of 198,077 participants using a real-time mobile phone application in the US, we observed that individuals living in communities with the greatest social distancing had a 31% lower risk of predicted COVID-19 compared with those living in communities with poor social distancing, with maximum benefit evident after a latency period of 14 days. Furthermore, among individuals living in communities with poor social distancing, individuals who reported wearing face masks ‘always’ outside of the home had a 62% reduced risk of predicted COVID-19 compared to individuals who wore face masks none of the time.

Notably, a reduction in average distance traveled and nonessential visitation in the community was associated with a reduced risk of predicted COVID-19. In contrast, close contact as measured by human encounters was not associated with predicted COVID-19. This suggests that average distance traveled and nonessential visitation, as measures of independent mobility, may be more reflective of effective social distancing than measures based on assessing proximity between two devices. It is also possible that the criterion to define human encounters based on devices <50 meters apart may not be optimal to study COVID-19 transmission. In subgroup analysis, we did not observe the inverse associations between living in communities with the greater social distancing and risk of COVID-19 among individuals aged greater than 55 years, having health problems requiring stay-at-home, and regularly using mobility aids. For those individuals, living in a community with the greatest social distancing may not play an important role in reducing COVID-19 risk due to their limited mobility and a lower likelihood of social interaction in crowded spaces. Noticeably, the inverse association between living in a community with greater social distancing and the risk of predicted COVID-19 was most consistently observed among younger individuals without significant health problems or limitations in mobility.

We observed that the disease burden of COVID-19 at the start of the social-distancing measurement did not influence the association of social distancing and personal use of a face mask with the risk of predicted COVID-19. We also observed that the association of social distancing with reduced risk of predicted COVID-19 was present both in areas where the epidemic was slowing or maintained (Rt ≤ 1.0) as well as in areas where COVID-19 was actively spreading (Rt > 1.0). We similarly observed that the benefit of personal use of a face mask was observed in regions and time periods in which there was epidemic slowing/maintenance or growth. These findings imply that baseline risk did not impact the relative benefits of social-distancing policies and/or face mask use.

In our study, we used predicted COVID-19 as a proxy for a positive COVID-19 test due to the small number of COVID-19 test-positive app users during the study period. The small fraction of positive COVID-19 tests among all participants (0.31%) may be largely influenced by the limited availability of COVID-19 testing during the study period. A recent study demonstrated that more than 80% of individuals with a COVID-19 infection in the US went undetected in March 202029. Moreover, another study in 10 sites across the US reported that the estimated number of COVID-19 infections was 6–24 times greater per site than the number reported from March 23 to May 1230. Therefore, the association between the social distancing observed within one’s community and a positive COVID-19 test should be further investigated in studies in which there was a higher prevalence of testing.

Our findings are consistent with previous ecological studies investigating the effect of social distancing on risk of COVID-1911,12,13,14,15,16,17,18. In one recent study that also used estimates of social distancing based on Unacast data, each one-unit increase in social distancing was associated with a 26% reduced risk of COVID-19 incidence and a 31% reduced risk of COVID-19 mortality12 at the county level. In a separate study, COVID-19 epidemic case growth rates declined by ~1% per day beginning four days after statewide social-distancing measures were implemented11. In addition, estimated rates of COVID-19 cases were increased in border counties in Iowa which did not issue a stay-at-home order compared with border counties in Illinois which did issue a stay-at-home order13. Another study based on 149 countries demonstrated that any physical distancing intervention was associated with a 13% reduced risk of COVID-19 incidence31. These findings add to this body of evidence as we estimate the impact of social distancing in the community on individual-level outcomes.

Other studies have shown that face mask use is associated with a lower risk of COVID-19 on a population scale8,15,19,20,21,22,23,24,25,26,27,28,32,33,34. Particularly, three previous studies investigating the effect of self-reported face mask use on the risk of COVID-19 demonstrated the ORs (odds ratio) from 0.21 to 0.30, which were consistent with our finding (0.36 HR for always use)24,25,26. In one recent study among healthcare workers, universal face mask use was associated with a lower rate of COVID-19 in a hospital setting27,35. A recent meta-analysis demonstrated that face mask use was associated with a 85% reduced risk of viral infection causing COVID-19, SARS (severe acute respiratory syndrome), or MERS (Middle East respiratory syndrome)8. While the role of a face mask in protecting other individuals is well-recognized, we observed that a face mask may also protect individuals who wear them, as has been described by others33.

This study has several strengths. First, we used a mobile application to rapidly collect prospective data from a large population on known or suspected COVID-19 personal risk factors, such as face mask use. This is a significant advantage over existing studies which cannot concurrently examine the impact of personal interventions to reduce exposure risk with community-scale data. Second, we collected data from participants initially free of a positive COVID-19 test and any symptoms, which allowed a prospective assessment of incident symptoms with minimal recall or collider bias36,37, or reverse causality. Third, we assessed COVID-19 incidence according to a validated symptom assessment which minimizes the biases associated with geographic variation in access38 to COVID-19 testing on estimates of COVID-19 incidence, which may bias effect estimates away from or towards the null (e.g., social distancing associated with reduced test access or increased test-seeking behavior). This also allows us to better assess the impact of social distancing on COVID-19 according to different latency periods since it minimizes the time delay between onset of infection, obtaining a test, and reporting of the result, which has been estimated to be delayed by as long as a week in some areas of the US.39,40. Last, our findings emphasizing the efficacy of social distancing and the face mask use to reduce the risk of COVID-19 is relevant to many other settings, including other countries for which additional risk mitigation strategies, such as mass vaccination, remain unattainable in the near term.

There are several limitations to our study. First, our information on risk factors and symptoms are collected by self-report. Although information based on clinical records and testing would be more accurate, given the rapid pace of the pandemic and the limited availability of medical care and testing, self-reported information is more feasible to collect longitudinally and prospectively among a large number of participants and minimizes recall bias or selection bias (e.g., preferentially capturing severe cases through hospitalization records or death reports). Second, since our cohort is not a random sampling of the population, there remains a possibility for selection or collider bias36,37, reverse causality, or generalizability. We acknowledge the potential of reverse causality, such as COVID-19 symptoms leading to behavior changes, including social distancing or face mask use. Moreover, we acknowledge the potential of collider bias since our study relies on voluntary participation which may lead to a greater likelihood of participants with COVID-19 symptoms or those more likely to observe social distancing or face mask use to provide data. To minimize these potential biases, we conducted prospective analyses after excluding participants who had any symptoms related to COVID-19 or who had tested positive for COVID-19 prior to the start of follow-up. We also acknowledge that data collection through smartphone adoption has comparatively lower penetrance among certain socioeconomic groups and that participants of an app study may have a differential likelihood of reporting symptoms41. Third, it is possible that the personal risk factors for COVID-19 that we assessed here, such as wearing a face mask, may be confounded by other behaviors, such as hand washing, that reduce infection risk. Since the app did not collect the data regarding the other behaviors, we were not able to adjust for them. However, there is growing evidence that COVID-19 may spread through aerosols42,43,44. Since hand washing does not effectively prevent aerosol transmission while the face mask use does45, it is less likely that our findings were confounded by hand washing. Fourth, the social-distancing metrics used as an exposure are not reflective of actual user mobility. There may be non-differential misclassification of exposure status by region if county-level factors are correlated with the individual-level heterogeneity of each mobility metric (e.g., younger app users in an urban area with high mobility). Fifth, our analysis was focused on symptomatic COVID-19. However, it is likely that an association between social distancing and face mask use with the risk of asymptomatic spread would be similar. Sixth, while personal face mask use and other covariates were based on individual-level data reported through the app, the social-distancing measures are based on regionally aggregated data assigned to each app user. Last, we were not able to collect additional information on the specific settings of the face mask use (e.g., indoor vs outdoor) due to space limitations on the app and to minimize participant burden.

In conclusion, within a large population-based sample of individuals in the US, we demonstrated a significantly reduced risk of predicted COVID-19 infection among individuals living in communities with a greater social-distancing grade at 14 days either in regions or time periods experiencing either epidemic slowing or growth. Among participants who lived in a community with poor social distancing, wearing a face mask was associated with reduced risk. These findings provide additional support for the efficacy of nonpharmaceutical interventions in reducing COVID-19 incidence and spread and suggest that the benefits of such interventions will become most evident at 14 days after implementation. Despite the advent of several highly effective and safe vaccines, it remains unclear as to when herd immunity will be achieved, particularly in lower-income countries. Thus, social distancing and mask-wearing remain critically important near-term strategies to limit the spread of COVID-19.

Methods

Study population

Our study population includes all participants enrolled in the COVID Symptom Study smartphone application (“app”) from March 29, 2020 to July 16, 2020 in the US. The app is a freely available program developed by Zoe Ltd. in collaboration with researchers and clinicians at Massachusetts General Hospital and King’s College London. The data were collected using the app in the US, the UK, and Sweden. However, we restricted our study population to the US because social-distancing data provided by Unacast was only available in the US. Participants using this app reported demographic information and comorbidities at baseline and were encouraged to report on their current health condition daily to allow for the longitudinal, prospective collection of symptoms and COVID-19 testing results46. Participants were recruited through general and social media outreach, as well as direct invitations from the investigators of long-running prospective cohorts to study participants47. At enrollment, participants provided informed consent to the use of aggregated information for research purposes and agreed to applicable privacy policies and terms of use. This research study was approved by the Partners Human Research Committee (Institutional Review Board Protocol 2020P000909). This protocol is registered with ClinicalTrials.gov (NCT04331509).

Assessment of predicted COVID-19 and personal risk factors

Upon first use of the app, participants were asked to provide baseline demographic factors, including their zip code of residence, and answered separate questions about suspected risk factors for COVID-19 (Table 1)46. On first use and upon daily reminders, participants were asked if they felt physically normal, and if not, their symptoms, including fever, persistent cough, fatigue, loss of smell/taste, and diarrhea, among others46. Participants were also asked if they had been tested for COVID-19, and if yes, the results (none, negative, waiting, or positive). To validate the self-reported diagnosis, a subset of individuals who had reported that they had been tested for COVID-19 in the CSS app were invited to provide a copy of COVID-19 test results. A review was conducted by independent reviewers who were blinded to their original self-report responses. Among 235 participants, self-reported COVID-19 testing demonstrated a positive predictive value of 77% and a negative predictive value of 97% for confirmed medical record results. The population density was calculated from Census data for all Zip Code Tabulation Areas (ZCTA) in the US. For socioeconomic status, we calculated Neighborhood Deprivation Index (NDI) using principal components analysis48. More specifically, we identified a total of twenty-five variables to assess. The variables included twenty variables identified by the previous study48, in addition to another five variables that we identified from the literature as indicators of neighborhood-level deprivation (median household income in thousands, percent insured, average household size, population density per square mile, and percent of nonessential workers). We used principal component analysis to calculate the standardized first principal component. Particularly, we retained the variable if the variable had a loading above 0.25, and the lower 95% confidence limit of the variable loading is not below the lower 95% confidence limit for the median variable loading. Based on these criteria, we retained seven variables for the NDI (percent males in management, percent females in management, percent males in professional occupations, percent females in professional occupations, the median household value in thousands, percent males and females with more than a bachelor education, and percent of nonessential workers). The daily estimated effective reproductive number (Rt), the average number of secondary cases arising from a single case for a given day in each state, was extracted from rt.live, which was provided the case data from the COVID Tracking Project32,49. Rt then dichotomized as epidemic slowing/maintenance period (Rt ≤ 1) or epidemic growth period (Rt > 1) for Rt analyses. Because a report of a positive COVID-19 test depends on access to testing and incorporates a variable delay between symptoms and testing, we used a previously published symptom-based classifier that predicts COVID-19 (Predicted COVID-19) as our primary outcome measure50. Between March 24 and April 21, 2020, 2,450,569 UK and 168,293 US individuals enrolled in the COVID Symptom Study smartphone application reported symptoms, and 6452 UK and 726 US individuals reported a positive COVID-19 test. To build a prediction model, the UK participants were randomly divided into a training set and a test set (ratio: 80:20). Based on the training set, a logistic model generated to predict symptomatic COVID-19 was: Log odds (Predicted COVID-19) = −1.32 − (0.01 × age) + (0.44 × male sex) + (1.75 × loss of smell or taste) + (0.31 × severe or significant persistent cough) + (0.49 × severe fatigue) + (0.39 x skipped meals). The prediction model achieved a sensitivity of 0.65 (95% CI 0.62–0.67) and specificity of 0.78 (95% CI 0.76–0.80) in the test set. In additional validation in the US participants, the prediction model achieved a sensitivity of 0.66 (95% CI 0.62–0.69) and specificity of 0.83 (95% CI 0.82–0.85). Moreover, to further validate our model of predicted COVID-19 based on self-reported symptoms, we conducted a supplementary analysis to estimate the accuracy of this prediction model in relation to COVID-19 test results. We used independent samples from three different countries (US, UK, and Sweden) including participants who joined the app between April 22 and May 31, after the original prediction models were created (among test results from March 24 to April 21). Using a total of 4669 total test results, including 573 positive test results, we found the AUC of >70% in all three countries No evidence of heterogeneity was observed between the AUCs in the three countries (Supplementary Fig. 1). We used testing positive for COVID-19 as our secondary outcome measure. To examine the influence of COVID-19 incidence on our results, we included the daily county-level test-positive COVID-19 incidence estimated by the Center for Systems Science and Engineering at Johns Hopkins University as a covariate51,52.

Assessment of community social distancing and personal face mask use

We assigned each individual participant a social-distancing grade within their communities based on their zip code of residence. We used data provided by Unacast53 that estimated county-level social distancing for each calendar day according to the smartphone-based GPS activity of all devices assigned to their longest recorded location. Compared to the same day of the week during the pre-COVID-19 period (defined by Unacast as the four weeks prior to March 8, 2020), Unacast estimated, for each day, the percent reduction in each of the three metrics—metric 1, the average distance traveled per device; metric 2, nonessential visitation (e.g., restaurants, department stores, hair salons); and metric 3, human encounters calculated as two devices in close proximity (i.e., spatial distance of ≤50 m and temporal distance of ≤60 min)53. Unacast assigned grades (A, B, C, D, and F) using predefined cutoff points for each metric and calculated an overall social-distancing grade (Supplementary Methods), with grade A indicating the greatest social distancing and F the poorest social distancing. For all analyses, we combined grades A and B due to a limited number of individuals living in counties assigned to grade A. For personal face mask use, we used the individual-level information collected through the app. Beginning on June 12, 2020, app users received supplementary questions regarding face mask use based on the query “In the last week, did you wear a face mask when outside the house?”. The answer was collected according to the frequency of face mask use (none of the time, sometimes, most of the time, or always) and updated every time when the app users log into the app by asking the face mask use in the last week.

Statistical analysis

We conducted prospective analyses after excluding participants who had any symptom related to COVID-19 or who had tested positive for COVID-19 prior to start of follow-up to minimize reverse causality and collider bias36,37. Follow-up time started when participants first reported on the app and accrued until they developed predicted COVID-19, or the time of last data entry prior to July 16, whichever occurred first. We used updated, time-varying community social-distancing exposure data as our primary independent variable. Community-level social-distancing exposure data and corresponding follow-up time was mapped to each individual and updated each time they logged in the app to provide updated symptom information. We also used time-varying face mask-use exposure data for the association between self-reported personal use of masks and predicted COVID-19. Cox proportional hazards regression models stratified by age, state, and calendar date at study entry were used to calculate unadjusted and adjusted hazard ratios (HRs) and 95% confidence intervals (CIs) of predicted COVID-19. Covariates were selected a priori based on putative risk factors and included race (White, Black, Asian, other race), sex (male, female), population density (quartiles), current smoking, work as a frontline healthcare worker, interaction with suspected or documented COVID-19, and history of diabetes, heart disease, lung disease, kidney disease (each yes/no), and neighborhood deprivation index (quartiles). Missing data for categorical variables were included as a missing indicator.

To minimize any variation of estimated daily social-distancing grade associated with the day of the week (e.g., Sunday vs. Monday), we used a seven-day average of community social-distancing grade as the exposure for each participant. To access the incubation period, we first examined the latency between community social-distancing grade and predicted COVID-19 using varying lag times (0 day, 7 days, 14 days, 21 days, and 28 days). For example, for a latency of 7 days, we used social-distancing grade exposure on April 1 for predicted COVID-19 outcome measures on April 8, grade on April 2 for follow-up on April 9, and so forth (Supplementary Fig. 2). For subgroup analysis according to daily state-level Rt, we used a 21-day latency since this corresponded to the start of the seven-day average social-distancing exposure with a 14-day latency. Two-sided P values of <0.05 were considered statistically significant for main analyses. All statistical analyses were performed using R software, version 3.6.1 (R Foundation).

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.