Analytical code and revised manuscript figures for:
Latent gait instability underlying retrospective fall occurrence in Parkinson’s disease
This repository contains the computational workflow supporting the revised manuscript. The analyses estimate a wearable-derived latent gait-instability construct from trunk biomechanics and examine its association with retrospective fall occurrence in Parkinson’s disease.
Falls in Parkinson’s disease are multifactorial and are not expected to be fully explained by any single gait metric. This project evaluates whether trunk-derived wearable gait features can be integrated into a latent biomechanical construct representing gait instability, and whether this construct is associated with retrospective fall occurrence.
The workflow includes:
- definition of the analytical variables and conceptual roles;
- derivation of domain-specific trunk biomechanical axes;
- Bayesian latent-variable modeling of gait instability;
- comparison with gait speed as a conventional spatiotemporal descriptor;
- Bayesian modeling of retrospective fall occurrence;
- model-based threshold-region and hypothetical instability-reduction contrasts;
- peer-review sensitivity analyses for additional covariate adjustment;
- supplementary PCA summaries for domain-axis interpretation.
The repository is intended to document the analytical workflow used for the manuscript, not to provide a deployed clinical prediction tool.
notebooks/
├── 01_exposure_definition_and_conceptual_roles.ipynb
├── 02_latent_trunk_axes.ipynb
├── 03_spatiotemporal_latent gait instability.ipynb
├── 04_contrast_gait_speed.ipynb
├── 05_bayesian_latent_gait_instability_and_falls_occurrence.ipynb
└── 06_threshold_hypothetical_contrasts.ipynb
scripts/
├── 07_sensitivity_covariate_adjustment_bayesian.py
└── 08_pca_domain_axes_summary.py
figures/
├── Figure1_revised.pdf
├── Figure2_revised.pdf
├── Figure3_revised.pdf
├── Figure4_revised.pdf
├── FigureS1_revised.pdf
└── FigureS2_revised.pdf
01_exposure_definition_and_conceptual_roles.ipynb
Defines the analytical dataset structure, retrospective fall-occurrence outcome, candidate biomechanical descriptors, and the conceptual roles of clinical and gait variables used in the manuscript.
02_latent_trunk_axes.ipynb
Groups trunk-derived wearable features into biomechanical domains and derives domain-specific axes using principal component analysis.
The main domains include:
- rhythmicity and recurrence;
- neuromotor complexity;
- lower trunk kinematics.
03_spatiotemporal_latent gait instability.ipynb
Fits the Bayesian latent-variable model used to estimate participant-level latent gait instability from the domain-specific trunk biomechanical axes.
04_contrast_gait_speed.ipynb
Evaluates gait speed as a conventional spatiotemporal comparator and examines whether the latent gait-instability construct captures information not reducible to gait speed alone.
05_bayesian_latent_gait_instability_and_falls_occurrence.ipynb
Models the association between latent gait instability and retrospective fall occurrence using Bayesian regression.
06_threshold_hypothetical_contrasts.ipynb
Evaluates a model-estimated transition region along the latent gait-instability continuum and estimates model-based hypothetical changes in fall-occurrence probability under reduced latent instability.
scripts/07_sensitivity_covariate_adjustment_bayesian.py
Runs additional Bayesian covariate-adjustment sensitivity analyses requested during peer review, including adjustment for clinical severity and gait-related covariates.
scripts/08_pca_domain_axes_summary.py
Generates supplementary PCA summaries for the trunk biomechanical domains, including additional rhythmicity-recurrence components.
Final revised manuscript figures are stored in figures/.
Figure1_revised.pdf: revised analytical/conceptual workflow.Figure2_revised.pdf: revised latent gait-instability modeling framework.Figure3_revised.pdf: revised association between latent gait instability and retrospective fall occurrence.Figure4_revised.pdf: revised threshold-region and hypothetical contrast analysis.FigureS1_revised.pdf: revised supplementary figure S1.FigureS2_revised.pdf: revised supplementary figure S2.
The clinical and wearable datasets used in the manuscript are not distributed in this repository because of ethical, privacy, and institutional restrictions.
This repository provides the analytical code and revised manuscript figures. To reproduce the full analysis, users must supply an equivalent dataset with the same analytical structure used by the notebooks and scripts.
The workflow was developed in Python and uses standard scientific-computing and Bayesian-analysis libraries, including:
- PyMC;
- ArviZ;
- pandas;
- NumPy;
- scikit-learn;
- statsmodels;
- matplotlib;
- seaborn.
Random seeds are fixed where appropriate to improve reproducibility.
Notebook cell outputs and generated result files are intentionally not stored in the repository. The repository is organized to document the computational workflow rather than to archive intermediate generated outputs.
If you use this repository or build upon this analytical framework, please cite the associated manuscript and Zenodo release.
Manuscript
Trabassi D. et al.
Latent gait instability underlying retrospective fall occurrence in Parkinson’s disease.
Bibliographic details will be updated upon publication.
Repository DOI
https://doi.org/10.5281/zenodo.18961895
This repository is released under the MIT License.