How to save beta maps from the first level GLM?

I am trying to use beta maps for second-level GLM analysis.
However, I cannot find a way to save the beta maps from the first-level GLM function. Does anyone know how to save the beta map as nii file?

I also found that nilearn default setting of the 2nd level ‘effect_size’ map. Is ‘effect size’ map beta map?

1 Like

Yes - see this code snippet in second-level analysis:

1 Like

Just to +1 @HaoTing_Wang 's answer, you can find this idea in the narrative documentation here :slightly_smiling_face:

1 Like

I am also trying to understand this.

In the link there is:

1. Does this mean that in order to get a beta map (as the beta_xxxx.nii from SPM), we need to use effect_size as input argument?

2. And the z_score argument will produce the z-scored version of the t-map produced from the beta map?

  1. Pure beta maps will come from individual conditions (that is, those that go into a contrast). The effect size here would be analogous to the “con_XXX” maps from SPM.
  2. Yes. You have beta maps for your individual conditions, contrast maps for the difference between the beta maps, t-maps for the statistical significance of the contrasts, and z-maps for a normalized version of the t-maps. Outputting the z-score will get you directly to the last step, which will likely be useful for the next step in your analyses.

Hope this helps,

1 Like

Clear. Thanks for clarifying this!