-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] Add comparison of meaning differences of GLM between different libraries #4287
Open
tpremrud
wants to merge
8
commits into
nilearn:main
Choose a base branch
from
tpremrud:glm-meaning-diff
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+62
−0
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b93f9a1
Initial commit to provide framework
tpremrud 8cb9d0d
Merge branch 'nilearn:main' into glm-meaning-diff
tpremrud 70f9a67
Modified meaning_difference.rst
tpremrud 62938e3
Modified index to include different meaning doc
tpremrud 8a0a520
Update doc/glm/meaning_difference.rst
tpremrud 745290b
Update doc/glm/meaning_difference.rst
tpremrud 1f5f7d3
Merge branch 'nilearn:main' into glm-meaning-diff
tpremrud 729dd92
Merge branch 'nilearn:main' into glm-meaning-diff
tpremrud File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.. _meaning_difference: | ||
|
||
================================================== | ||
Difference in meanings between different toolboxes | ||
================================================== | ||
|
||
.. topic:: **Page summary** | ||
|
||
* SPM has the same meaning of analysis levels, compared to nilearn's models | ||
* First-level: analyze across runs | ||
* Second-level: group-level analysis | ||
* FSL has a different meaning | ||
* First-level: analyze one session for one subject | ||
* Second-level: analyze across sessions for one subject | ||
* Third-level: group-level analysis | ||
|
||
These differences can be put in the table below: | ||
|
||
+----------------------------------------------+----------------+------------------+---------------+ | ||
| Analyze | nilearn | SPM | FSL | | ||
+==============================================+================+==================+===============+ | ||
| One session, one subject | First-level | First-level | First\-level | | ||
+----------------------------------------------+----------------+------------------+---------------+ | ||
| More than one session, one subject | First\-level | First\-level | Second\-level | | ||
+----------------------------------------------+----------------+------------------+---------------+ | ||
| More than or equal to one session, | Second\-level | Second\-level | Third\-level | | ||
| more than one subject | | | | | ||
+----------------------------------------------+----------------+------------------+---------------+ | ||
|
||
*Table showing the differences of the meaning for level of models between toolboxes\/libraries* | ||
|
||
Statistical Parametric Mapping (SPM) | ||
==================================== | ||
|
||
SPM uses the same notation as nilearn for analysis levels, with a note that a session still refers to an imaging session or a run, and within a run there could be multiple conditions (e.g., congruent and incongruent). | ||
In this case, `SPM`_ provided `tutorials`_ and documentation, including `lectures`_, which one could learn to analyze their own fMRI data with the meaning of analysis levels being as follows: | ||
|
||
* `First-level analysis in SPM`_: Analyze across sessions for a subject (i.e., more than one session of one subject) | ||
* `Second-level analysis in SPM`_: Analyze across several subjects (i.e., more than one subject with one or more sessions per subject). This is also known as **group-level analysis** which test if the average estimate across subjects is statistically significant. | ||
|
||
.. _SPM: https://www.fil.ion.ucl.ac.uk/spm/docs/ | ||
.. _tutorials: https://www.fil.ion.ucl.ac.uk/spm/docs/tutorials/ | ||
.. _lectures: https://www.fil.ion.ucl.ac.uk/spm/docs/courses/fmri_vbm/recordings/glm/ | ||
tpremrud marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.. _First-level analysis in SPM: https://andysbrainbook.readthedocs.io/en/latest/SPM/SPM_Short_Course/SPM_Statistics/SPM_06_Stats_Running_1stLevel_Analysis.html | ||
.. _Second-level analysis in SPM: https://andysbrainbook.readthedocs.io/en/latest/SPM/SPM_Short_Course/SPM_08_GroupAnalysis.html | ||
|
||
FMRIB Software Library (FSL) | ||
============================ | ||
|
||
FSL uses a slightly different set of meanings for analysis levels, but with a note that a session still refers to an imaging session or a run. | ||
Specifically, `FEAT`_, FSL software tool for model-based fMRI data analysis, provides GUI to run analysis on imaging data for first-level and higher-level analysis with the `terminology meaning`_ as follows: | ||
|
||
* `First-level analysis in FSL`_: Analyze each session's data by getting the parameter and contrast estimates (i.e., one session of one subject) | ||
* `Second-level analysis in FSL`_: Analyze across sessions for a subject via averaging the parameter and contrast estimates within each subject (i.e., more than one session of one subject) | ||
* `Third-level analysis in FSL`_: Analyze across several subjects or group-level analysis on the averaged contrast estimates for all subjects within the group (i.e., more than one subject with one or more sessions per subject) | ||
|
||
.. _FEAT: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FEAT/UserGuide#Appendix_A:_Brief_Overview_of_GLM_Analysis | ||
.. _terminology meaning: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FEAT/UserGuide#First-level_or_Higher-level_Analysis.3F | ||
.. _First-level analysis in FSL: https://andysbrainbook.readthedocs.io/en/latest/fMRI_Short_Course/Statistics/06_Stats_Running_1stLevel_Analysis.html | ||
.. _Second-level analysis in FSL: https://andysbrainbook.readthedocs.io/en/latest/fMRI_Short_Course/fMRI_07_2ndLevelAnalysis.html | ||
.. _Third-level analysis in FSL: https://andysbrainbook.readthedocs.io/en/latest/fMRI_Short_Course/fMRI_08_3rdLevelAnalysis.html |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that we should mention somewhere that it is typical in the SPM workflow to put all runs in a single design matrix, where as nilearn typically will give you one design matrix per run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha @Remi-Gau , that's a really great point! However, I'm wondering if I understand the concept correctly, so if there are different conditions, do they still count as a single run if the imaging acquisition is continuous, uninterrupted, and comprise of the same parameters?
I'm looking at nilearn example it seems like there are different conditions within a design matrix, but you said that nilearn gives one design matrix per run, so I'm just not sure if I understand the concept of run correctly as I should or not.
But the SPM really does have a design matrix that goes through all the runs in one matrix.
Thank you!!