mne_nirs.experimental_design.make_first_level_design_matrix#

mne_nirs.experimental_design.make_first_level_design_matrix(raw, stim_dur=1.0, hrf_model='glover', drift_model='cosine', high_pass=0.01, drift_order=1, fir_delays=[0], add_regs=None, add_reg_names=None, min_onset=-24, oversampling=50)[source]#

Generate a design matrix based on annotations and model HRF.

This is a wrapper function for the nilearn [1] function make_first_level_design_matrix. For detailed description of the arguments see the nilearn documentation at http://nilearn.github.io

Parameters:
rawinstance of Raw

Haemoglobin data.

stim_durNumber

The length of your stimulus.

hrf_model{‘glover’, ‘spm’, ‘spm + derivative’, ‘spm + derivative + dispersion’, ‘glover + derivative’, ‘glover + derivative + dispersion’, ‘fir’, None}, optional

Specifies the hemodynamic response function. Default=’glover’.

drift_model{‘cosine’, ‘polynomial’, None}, optional

Specifies the desired drift model. Default=’cosine’.

high_passfloat, optional

High-pass frequency in case of a cosine model (in Hz). Default=0.01.

drift_orderint, optional

Order of the drift model (in case it is polynomial). Default=1.

fir_delaysarray of shape(n_onsets) or list, optional

In case of FIR design, yields the array of delays used in the FIR model (in scans). Default=[0].

add_regsarray of shape(n_frames, n_add_reg) or pandas DataFrame

Additional user-supplied regressors, e.g. data driven noise regressors or seed based regressors.

add_reg_nameslist of (n_add_reg,) str, optional

If None, while add_regs was provided, these will be termed ‘reg_%i’, i = 0..n_add_reg - 1 If add_regs is a DataFrame, the corresponding column names are used and add_reg_names is ignored.

min_onsetfloat, optional

Minimal onset relative to frame_times[0] (in seconds) events that start before frame_times[0] + min_onset are not considered. Default=-24.

oversamplingint, optional

Oversampling factor used in temporal convolutions. Default=50.

Returns:
design_matrixDataFrame instance,

Holding the computed design matrix, the index being the frames_times and each column a regressor.

References

Examples using mne_nirs.experimental_design.make_first_level_design_matrix#

GLM Analysis (Simulated)

GLM Analysis (Simulated)

GLM Analysis (Measured)

GLM Analysis (Measured)

Group Level GLM Analysis

Group Level GLM Analysis

GLM FIR Analysis

GLM FIR Analysis

GLM and Design Matrix Parameters

GLM and Design Matrix Parameters

Frequency and Filter Commentary

Frequency and Filter Commentary

Utilising Auxiliary Data

Utilising Auxiliary Data

Utilising Anatomical Information

Utilising Anatomical Information

Save and load GLM results

Save and load GLM results