sift:tutorials:bathuniversity:statistical_power_analysis_changing_gradients_and_speeds
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sift:tutorials:bathuniversity:statistical_power_analysis_changing_gradients_and_speeds [2026/08/26 13:56] – removed - external edit (Unknown date) 127.0.0.1 | sift:tutorials:bathuniversity:statistical_power_analysis_changing_gradients_and_speeds [2026/08/26 13:56] (current) – ↷ Links adapted because of a move operation wikisysop | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ======= A Statistical Power Analysis on Lower Limb Kinematic Comparisons Across Changing Gradients and Speeds ======= | ||
| + | |||
| + | ===== Abstract ===== | ||
| + | An open-sourced dataset from the University of Bath including full body kinematics and ground reaction forces of fifty heterogeneous runners completing treadmill running at various speeds and gradients. This tutorial demonstrates how Visual3D, Sift and {{https:// | ||
| + | |||
| + | ===== Data ===== | ||
| + | Data assessed for this processing included: | ||
| + | * A 3D ground reaction force data (1000Hz) collected on a gradient adjustable split belt Bertec instrumented treadmill | ||
| + | * A full body markerset (250Hz) using 12 Qualisys Miqus cameras tracked via Qualisys Track Manager 2022 | ||
| + | The dataset can be downloaded using [[https:// | ||
| + | |||
| + | ====== Creating CMZ Workspaces in Visual3D ====== | ||
| + | ===== Step 1: Create Model ===== | ||
| + | A new model was created following the recommendations from [[visual3d: | ||
| + | * Virtual feet markers were created as the foot segment was below the platform | ||
| + | * Additional tracking markers on the feet were added as they disappeared often during dorsiflexion | ||
| + | * Segment coordinate systems were modified to have A/P Axis = +Z and Distal to Proximal = -Y | ||
| + | |||
| + | Here is the model template file used in this tutorial: [[https:// | ||
| + | |||
| + | ===== Step 2: Create a Processing Pipeline ===== | ||
| + | Set up a typical processing pipeline, which can be done following the recommendations of [[visual3d: | ||
| + | |||
| + | Here is the processing pipeline file used in this tutorial: | ||
| + | [[https:// | ||
| + | |||
| + | Interpolate: | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Lowpass Filter: add SIGNAL_TYPES to TARGET and SIGNAL_FOLDER to PROCESSED | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Use Processed Analog: add USE_PROCESSED to TRUE | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Lowpass Filter: add SIGNAL_TYPES to ANALOG | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | FP Auto Baseline: add FP_NUMBER to 1+2 | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Modify force platform parameters: click edit and select get current C3D parameters | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Recalc: default parameters | ||
| + | |||
| + | Automatic gait events: default parameters | ||
| + | |||
| + | Assign tags to file: each trial had two sets of tags applied, one for the gradient/ | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Compute model based data: similar to assigning tags, computing model based data was computed individually for the left and right side as well for the metrics that you want to calculated, Add RESULT_NAME as "the name of metric" | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Save pipeline as .vs3 and save workspace .cmz | ||
| + | |||
| + | |||
| + | ===== Step 3: Batch Process all Data Files through Sift's Command Line ===== | ||
| + | |||
| + | To repeat the steps from Visual3D for all the participants, | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Each participant should have their own folder with all the .c3d files for each movement. | ||
| + | * Select Build CMZs to create a workspace for each participant | ||
| + | * Select Make Hybrid Model by choosing the .mdh file created in Visual3D to create models from the Static files for each participant assuming the marker names are the same. | ||
| + | * Select Add V3S scripts and add the pipeline that was created and saved under step 2. | ||
| + | |||
| + | Another option is to build CMZ files within the command line Locate Sift within the command pipeline and then run the code below in the Sift noGUI following the [[sift: | ||
| + | |||
| + | The steps for running CMZ build are: | ||
| + | - **Make Hybrid Model:** selects the model.mdh file, static file ID, dynamic file ID, and current file directory | ||
| + | - **Add Metadata:** select participant info.csv file which is used to set metrics and tags | ||
| + | - **Add V3D script:** selects pipeline.v3s script | ||
| + | - **Build CMZ:** execute file to create CMZ files for each participant | ||
| + | |||
| + | < | ||
| + | |||
| + | -MakeHybridModel modelTemplateFile " | ||
| + | |||
| + | </ | ||
| + | |||
| + | ====== Analysis in Sift ====== | ||
| + | ===== Create Queries ===== | ||
| + | Once CMZ files are built, open Sift from the GUI and load the library. | ||
| + | |||
| + | Next step is to create the queries to have groups separated by trials and the link model based calculations. This will allow groups to be easily compared between different conditions and metrics. | ||
| + | |||
| + | This is done by opening the Explore tab on the left and select Query Builder. Follow along [[sift: | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | For example, we assessed the knee joint angle in the X direction (flexion/ | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Here is the query builder file used in this tutorial: [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | ===== Clean Data ===== | ||
| + | In Explore tab, you can visualize your data by selecting the group of interest then selecting all workspace (button). You can also view a single workspace. | ||
| + | |||
| + | If there are any traces that appear visually as outliers, they can be removed within the graph. To clean the data, start by selecting the trial(s) that had issues and right click -> Exclude Trace (raw data) to remove any incorrect trials. | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Alternative anomaly and outlier detection methods can be found from the [[https:// | ||
| + | |||
| + | |||
| + | {{..: | ||
| + | |||
| + | Once data is cleaned you can update CMZ data. This is shown through the [[sift: | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Select Excluded Traces and Add Event to Exclude Signals which is defined as BAD. This will tag the bad data helping to exclude those signals that are defined as " | ||
| + | |||
| + | ===== PCA ===== | ||
| + | Once the data is cleaned up, we can finally answer our question whether there is any explanation or statistically meaningful differences across gradients and speeds. Principal Component Analysis can be used to find components within the dataset that explain variance, specially which areas show variance. | ||
| + | |||
| + | In Analysis tab, select the groups you want to compare and select PCA icon in the toolbar. Follow [[sift: | ||
| + | - Set name for PCA | ||
| + | - Set Number PCs to 3 (variance explained over 90%) | ||
| + | - Set Use Workspace Mean | ||
| + | |||
| + | Results will popup | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Results of PCA can be interpreted as explained in [[sift: | ||
| + | |||
| + | ===== SPM ===== | ||
| + | Statistical Parametric Mapping is also another example of identifying regions throughout the waveform where groups or conditions that show variance, however its benefit is showing whether those regions have statistically significant differences. | ||
| + | |||
| + | Continue with analysis by selecting SPM icon in the toolbar. Follow [[sift: | ||
| + | - Set name for GLM | ||
| + | - Use Two-Sample T-Test (comparing two independent group) | ||
| + | - Select the groups for comparison | ||
| + | - Set Use Workspace Mean | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Head to Statistics and select Compute SPM | ||
| + | - Set SPM name | ||
| + | - Select Downhill_Fast as Group 1 and Downhill_Slow as Group 2 (can be interchangeable) | ||
| + | - Set Threshold to 0.05 | ||
| + | - Click Two-Tailed | ||
| + | - Create SPM | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Results of SPM can be interpreted as explained in [[sift: | ||
| + | |||
| + | ====== Project Question ====== | ||
| + | ===== Does variation of speed or gradient have a larger effect on changes in knee joint kinematics? ===== | ||
| + | | Changing Speed - Fast vs Slow | Changing Gradients - Downhill vs Uphill | | ||
| + | | {{..: | ||
| + | | Large variance in PC1 | Variance in both PC1 and PC2 | | ||
| + | | {{..: | ||
| + | | {{..: | ||
| + | | Highest variance at the peak flexion angle during the stance phase | Highest variance during the swing phase | | ||
| + | |||
| + | Changing gradients (ex. Running at slow pace uphill vs downhill) shows variance in both PC1 and PC2, while changing speed (ex. Running downhill at fast vs slow pace) shows variances in only PC1. When separating PCs using the Extreme Plot section of PCA analysis we can see PC1 explains variance in the peak joint angle, while PC2 explains phase shift | ||
| + | |||
| + | Changing Gradients - Running slow pace uphill vs downhill | ||
| + | | PC1 | PC2 | | ||
| + | | {{..: | ||
| + | |||
| + | ====== Analysis in Jiku ====== | ||
| + | ===== Jiku ===== | ||
| + | Although we have determined whether regions of the waveform have significant statistical differences, | ||
| + | |||
| + | |||
| + | Jiku Power1D is a statistical power analysis tool for one-dimensional continuum data. It is easily integrated with Sift, allowing you to complete your analysis seamlessly. Head to https:// | ||
| + | |||
| + | - Open up Power1D | ||
| + | - Select two-sample | ||
| + | - In the Explore tab from Sift, you can move the data into Power1D by selecting the group or workspace of interest. Click Shift and Ctrl to drag the group into Group A within Jiku Power1D. Do the same into Group B with the second group of interest you want to compare | ||
| + | - Choose ImportedDatum in the dropdown selection | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Head to Analysis | ||
| + | - Select Power Mode | ||
| + | - Leave Alpha at default value of 0.05. This signifies the significance level, which is the chosen risk tolerance for a false positive. This means there is an accepted 5% chance of finding a significant effect when non actually exists. | ||
| + | - Leave Iterations at 5000. This defines the number of times the computer simulator repeats a test. In each single iteration, the simulator tests both the null model (no effect) and the alterative model (true effect) | ||
| + | - Lead Seed at 0, and select Seed Lock. This is the initial number used to start the random number generator. Keeping it the same means the software will create the exact same random noise and graphs again. | ||
| + | - Change sample size mode to Absolute | ||
| + | - Use Sift Workspace to determine how many samples are used. Choose {{..: | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | Example. For one participant comparing running downhill at fast (Group A) vs slow (Group B) pace, Power1D will look like this. Click Run to simulate data. | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | |||
| + | This will popup Results | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | and Distribution | ||
| + | |||
| + | {{..: | ||
| + | |||
| + | **Results** indicate the power at each point across the domain. Domain represents time or cycle %. Non zero power means true effect is detectable at both maximal values and neighbouring values. Omnibus power represents the probability that the null hypothesis will be rejected in a large number of experiments. This is shown as the proportion of the h1 distribution that lies above the critical value. | ||
| + | |||
| + | There are two **distributions**. Distribution in gray represents the null hypothesis (h0), while distribution in blue represents alternative hypothsis (h1). The distribution represents the proportion of Zmax that exceeds the critical value meaning the null hypothesis is rejected. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
