Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Mar:65:102361.
doi: 10.1016/j.psychsport.2022.102361. Epub 2022 Dec 8.

Resilience characterized and quantified from physical activity data: A tutorial in R

Affiliations

Resilience characterized and quantified from physical activity data: A tutorial in R

Dario Baretta et al. Psychol Sport Exerc. 2023 Mar.

Abstract

Consistent physical activity is key for health and well-being, but it is vulnerable to stressors. The process of recovering from such stressors and bouncing back to the previous state of physical activity can be referred to as resilience. Quantifying resilience is fundamental to assess and manage the impact of stressors on consistent physical activity. In this tutorial, we present a method to quantify the resilience process from physical activity data. We leverage the prior operationalization of resilience, as used in various psychological domains, as area under the curve and expand it to suit the characteristics of physical activity time series. As use case to illustrate the methodology, we quantified resilience in step count time series (length = 366 observations) for eight participants following the first COVID-19 lockdown as a stressor. Steps were assessed daily using wrist-worn devices. The methodology is implemented in R and all coding details are included. For each person's time series, we fitted multiple growth models and identified the best one using the Root Mean Squared Error (RMSE). Then, we used the predicted values from the selected model to identify the point in time when the participant recovered from the stressor and quantified the resulting area under the curve as a measure of resilience for step count. Further resilience features were extracted to capture the different aspects of the process. By developing a methodological guide with a step-by-step implementation, we aimed at fostering increased awareness about the concept of resilience for physical activity and facilitate the implementation of related research.

Keywords: AUC; Physical activity; R tutorial; Resilience; Time series; Wearable devices.

PubMed Disclaimer

Conflict of interest statement

Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Publication types

LinkOut - more resources