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(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.

contrast_imgslist of Nifti1Images or strings

The input contrast images.

variance_imgslist of Nifti1Images or strings

The input variance images.

maskNifti1Image or NiftiMasker instance or None, optional

Mask image. If None, it is recomputed from contrast_imgs.

precision_weightedBool, optional

Whether fixed effects estimates should be weighted by inverse variance or not. Default=False.

dofsarray-like or None, default=None

the degrees of freedom of the models with len = len(variance_imgs) when None, 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.


The fixed effects contrast computed within the mask.


The fixed effects variance computed within the mask.


The fixed effects stat computed within the mask.

fixed_fx_z_score_imgNifti1Image, optional

The fixed effects corresponding z-transform


Starting in version 0.13, fixed_fx_z_score_img will always be returned

Examples using nilearn.glm.compute_fixed_effects#

Example of explicit fixed effects fMRI model fitting

Example of explicit fixed effects fMRI model fitting