User Tools

Site Tools


sift:statistical_parametric_mapping:the_math_of_statistical_parametric_mapping_spm

The Math of Statistical Parametric Mapping

All of the math behind SPM is done internally with Sift, but a brief summary is provided here for user knowledge. Please refer to the references for more detailed explanations.

What is Statistical Parametric Mapping?

Statistical Parametric Mapping (SPM) is a method to create “Maps” of arbitrary statistical tests, which can be applied across the entirety of a continuous curve. These maps exist in the same dimensional space as their underlying data, which allows for the results to be more interpretable, as well as removing bias relating to selecting summary statistics like maximums, minimums or averages. Using random-field-theory, the inherent dependence between the parameters on these maps can be accounted for when determining how statistically relevant the results of a map are.

The GLM

The basis of SPM begins with modeling the data with a General Linear Model (GLM). A GLM is simply relating our data to an experimental design. This experimental design (in the form of a matrix) represents the experiment, and may represent what group or condition a trial belongs to (i.e. a 1 in the column that the trial belongs to, and 0 otherwise, etc.). These are related though the formula:

Where Y is the original data, X represents the experimental design, B is a regression matrix (to be estimated using a Moore-Penrose inverse) and e is the resulting residuals.

This GLM enables the application of linear tests to each data point (i.e. a point in time for a gait analysis), such as a t-test or ANOVA, creating a “Statistical Parametric Map”, existing in the same n-dimensional space as the original data points (eg. 101 time data points for a normalized gait cycle).

T-Tests

For a t-test, the GLM is modelled as above, with the design matrix consisting of 1's indicating a grouping for each test, and 0's otherwise. The SPM is evaluated with:

where c is a contrast vector indicating how we are selecting from our regression matrix (B), ^T represents a transposed matrix, sigma is the square-root of our variance, and X is our design matrix. The calculation for sigma is shown below:

where diag() is the diagonal values in a vector, e is the residuals, I represents the number of trials we have modeled (the # of rows in our Y Matrix), and rank(X) is equal to the number of groups (for a t-test, this would be 2).

This equation for T follows a T-distribution of degrees of freedom equal to I - rank(X).

ANOVA

For our ANOVA tests, we model the GLM slightly differently. Instead of the design matrix including just the groupings, we add an additional term to represent the group-level effect (i.e. effect of all groups together), which is represented by all 1's in the design matrix. This is because the ANOVA test requires a “full” model (with group-level and individual group effect included), and a “reduced” model(with just the group-level effect modelled), which it compares. The contrast is applied slightly differently as well: we use it to help us form the full model and reduced models, using a projection matrix.

Where B is the ANOVA regression matrix, X is the design matrix, M is our projection matrix, and R is the “residual forming matrix”, which is similar to the projection matrix, and is the matrix which when applied to Y returns the given residuals.

The SPM follows a F-distribution with degrees of freedom rank(X) and I - rank(X).

Random Field Theory

With n samples in our map, it would be sound to estimate the significance with a Bonferroni correction, but we know that spatially similar data points in biomechanics are intrinsically dependent on each other, and thus the Bonferroni assumption of independence between data points would result in a far more conservative than necessary significance. As such, Random Field Theory (rft) is employed to estimate the dependence between data points (called smoothness), and to establish a threshold for statistical significance of the data. This can be represented with the familiar p-values for simple t-tests.

References

Our implementation of Statistical Parametric Mapping is based on articles by Todd Pataky, as well as the textbook on the topic: “Statistical Parametric Mapping - The Analysis of Functional Brain Images”:

K. Friston, J. Ashburner, S. Kiebel, T. Nichols, and W. Penny, Statistical Parametric Mapping: The Analysis of Functional Brain Images, 1st ed.; Academic Press: Cambridge, MA, USA, 2006; ISBN 978-0-08-046650-7.

Pataky TC (2010) Generalized n-dimensional biomechanical field analysis using statistical parametric mapping. Journal of Biomechanics 43. 1976-82 ([1])

sift/statistical_parametric_mapping/the_math_of_statistical_parametric_mapping_spm.txt · Last modified: by wikisysop