Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.
nilearn.glm.compute_fixed_effects¶
- nilearn.glm.compute_fixed_effects(contrast_imgs, variance_imgs, mask=None, precision_weighted=False, dofs=None, return_z_score=False)[source]¶
Compute the fixed effects, given images of effects and variance.
- Parameters:
- contrast_imgs
list
of Nifti1Images orstr
orSurfaceImage
The input contrast images.
- variance_imgs
list
of Nifti1Images orstr
orSurfaceImage
The input variance images.
- maskNifti1Image or NiftiMasker instance or
SurfaceMasker
instance or None, default=None Mask image. If
None
, it is recomputed fromcontrast_imgs
.- precision_weighted
bool
, default=False Whether fixed effects estimates should be weighted by inverse variance or not.
- dofsarray-like or None, default=None
the degrees of freedom of the models with
len = len(variance_imgs)
whenNone
, it is assumed that the degrees of freedom are 100 per input.- return_z_score
bool
, default=False Whether
fixed_fx_z_score_img
should be output or not.
- contrast_imgs
- Returns:
- fixed_fx_contrast_imgNifti1Image or
SurfaceImage
The fixed effects contrast computed within the mask.
- fixed_fx_variance_imgNifti1Image or
SurfaceImage
The fixed effects variance computed within the mask.
- fixed_fx_stat_imgNifti1Image or
SurfaceImage
The fixed effects stat computed within the mask.
- fixed_fx_z_score_imgNifti1Image, optional
The fixed effects corresponding z-transform
- fixed_fx_contrast_imgNifti1Image or
- Warns:
- DeprecationWarning
Starting in version 0.13, fixed_fx_z_score_img will always be returned
Examples using nilearn.glm.compute_fixed_effects
¶
Simple example of two-runs fMRI model fitting