Skip to content
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

statistic model session wise #1007

Closed
Rageve opened this issue May 2, 2023 · 11 comments · Fixed by #1116
Closed

statistic model session wise #1007

Rageve opened this issue May 2, 2023 · 11 comments · Fixed by #1116
Labels

Comments

@Rageve
Copy link

Rageve commented May 2, 2023

until you'll fix the issue with the already smoothed images from fmriprep when selecting use-aroma (..._preproc_smoothAROMAnonaggr_bold.nii.gz), I continued with the standard processing of the fmriprep unsmoothed images including copying and smoothing. Now I run the statistical model with the standard motion regressors as confounds.
Unfortunately, the first level statistic was concatenated over two session with 2 runs each (4 runs in one model). However, I would like to compute the first level model session wise (the same day/visit), that means two runs for session1 (ses-V0) and two runs for session 2 (ses-V9).
Should I modify the Nodes flags to run this model? Currently the definition is as follows.
"Nodes": [
{
"Level": "Run",
"Name": "run",
"GroupBy": [
"run",
"session",
"subject"
],

@github-actions
Copy link

github-actions bot commented May 2, 2023

We found the following entries in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@Remi-Gau
Copy link
Contributor

Remi-Gau commented May 2, 2023

OK from the top of my head I think this is something I have not yet implemented because no one had asked for it.

Specify contrasts at the session level is not yet present here:

switch lower(node.Level)
case 'run'
[contrasts, counter] = specifyRunLvlContrasts(contrasts, node, counter, SPM);
case 'subject'
if ~checkGroupBy(node)
continue
end
[contrasts, counter] = specifySubLvlContrasts(contrasts, node, counter, SPM);
end

It vaguely relates to: #809

Just to be clear the way this will most likely be implemented is to have all runs in single model and then compute contrasts session wise.

@Rageve
Copy link
Author

Rageve commented May 2, 2023 via email

@Remi-Gau
Copy link
Contributor

Remi-Gau commented May 2, 2023

Yes I think we agree on that. I may be phrasing it poorly.

Now I just need to find an example dataset to test and work on this. As I do I will most likely ask you for feedback to make sure we are on the same page.

@Remi-Gau
Copy link
Contributor

Remi-Gau commented May 2, 2023

Note to self.

Check the bids stats model Zoo or the fitlins repo to they have multisession examples with cross session contrasts.

@Rageve
Copy link
Author

Rageve commented May 3, 2023 via email

@Remi-Gau
Copy link
Contributor

Remi-Gau commented May 3, 2023

Wow. Thanks that definitely helps get the idea of the analysis you have in mind.

I have checked and there seems to be no example for such model in the model Zoo repo.

bids-standard/model-zoo#44

So this will the perfect occasion to also add one so that people in your situation have some guidance to follow.

Will be a bit busy in the coming days but I will make the time to work on this.

@Remi-Gau Remi-Gau added this to the v3.1.0 milestone Jun 18, 2023
@Remi-Gau Remi-Gau added the stats label Jun 18, 2023
@Remi-Gau
Copy link
Contributor

Remi-Gau commented Aug 7, 2023

@Rageve
Finally took some time this weekend to implement session level analysis.

I tested it on a couple of datasets from openneuro to run some kind of test / restest analysis across sessions.

The scripts are there: https://github.com/cpp-lln-lab/bidspm/tree/main/demos/openneuro

And the example for the BIDS stats model are here:

@Rageve
Copy link
Author

Rageve commented Aug 7, 2023 via email

@Remi-Gau
Copy link
Contributor

Remi-Gau commented Aug 7, 2023

Setting up those models can be challenging so let me know if you are struggling.

@Remi-Gau
Copy link
Contributor

Remi-Gau commented Aug 7, 2023

glad it is useful though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants