0todd0000 / spm1d

One-Dimensional Statistical Parametric Mapping in Python
GNU General Public License v3.0
61 stars 21 forks source link

Multivariate Random Effects Analysis #88

Closed thomas-neitmann closed 5 years ago

thomas-neitmann commented 5 years ago

How would one conduct a multivariate random effects analysis?

Let's assume I have a group of subjects performing two variants of a movement and I would like to compare the lower limb kinematics (hip, knee, and ankle) between these variants. Here is what I though would be the right way to do it: 1) For each subject and each variable calculate SPM{t} 2) Calculate SPM{T^2} using a vector of SPM{t}'s 3) If the null hypothesis is rejected conduct scalar field post hoc tests for each individual SPM{t}

Would that be a valid way to conduct the analysis?

0todd0000 commented 5 years ago

It is indeed possible to conduct inference on multiple tests statistics including multiple SPM{t}s, but that requires conjunction analysis. Conjunction analysis can be implemented relatively easily in spm1d, using spm1d.rft1d.prob.RFTCalculator and the keyword n to specify the number of test statistics in conjunction. If you'd like more details please let me know. In the meantime, the following solution might be easier:

  1. Calculate mean kinematics for each subject and variant. Assemble all data into two (J x Q x I) arrays, one for each variant, where J, Q, and I represent the numbers of subjects, continuum (time) nodes, and vector components, respectively. If there are three joints with three components each then I=9.

  2. Conduct a paired Hotelling's T2 test.

This approach is a form of hierarchical modeling, where model parameters (means) are computed at the first level, then tested in a second level model. It is analogous to the example here: http://www.spm1d.org/doc/RandomEffects.html

Please note that statistical power may be a problem: if I = 9 then J has to be quite large (e.g. J>25) for reasonable statistical power.

thomas-neitmann commented 5 years ago

The hierachical modeling that you suggest is actually what I started with. Yet, upon reading your Random Effects example in the documentation I got the feeeling that this would be a fixed effects analysis, therby only allowing inference to the studied subjects and not the population from which they were "drawn". But apparently I am wrong.

How would the interpretation of this hierachical modelling differ from the conjunction analysis?

0todd0000 commented 5 years ago

If the second-level model assumes random sampling then the analysis is a random effects analysis. In the example at the link above a one-sample t test is used at the second level, and this assumes random sampling, so the analysis is a random effects analysis. Hotelling's tests similarly assume random sampling.

The key difference between hierarchical (random effects) modeling and conjunction analysis is that the former pertains to mean effects and the latter pertains to minimum effects across all participants. If there are N participants and (N-1) of them show large effects, but one of them shows zero effect, then conjunction analysis will not reach significance. A hierarchical t test contrastingly would reach significance because the mean effect is large.