User Tools

Site Tools


sift:tutorials:perform_statistical_parametric_mapping

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sift:tutorials:perform_statistical_parametric_mapping [2024/10/03 18:04] – [Curve Registration] wikisysopsift:tutorials:perform_statistical_parametric_mapping [2024/12/17 18:27] (current) – [Analysis] wikisysop
Line 1: Line 1:
 ====== Perform Statistical Parametric Mapping ====== ====== Perform Statistical Parametric Mapping ======
  
-This tutorial will show you how to perform an SPM analysis in Sift. An SPM analysis helps you gather statistical analysis contained in the original n-dimensional space as your data, ensuring the removal of potential biasing and allowing for easily understood visualizations. More information on SPM can be found in the [[Sift:Statistical_Parametric_Mapping:Using_Statistical_Parametric_Mapping_in_Biomechanics|SPM Page]]+This tutorial will show you how to perform an SPM analysis in Sift. An SPM analysis helps you gather statistical analysis contained in the original n-dimensional space as your data(commonly 101 normalized points in biomechanics), ensuring the removal of potential biasing and allowing for easily understood visualizations. More information on SPM can be found in the [[Sift:Statistical_Parametric_Mapping:Using_Statistical_Parametric_Mapping_in_Biomechanics|SPM Page]]
  
-==== Research Question ====+===== Research Question =====
  
-The question we will be trying to answer today is: "Is there a difference between how an OA patient walks and how a normal control group walks?". We will specifically look at identifying any differences there is in the flexion-extension of the right knee for our participants.+The question we will be trying to answer today is: "Is there a difference between how an Osteoarthritis (OApatient walks and how a normal control (NC) group walks?". We will specifically look at identifying any differences there is in the flexion-extension of the right knee for our participants.
  
-==== Data ====+===== Data =====
  
 This tutorial uses overground walking data from roughly 100 subjects divided into two conditions, normal control and osteoarthritis (moderate to severe). This data set can be found in your Sift program files under "Demo" (e.g., C:\Program Files\Sift\Demo). This tutorial uses overground walking data from roughly 100 subjects divided into two conditions, normal control and osteoarthritis (moderate to severe). This data set can be found in your Sift program files under "Demo" (e.g., C:\Program Files\Sift\Demo).
Line 13: Line 13:
 We will be using the same dataset as we used in the [[Sift:Tutorials:perform_principal_component_analysis|PCA Tutorial]]. We will be using the same dataset as we used in the [[Sift:Tutorials:perform_principal_component_analysis|PCA Tutorial]].
  
-=== Set the library path to the data directory ===+==== Set the library path to the data directory ====
  
 As with previous tutorials, we begin by loading the CMZ library and defining the queries relevant to our question. As with previous tutorials, we begin by loading the CMZ library and defining the queries relevant to our question.
Line 21: Line 21:
   - Click {{:sift_apply.png?20}} **Load** button to import the data.   - Click {{:sift_apply.png?20}} **Load** button to import the data.
  
-=== Define queries and calculate groups ===+==== Define queries and calculate groups ====
  
 For this tutorial we will manually create two groups based on tags, one for subjects with osteoarthritis and one for normal control subjects. We begin by defining a query for subjects with the OA tag (indicating osteoarthritis). For this tutorial we will manually create two groups based on tags, one for subjects with osteoarthritis and one for normal control subjects. We begin by defining a query for subjects with the OA tag (indicating osteoarthritis).
Line 42: Line 42:
 You can verify here that the new NC group has the same signal and event selections as the OA group. Click **Calculate All Queries** and then close the Query Builder dialog. You can verify here that the new NC group has the same signal and event selections as the OA group. Click **Calculate All Queries** and then close the Query Builder dialog.
  
-==== Curve Registration ====+===== Curve Registration =====
  
 Following some of the [[https://doi.org/10.1016/j.jbiomech.2010.03.008|SPM literature for Biomechanics]], we recommend applying [[sift:curve_registration:curve_registration_for_biomechanical_waveforms|Event Registration]] on 1-dimensional curves, before running an SPM analysis on the data. This is because it removes time variance from our data, which has a significant impact upon the results of our time-dependent signals. Following some of the [[https://doi.org/10.1016/j.jbiomech.2010.03.008|SPM literature for Biomechanics]], we recommend applying [[sift:curve_registration:curve_registration_for_biomechanical_waveforms|Event Registration]] on 1-dimensional curves, before running an SPM analysis on the data. This is because it removes time variance from our data, which has a significant impact upon the results of our time-dependent signals.
Line 59: Line 59:
 You should see the registered signals "line up" much more than before registering the data: You should see the registered signals "line up" much more than before registering the data:
  
-=== OA Plots ===+==== OA Plots ====
 {{:OA_All_Plots.png?800}} {{:OA_All_Plots.png?800}}
  
-=== NC Plots ===+==== NC Plots ====
 {{:NC_All_Plots.png?800}} {{:NC_All_Plots.png?800}}
  
-==== SPM ====+===== SPM =====
  
 With our pre-processing complete, we can move onto the SPM Analysis! The question we are investigating here is "Is there a difference between how an OA patient walks and how a normal control group walks?". This is a great question to apply SPM to gain some insights. With our pre-processing complete, we can move onto the SPM Analysis! The question we are investigating here is "Is there a difference between how an OA patient walks and how a normal control group walks?". This is a great question to apply SPM to gain some insights.
  
-=== GLM ===+==== GLM ====
  
 We begin by creating a General Linear Model (GLM) of our data. This is a [[sift:statistical_parametric_mapping:using_statistical_parametric_mapping_in_biomechanics|necessary step]] to easily analyze our data and create statistical parametric maps. Since we are hoping to understand the (potential) differences between 2 groups of data, we can model it by crafting the design matrix within the GLM to suit our needs. Sift automatically creates a categorical design matrix, that is, one where each grouping is selected. This will lead to a regression which calculates the means, based on these groupings. The residual matrix can then be easily calculated, and we have obtained our GLM. We begin by creating a General Linear Model (GLM) of our data. This is a [[sift:statistical_parametric_mapping:using_statistical_parametric_mapping_in_biomechanics|necessary step]] to easily analyze our data and create statistical parametric maps. Since we are hoping to understand the (potential) differences between 2 groups of data, we can model it by crafting the design matrix within the GLM to suit our needs. Sift automatically creates a categorical design matrix, that is, one where each grouping is selected. This will lead to a regression which calculates the means, based on these groupings. The residual matrix can then be easily calculated, and we have obtained our GLM.
  
-{{ :GLM_Dialog.png?500}}+{{ :glm_dialog.png?500}}
  
 This process is completed through the following steps: This process is completed through the following steps:
  
-  - On the SPM tab, within the Analyse Page, select the groups and workspaces you want to include in your GLM+=== Original Data === 
 + 
 +  - On the SPM tab, within the [[Sift:application:Analyse_Page|Analyse Page]], select the groups and workspaces you want to include in your GLM
     - For our analysis, select the OA and NC, and all Workspaces     - For our analysis, select the OA and NC, and all Workspaces
   - Select Create GLM   - Select Create GLM
   - Enter the following into the GLM Dialog:   - Enter the following into the GLM Dialog:
     * GLM Name: GLM     * GLM Name: GLM
 +    * Statistical Test: Two-Sample T-Test
     * Group By: Group     * Group By: Group
     * The Groups Selected should be OA and NC     * The Groups Selected should be OA and NC
 +    * Use Workspace Mean: Unchecked
   - Select Create GLM   - Select Create GLM
  
 You will then repeat this process for the registered data: You will then repeat this process for the registered data:
  
-  - On the SPM tab, within the Analyse Page, select the groups and workspaces you want to include in your GLM+=== Registered Data === 
 + 
 +  - On the SPM tab, within the [[Sift:application:Analyse_Page|Analyse Page]], select the groups and workspaces you want to include in your GLM
     - For our analysis, select the OA_Registered and NC_Registered, and all Workspaces     - For our analysis, select the OA_Registered and NC_Registered, and all Workspaces
   - Select Create GLM   - Select Create GLM
   - Enter the following into the GLM Dialog:   - Enter the following into the GLM Dialog:
     * GLM Name: GLM_Registered     * GLM Name: GLM_Registered
 +    * Statistical Test: Two-Sample T-Test
     * Group By: Group     * Group By: Group
     * The Groups Selected should be OA_Registered and NC_Registered     * The Groups Selected should be OA_Registered and NC_Registered
 +    * Use Workspace Mean: Unchecked
   - Select Create GLM   - Select Create GLM
  
Line 101: Line 109:
 {{:GLM_Plots.png?800}} {{:GLM_Plots.png?800}}
  
-=== Analysis ===+==== Analysis ====
  
 To begin creating our SPMs, we will move to the Statistics sub-tab. This is where we will run our statistical tests, and gain the real insights into our data. As mentioned, we want to understand if there is a difference in the flexion-Extension of the knee in OA patients versus a Normal Control group. A classical method of comparing 2 groups is to use the Student's t-test, which can be used to understand if the difference between 2 groups is statistically significant. Doing a t-test through SPM allows this to be extended from a single summary metric, and into a continuous statistic across the entire time domain we are analyzing.  To begin creating our SPMs, we will move to the Statistics sub-tab. This is where we will run our statistical tests, and gain the real insights into our data. As mentioned, we want to understand if there is a difference in the flexion-Extension of the knee in OA patients versus a Normal Control group. A classical method of comparing 2 groups is to use the Student's t-test, which can be used to understand if the difference between 2 groups is statistically significant. Doing a t-test through SPM allows this to be extended from a single summary metric, and into a continuous statistic across the entire time domain we are analyzing. 
Line 110: Line 118:
  
 To complete these SPMs: To complete these SPMs:
 +
 +=== Original Data ===
  
   - Select GLM: GLM   - Select GLM: GLM
Line 116: Line 126:
     - For unregistered data:     - For unregistered data:
       * SPM Name: SPM       * SPM Name: SPM
-      * Statistic: t Statistic+      * Statistic: Two Sample T-Test
       * Group 1: OA       * Group 1: OA
       * Group 2: NC       * Group 2: NC
 +      * Threshold: 0.05
 +      * Two-Tailed: Checked
 +
 +=== Registered Data ===
  
   - Select GLM: GLM_Registered   - Select GLM: GLM_Registered
Line 125: Line 139:
     - For registered data:     - For registered data:
       * SPM Name: SPM_Registered       * SPM Name: SPM_Registered
-      * Statistic: t Statistic+      * Statistic: Two Sample T-Test
       * Group 1: OA_Registered       * Group 1: OA_Registered
       * Group 2: NC_Registered       * Group 2: NC_Registered
 +      * Threshold: 0.05
 +      * Two-Tailed: Checked
  
-We have now calculated two SPMs, which we can easily compare/contrast by selecting the GLM and SPM Results we want in the top bar of the SPM tab. Both SPMs provide us with similar insights: there is a statistical difference between the 2 groups, and it is most prominent during mid-stance(roughly 10%-25% of the gait cycle), as well as mid-swing (roughly 55%-85% of the gait cycle). For the given threshold (defaults to alpha=0.01), we have established that there is a difference between the 2 groups (more precisely, we determined that the null hypothesis that the 2 groups are from the same population sample is false at alpha<0.01).+We have now calculated two SPMs, which we can easily compare/contrast by selecting the GLM and SPM Results we want in the top bar of the SPM tab. Both SPMs provide us with similar insights: there is a statistical difference between the 2 groups, and it is most prominent during mid-stance(roughly 10%-25% of the gait cycle), as well as mid-swing (roughly 55%-85% of the gait cycle). For the given threshold (defaults to alpha=0.01), we have established that there is a difference between the 2 groups (more precisely, we determined that the null hypothesis that the 2 groups are from the same population sample is false at alpha<0.05).
  
  
 {{:SPM_Plot1.png?800}} {{:SPM_Plot1.png?800}}
  
-The difference between both SPMs is most apparent at ~65% of the gait cycle. Here we can see a significantly more pronounced t statistic (~10 vs ~12.5). While both are well above the specified threshold where alpha=0.01, this can show us how curve registration can be useful to correctly align our data, and get more meaningful results from our analysis. +The difference between both SPMs is most apparent at ~65% of the gait cycle. Here we can see a significantly more pronounced t statistic (~10 vs ~12.5). While both are well above the specified threshold where alpha=0.05, this can show us how curve registration can be useful to correctly align our data, and get more meaningful results from our analysis. 
  
 {{:SPM_Plot2.png?800}} {{:SPM_Plot2.png?800}}
sift/tutorials/perform_statistical_parametric_mapping.1727978647.txt.gz · Last modified: 2024/10/03 18:04 by wikisysop