nilearn / nistats

Modeling and statistical inference on fMRI data in Python
BSD 3-Clause "New" or "Revised" License
95 stars 55 forks source link

Mean scaling conventions and options #44

Closed MartinPerez closed 8 years ago

MartinPerez commented 8 years ago

I am not sure about all the implications of mean scaling the signal by voxels or globally, but since in nistats we change the conventions of SPM, maybe it would be a good idea to open this as an option instead of forcing the user to follow a different convention? Also for matters of replicability of SPM results.

In glm.py in the documentation we have: Y : array of shape(n_time_points, n_voxels) then in line 54: mean = Y.mean(0).

What do you think?

bthirion commented 8 years ago

Correct me if I'm wrong, but the SPM standard consists in replacing the voxel-level mean signal. with the image mean, i.e. mean = Y.mean(), I have to say that I don't understand this because the percent signal change is quite different across voxels. However, if you believe that it's important, I suggest to dedicate a PR to that, after checking what SPM does.

MartinPerez commented 8 years ago

I think its important for reproducibility of results to leave the option open for the user to select it even if we adopt as default something more reasonable, and clarify it in the documentation. I remember being the global mean the case in SPM but honestly I dont understand all the implications, I think the main argument is to be able to meaningfully compare across voxels and ROIs since they share the same baseline, but also then there is the clear problem of mixing white and grey matter. I just think giving the option cost little and do not enter in conflict then with the standard imposed by what is still a main tool of analysis in fMRI.

bthirion commented 8 years ago

Makes sense. Please issue a PR at your convenience.