====== Gait Deviation Index ====== ==== Overview ==== Schwartz et al. published two papers defining the the Gait Deviation Index (GDI)[[https://www.sciencedirect.com/science/article/abs/pii/S0966636208001136|1]],[[https://www.researchgate.net/publication/270870528_A_new_method_for_computing_the_gait_deviation_index_and_motion_analysis_profile|2]]. The Gait Deviation Index (GDI) is a gait index that can be used to measure the overall deviation of gait data relative to normative data. The first paper referenced [[https://www.sciencedirect.com/science/article/abs/pii/S0966636208001136|here]] [1] provides an in depth description of the GDI measure. Further work by Schwartz et. al., [[https://www.researchgate.net/publication/270870528_A_new_method_for_computing_the_gait_deviation_index_and_motion_analysis_profile| here]] [2] showed that a Derived GDI (GDI*) can be found using the Gait Profile Score (GPS) framework, with a much simpler calculation. This paper also discusses the relationship between the three measures (GPS, GDI, and GDI*) and how it may be unnecessary to compute multiple of these gait score if they tell you the same thing. Here we will briefly review the original GDI measure, followed by the derived GDI* calculation and our own validation between GDI* and the GDI. === Original GDI Equations === The first step in the original GDI Measure [1] is to identify a set of mutually independent joint rotation patterns based on a large sample of strides, called features components. These feature components are composed of 15 kinematic variables: * L+R Knee Flexion/Extension * L+R Ankle Dorsiflexion/Plantarflexion * Pelvic Tilt * Pelvic Rotation * Pelvic Obliquity * L+R Hip Flexion/Extension * L+R Hip Abduction/Adduction * L+R Hip Rotation * L+R Foot Progression \\ Each of these kinematic variables should be normalized to the gait cycle (as in below), and should be sampled every 2% of the gait cycle (such that each signal has 51 points).\\ {{:Left_Ankle_Dorsiflexion.png}} The "Proximity of Gait" is then measured for a particular stride, by measuring the Euclidean distance between feature component vectors. This distance metric is first calculated for the particular stride against the average gait vector of the control group. For example: the distance of a subject from the average ND gait is: \\ {{sift:Gait_Measures:gdi_eucl_dist.png?800}} \\ Given the distance between the subject and the average of the control group, the raw GDI for the subject can be found as the ln of the distance: \\ {{sift:Gait_Measures:gdiraw.png?250}} \\ This value is considered the "Raw GDI", and can be interpreted as a measure of deviation of the individual from the normal. However, the GDI calculation goes on further to scale this raw GDI as follows: First the Raw GDI is found for each subject within the control group: \\ {{sift:Gait_Measures:gdirawND.png?550}} \\ Then, the mean and standard deviation of all raw GDI measures across the control group are used to find a z score for the individual subject: \\ {{sift:Gait_Measures:gdizscore.png?400}} \\ Finally, the GDI is found by scaling the raw GDI using the z score: \\ {{sift:Gait_Measures:finalgdi.png?400}} \\ Since the GDI is a scaled metric, the literature [1] describes the interpretation as follows: //"GDI greater 100 indicates a subject whose gait is at least as close to the ND average as that of a randomly selected ND individual... Every 10 points that the GDI falls below 100 corresponds one standard deviation away from the ND mean. So, for example, GDI = 75 means that the gait of the subject is 2.5xstdev(Raw GDI control) away from the TD mean."// **Please note:** This is a summarized overview of the GDI calculation, and only the original paper should be referenced for recreating and interpreting the GDI [[https://www.sciencedirect.com/science/article/abs/pii/S0966636208001136|(here)]]. ==== Derived GDI Calculation ==== The derived GDI was published in 2014 by Schwartz et. al. as a method of showing how the GPS and GDI are substantially equivalent, and deriving a GDI value very close to the original GDI by using a scaled GPS value. We will review this derivation by first looking at the GPS calculation. This will be found for each subject. The GPS uses the same Kinematic variables listed about for the traditional GDI measure. Each of these kinematic variables should be normalized to the gait cycle, and should be sampled every 2% of the gait cycle (such that each signal has 51 points). The GPS score can be computed for the left and/or the right side. It can also be computed as an overall index for both sides. Full details of the GPS are found [[sift:gait_measures:gait_profile_score|here]]. === GPS Calculation Review === Although calculating the Gait Profile Score was explained in Baker et al's 2009 paper, the equations were not explicitly written. Their 2012 paper contains explicit written equations but due to some formatting errors these are incorrect. The [[https://www.has-motion.com/download/examples/GaitProfileScore/GPS_Equations.pdf|GPS Equations and Descriptions PDF]] has the correct version of these equations, which are also described below: The **Global Variable Scores (GVS)** is the root mean square difference between a specific time normalized gait variable (x) and the mean data from the reference population calculated across the gait cycle (x ref). |{{:GaitProfile_GVS.png}} |**i** = the number of kinematic variables used\\ \\ **t** = the specific point in the gait cycle\\ \\ **T** = total number of points in the gait cycle\\ \\ **xi,t** = the value of gait variable i at point t\\ \\ **xi,t ref** = the mean of gait variable i at point t in the reference population\\ \\ If normalizing to every 2% of the gait cycle, T is equal to 51. | The **Gait Profile Score (GPS)** the root mean square average of all the Gait Variable Scores: |{{:GaitProfile_GPS.png}} |**i** = the specific kinematic variable\\ \\ **T** = total number of kinematic variables used\\ \\ If using 15 kinematic variables, N is equal to 15. | As described in the previous section, the GPS can be calculated for the right side, the left side, or as an overall value. In Richard Baker's [[https://view.officeapps.live.com/op/view.aspx?src=https%3A%2F%2Fwalkingwithrichard.files.wordpress.com%2F2017%2F03%2Fgdi-gps-calculator-v-3-2.xlsx&wdOrigin=BROWSELINK|GPS Excel Sheet Calculator]]. === Derived GDI Equation === To scale the GPS to determine the Derived GDI for a subject, the following equation is used: {{sift:gait_measures:gdiderived.png?700}} \\ The RMS control is the Root Mean Squared Difference between each individual's gait in the control group and the average gait of the control group. This is essentially the same as the GVS value shown above, so A and B are the mean and standard deviation of the ln(GVS) of all individuals in the control group. \\ == Testing GDI* from GPS == To further understand how to get the derived GDI, we tested this ourselves using Richard Baker's spreadsheet to find the true GDI compared to our own GDI*. We started with a set of 4 subjects as our 'Control Group'. We gathered the average stride for each control subject, normalized to 52 points for all kinematic features. We then gathered and normalized 42 strides from a set of subjects to find GDI and GDI* for. We found the same kinematic features, normalized to heel strikes at 51 points. \\ To find the scaling factors A and B for the derived GDI, we found the RMS difference between the 4 control subject strides for all 9 kinematic variables of the left side (normalized LHS-LHS), against the average stride of the control group. In the spreadsheet, we subtracted the individual strides from the mean control stride and squared those values at each point across the stride. Then, we took the RMS across the entire 51 points of all 9 kinematic variables (459 points) for each control subject, followed by finding the natural log (ln). We found A and B by taking the mean and standard deviation of the Ln(RMS) results across the control group. {{sift:gait_measures:AandBGDI.png}} \\ \\ The GPS and true GDI were found using Richard Baker's spreadsheet, and details on those calculations can be found [[https://view.officeapps.live.com/op/view.aspx?src=https%3A%2F%2Fwalkingwithrichard.files.wordpress.com%2F2017%2F03%2Fgdi-gps-calculator-v-3-2.xlsx&wdOrigin=BROWSELINK|here]]. To compute the GDI* for all 42 strides, we used the following equation with the GPS and A and B values for our sample dataset: {{sift:gait_measures:gdiderived.png?700}} \\ The following sheet shows our comparison between GDI and GDI*. Here we can see a strong linear regression with a slope of 0.99 and an R-squared value of 0.99. These results align with the trend seen by Schwartz et. al. [[https://www.researchgate.net/publication/270870528_A_new_method_for_computing_the_gait_deviation_index_and_motion_analysis_profile|2]], and we can see that the GDI measure can be derived from the GPS. {{sift:gait_measures:DerivedGDI.png}} ==== Derived GDI in Sift ==== **NOTE: The GDI measure implemented in Sift is the derived GDI** === Step 1: Joint Angle Definition === The joint angles for each of the nine kinematic variables (per side) need to be calculated. These kinematic variables are the same for the GPS and GDI. If kinematic variables have not been calculated for your database, visit the following tutorial for instructions and zip files for finding the kinematic measures needed for the GPS/GDI through Visual3D pipeline commands: [[Visual3D:Tutorials:Gait_Profile_Score:Gait_Profile_Score_and_Movement_Analysis_Profile_Pipeline|Tutorial:_Gait_Profile_Score_and_Movement_Analysis_Profile_Pipeline]] === Step 2: Create a Normalized Database === To calculate the GDI values a reference database needs to be created. The normal database, or 'control group' as we have used throughout this page, needs to have information about each individual within the control group. Therefore, you need the mean signals over the entire normal database, and the mean signals for EACH individual that makes up that normal database. This is because the GDI* calculates the RMS difference across the ND to determine A and B for the derived GDI equation. The database should contain gait data with the same nine kinematic variables described above, which should be normalized to 51 points per gait cycle (in this tutorial, the gait cycles are defined as LHS to LHS). == Generate a Normal Database in Sift == With Sift's [[sift:build_nds:building_normal_databases|Build ND]] feature, users can generate a reference database within the Sift application. Simply load a library of CMZ files you wish to include in the ND, query the required joint angles for the GDI measure, and generate a normal database containing mean summaries at the Library level AND workspace level for each angle. More specifics about building a ND in Sift and how to use it are found [[sift:build_nds:building_normal_databases|here]]. === Step 3: Dialog Selections === {{ Sift:gait_measures:GDIDLG.png?500}} The main GDI Dialog in Sift can be accessed through the Gait Measures menu {{:sift_gait_measures.png?20}} on the main toolbar. Users should begin by selecting the sift ND file they are using. This file will be used as the reference signals when calculation the global variance scores (GVS). **NOTE:** The Sift ND File MUST be loaded into Sift before using it for the GDI. The signal type dialog selection will be deactivated here, as the GDI will always use LINK_MODEL_BASED signals from the underlying workspaces. The folder selection defaults to Original here, and will be used for this example. The left and right event cycles will be populated with the gait events defined in the underlying CMZ files. If this is not populated, no events were found, and those must be generated before proceeding. The literature suggests 51 normalization points for GDI signals, however, the user may change this if they wish. Here we have checked "compute query after calculation" which means that the GDI values will be auto queried into the explore page after running. We have also checked "compute individual component queries after calculation" so that groups will be queried for each GVS that makes up the total GDI score. \\ We then select the signal selection button to prompt a second dialog to the GDI. It is crucial that the user make careful selections in this dialog to ensure the correct signals are being compared. Here, users will select the signal from a list of all signals in the type and folder selected in the first dialog. Each combo box is populated with data from either the CMZ library that is loaded, or the ND file. \\ **Pelvic Signals** - The first three combo boxes under "Signals" are for the selection of the Pelvic angles. Here, we provide users with a list of all signals from the underlying CMZ workspaces and corresponding folders selected in the first dialog. Here we have chosen the "L_Pelvic_Angle" (left and right for this database example are actually the exact same signal), with components X, Y, and Z for the pelvic tilt, obliquity, and rotation angles. Sift will normalize this pelvic signal to left events for the left side GDI, and right events for the right side GDI. We then selected the left and right pelvis X, Y, and Z angles from the list of signals that Sift identified in the VND or Sift ND normal database. Here, the normal database has computed a L_Pelvic_Angle and R_Pelvic_Angle. Note that the Normal Database signals are assumed to be already normalized to gait events, and then averaged. So in this case, L_Pelvic_Angle was normalized to left side events, and R_Pelvic_Angle was normalized to right side events prior to loading in this Normal database file. \\ ** General Signals** - The rest of the "Signals" options are populated with signals that Sift has found a left and right match for in the CMZ workspaces, and gives you the "general" names. For example, Sift may find a L_Hip_Angle and R_Hip_Angle in each workspace, and the user would select "Hip_Angle" as the general option. Sift only provides users with signals where both L and R are found. Sift does not look specifically for matches in the ND files, because again, it is assumed that these signals have already been normalized to left and right gait events. Make sure you select the correct L and R signals for each entry of the dialog. \\ {{:GPSSelections.png?700}}\\ \\ Once we return to the main dialog, the compute button is now active, and we can calculate the GDI and individual GVS measures for the active CMZ files against the normal database. \\ {{Sift:gait_measures:GDIDLGActive.png}} \\ === Step 4: Calculate and View Results === GDI calculations are saved as metrics in the CMZ workspaces loaded in Sift. When queried into the explore page, users may plot them as Metric or Metric-Metric plots. Here, we can see the total GDI scores generated for selected workspaces plotted as a metric bar chart. We can also look at right and left specific GDI scores from the conditions of group GDI_1. {{sift:gait_measures:GDIResults.png?1000}} {{sift:gait_measures:LeftvsRightGDI.png?1000}} ==== References ==== * [[https://www.sciencedirect.com/science/article/abs/pii/S0966636208001136|The gait deviation index: A new comprehensive index of gait pathology (Schwartz et al. 2008)]] * [[https://www.researchgate.net/publication/270870528_A_new_method_for_computing_the_gait_deviation_index_and_motion_analysis_profile|A new method for computing the gait deviation index and motion analysis profile (Schwartz et. al. 2014)]]