| Title: | Functional Gait Deviation Index |
|---|---|
| Description: | A typical gait analysis requires the examination of the motion of nine joint angles on the left-hand side and six joint angles on the right-hand side across multiple subjects. Due to the quantity and complexity of the data, it is useful to calculate the amount by which a subject’s gait deviates from an average normal profile and to represent this deviation as a single number. Such a measure can quantify the overall severity of a condition affecting walking, monitor progress, or evaluate the outcome of an intervention prescribed to improve the gait pattern. This R package provides tools for computing the Functional Gait Deviation Index, a novel index for quantifying gait pathology using multivariate functional principal component analysis. The package supports analysis at the level of both legs combined, individual legs, and individual joints/planes. It includes functions for functional data preprocessing, multivariate functional principal component decomposition, FGDI computation, and visualisation of gait abnormality scores. Further details can be found in Minhas, S. K., Sangeux, M., Polak, J., & Carey, M. (2025). The Functional Gait Deviation Index. Journal of Applied Statistics <doi:10.1080/02664763.2025.2514150>. |
| Authors: | Michelle Carey [aut, cre], Sajal Kaur Minhas [aut] |
| Maintainer: | Michelle Carey <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-05-16 06:23:57 UTC |
| Source: | https://github.com/cran/fgdiR |
Kinematic data for 18 individuals with unilateral above-knee amputations and 42 healthy controls. Each entry contains 18 kinematic variables measured at 1 control data precedes amputee data. Amputee data from Hood et al. (2020); control data from Fukuchi et al. (2018).
A_DataA_Data
A list containing the 18 kinematic variables with each list containing a data.frame with N rows and T variables, where N is the total number of subjects and T is the total number of time points.
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
Internal gait study
# Load the Data data(A_Data)# Load the Data data(A_Data)
Metadata for Amputee Subjects
A_data_infoA_data_info
A data frame with the following variables:
Unique identifier for each subject (e.g., TF01, TF02).
Age of the subject in years.
Biological sex (e.g., Male, Female).
Body mass in kilograms.
Height in meters.
Side of amputation (Left or Right).
Cause of amputation (e.g., Traumatic, Infection, Dysvascular).
Age at which the subject underwent amputation (years).
Medicare Functional Classification Level (e.g., K2, K3), indicating the subject’s mobility level.
Type/model of the prosthetic knee prescribed (e.g., C-Leg Obk, Plie FI).
Type/model of the prosthetic ankle prescribed (e.g., AllPro FI, Triton Obk).
Suspension mechanism used for the prosthetic socket (e.g., Suction, Lanyard, Pin Lock).
Indicates whether the subject had gait training and, if so, how many sessions (e.g., “Yes (2)”, “No”).
Indicates whether hand-rails were used during gait assessment (e.g., “Yes, All”, “No”).
# Load the Data data("A_data_info")# Load the Data data("A_data_info")
Kinematic data for 18 individuals with unilateral above-knee amputations (left side only) and 42 healthy controls. Each entry includes pelvic, hip, knee, ankle, and foot angles, sampled at 1 over the full gait cycle. Amputee data from Hood et al. (2020); control data from Fukuchi et al. (2018).
A_DataLA_DataL
A list containing the 9 kinematic variables with each list containing a data.frame with N rows and T variables, where N is the total number of subjects and T is the total number of time points.
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
# Load the Data data(A_DataL)# Load the Data data(A_DataL)
Kinematic data for 18 individuals with right-side above-knee amputations and 42 healthy controls. Includes pelvic, hip, knee, ankle, and foot angles, sampled at 1 over the full gait cycle. Amputee data from Hood et al. (2020); control data from Fukuchi et al. (2018).
A_DataRA_DataR
A list containing the 9 kinematic variables with each list containing a data.frame with N rows and T variables, where N is the total number of subjects and T is the total number of time points.
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
@examples # Load the Data data(A_DataR)
Computes univariate and multivariate FGDI scores from gait data matrices.
FGDI(G, ID, PVE_I)FGDI(G, ID, PVE_I)
G |
A list of matrices representing joint kinematic data. Each list contains the pelvic and hip angles across all three planes, knee flexion/extension, ankle dorsiflexion/plantarflexion, and foot internal/external rotation. The Left side is first and then the right side. It is important to note that since the pelvis is common to both sides, it is appropriate to include pelvic kinematics from only one side. |
ID |
A vector of group labels (e.g., "Case", "Control"). |
PVE_I |
A numeric value (0–1) for cumulative proportion of variance explained. |
A list with the following elements:
A numeric vector of scaled FGDI scores for both the left and right side.
A matrix containing the standardized FGDI scores for each kinematic variable.
A numeric vector of standardized combined FGDI scores.
A list containing the approximated gait functions evaluated across the gait cycle for each kinematic variable.
A numeric vector containing the root mean squared error of the approximated gait functions.
A numeric vector of standardized FGDI scores for the left side.
A numeric vector of standardized FGDI scores for the right side.
A numeric vector with the percentage of variation explained by FPCs for the combined data.
A numeric vector with the percentage of variation explained by FPCs for the data on the left side.
A numeric vector with the percentage of variation explained by FPCs for the data on the right side.
A matrix with the percentage of variation explained by FPCs for each kinematic variable.
The choosen number of FPCs for the combined data.
The choosen number of FPCs for the data on the left side.
The choosen number of FPCs for the data on the right side.
The choosen number of FPCs for each kinematic variable.
#' @examples data(A_Data) FGDI_out <- FGDI(A_Data, ID = rep(c("Case", "Control"), times = c(18, 42)), PVE_I = 0.99) FGDI_out$SFGDIL
Minhas, S.K., Sangeux, M., Polak, J., & Carey, M. (2025). The Functional Gait Deviation Index. Journal of Applied Statistics.
Kinematic data for Parkinson's subjects.The PD dataset is publicly accessible, as detailed in Shida, T. K. F., Costa, T. M., de Oliveira, C. E. N., de Castro Treza, R., Hondo, S. M., Los Angeles, E., ... & Coelho, D. B. (2023).. It includes data from 21 right-handed idiopathic PD individuals. Measurements are taken at 1
P_DataP_Data
A list containing the 18 kinematic variables with each list containing a data.frame with N rows and T variables, where N is the total number of subjects and T is the total number of time points.
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
numeric data.frame with N rows and T variables
# Load the Data data(P_Data)# Load the Data data(P_Data)
Metadata for Parkinson Subjects
P_data_infoP_data_info
A data frame with the following variables:
Subject identifier (e.g., SUB01).
Sex of the subject (e.g., M/F).
Age in years.
Height in centimeters.
Body weight in kilograms.
Body mass index in kg/m.
Use of orthotic and/or prosthetic device.
Years of formal education completed.
Time since Parkinson’s disease diagnosis (years).
Levodopa equivalent daily dose (mg/day).
Classification based on freezing of gait (e.g., freezer/non-freezer).
Freezing of Gait Questionnaire total score.
Initial Parkinson’s disease symptoms reported.
Family history of Parkinson’s disease and relationship.
Self-reported improvement after antiparkinsonian medication.
History of surgery and type.
Participation in rehabilitation or regular physical activity.
Reported comorbid conditions (cardiovascular, bone, etc.).
Dominant hand.
Hoehn and Yahr stage in the ON-medication state.
Montreal Cognitive Assessment (MoCA) score in the ON-medication state.
Mini-BESTest balance score in the ON-medication state.
Falls Efficacy Scale–International (FES-I) score in the ON-medication state.
UPDRS Part II (activities of daily living) total score in the ON-medication state.
UPDRS Part II walking item score in the ON-medication state.
UPDRS Part III (motor examination) total score in the ON-medication state.
UPDRS Part III rigidity item score in the ON-medication state.
UPDRS Part III gait/walking item score in the ON-medication state.
Motor phenotype in ON state: PIGD (postural instability/gait difficulty) or tremor-dominant (TD).
Motor asymmetry index from UPDRS Part III in the ON-medication state.
Completion time (seconds) for Stroop Test condition I in the ON-medication state.
Number of errors in Stroop Test condition I in the ON-medication state.
Completion time (seconds) for Stroop Test condition II in the ON-medication state.
Number of errors in Stroop Test condition II in the ON-medication state.
Completion time (seconds) for Stroop Test condition III (interference) in the ON-medication state.
Number of errors in Stroop Test condition III in the ON-medication state.
Completion time (seconds) for Trail Making Test Part A in the ON-medication state.
Number of errors in Trail Making Test Part A in the ON-medication state.
Completion time (seconds) for Trail Making Test Part B in the ON-medication state.
Number of errors in Trail Making Test Part B in the ON-medication state.
Hoehn and Yahr stage in the OFF-medication state.
Montreal Cognitive Assessment (MoCA) score in the OFF-medication state.
Mini-BESTest balance score in the OFF-medication state.
Falls Efficacy Scale–International (FES-I) score in the OFF-medication state.
UPDRS Part II (activities of daily living) total score in the OFF-medication state.
UPDRS Part II walking item score in the OFF-medication state.
UPDRS Part III (motor examination) total score in the OFF-medication state.
UPDRS Part III rigidity item score in the OFF-medication state.
UPDRS Part III gait/walking item score in the OFF-medication state.
Motor phenotype in OFF state: PIGD or tremor-dominant (TD).
Motor asymmetry index from UPDRS Part III in the OFF-medication state.
Completion time (seconds) for Stroop Test condition I in the OFF-medication state.
Number of errors in Stroop Test condition I in the OFF-medication state.
Completion time (seconds) for Stroop Test condition II in the OFF-medication state.
Number of errors in Stroop Test condition II in the OFF-medication state.
Completion time (seconds) for Stroop Test condition III (interference) in the OFF-medication state.
Number of errors in Stroop Test condition III in the OFF-medication state.
Completion time (seconds) for Trail Making Test Part A in the OFF-medication state.
Number of errors in Trail Making Test Part A in the OFF-medication state.
Completion time (seconds) for Trail Making Test Part B in the OFF-medication state.
Number of errors in Trail Making Test Part B in the OFF-medication state.
Freezing of Gait Diagnostic Interview score.
# Load the Data data("P_data_info")# Load the Data data("P_data_info")
Plots gait curves comparing healthy controls to individuals with highest deviation.
plot_gait_comparison(joint_index, title, FGDI, Data, ID, combined)plot_gait_comparison(joint_index, title, FGDI, Data, ID, combined)
joint_index |
Index of the joint angle to plot. |
title |
Title for the plot. |
FGDI |
Output list from FGDI() function. |
Data |
List of matrices containing the gait data. |
ID |
Subject group labels. |
combined |
Logical indicating if you want to see the combined FGDI results (TRUE). This approach yields a measure of severity by collectively considering both legs, and displays the maximum gait abnormality. If FALSE the max gait pathology is displayed for each leg individually left in green and right in blue. |
A ggplot object.
data(A_Data) data(A_data_info) ID <- c(rep("Case", 18), rep("Control", 42)) fgdi_out <- FGDI(A_Data, ID, PVE_I = 0.99) plot_gait_comparison(1, "Pelvis Tilt", fgdi_out, A_Data, ID, combined=FALSE)data(A_Data) data(A_data_info) ID <- c(rep("Case", 18), rep("Control", 42)) fgdi_out <- FGDI(A_Data, ID, PVE_I = 0.99) plot_gait_comparison(1, "Pelvis Tilt", fgdi_out, A_Data, ID, combined=FALSE)