0todd0000 / spm1d

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

Beta calculation for random effect analysis #110

Closed tramarobin closed 4 years ago

tramarobin commented 4 years ago

Hi Todd!

I think my design is adapted for random effect analysis as I have a pre/post tests design with multiple trials for each test. I used to calculate the mean of all the trials and perform a paired t-test, but I wish to take into account the within-subject variability.

I have a question about random effect analysis, and more precisely on the level 1 analysis. In the example, linear regressions are used and Beta corresponded regression slopes for each subject. However, in my case, my independant variable is not continuous, but categorical. Can I extract T-continuum (with paired t-test) for each subject as Beta parameter, and conduct the level 2 analysis on Beta ?

Thank you.

0todd0000 commented 4 years ago

Hello! For categorical variables the Beta values are means. So simply compute 1D means for each subject and each category, then submit these to second-level analysis. For a pre/post design the suitable second-level model is probably a paired t test.

This hierarchical approach implicitly considers within-subject variability. If subjects are highly variable, their means are also expected to be highly variable, implying that variance will be large in second-level analyses. If, however, within-subject variability is small, then the means are relatively stable and are suitable for second-level analysis.

tramarobin commented 4 years ago

Thank you again for your quick and usefull answers. I close the issue.