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.second_level.make_second_level_design_matrix#
- nilearn.glm.second_level.make_second_level_design_matrix(subjects_label, confounds=None)[source]#
Sets up a second level design.
Construct a design matrix with an intercept and subject specific confounds.
- Parameters
- subjects_label
list
ofstr
Contain subject labels to extract confounders in the right order, corresponding with the images, to create the design matrix.
- confounds
pandas.DataFrame
orNone
, optional If given, contains at least two columns,
subject_label
and one confound. The subjects list determines the rows to extract from confounds thanks to itssubject_label
column. All subjects must have confounds specified. There should be only one row per subject. Default=None.
- subjects_label
- Returns
- design_matrix
pandas.DataFrame
The second level design matrix.
- design_matrix
Examples using nilearn.glm.second_level.make_second_level_design_matrix
#
Example of second level design matrix
Example of second level design matrix