fit_beh#

mne_plsc.fit_beh(data, covariates, design=None, between=None, within=None, participant=None, source_domain=None, source_freqs=None, boot_stat='score-covariate-corr', svd_method='lapack', random_state=None)#

Fit behaviour PLS model.

Parameters:
  • data (MNE object or iterable of MNE objects) – The M/EEG data to analyze. For single-participant analysis, this should be an instance of one of MNE’s data containers for epoched data (e.g., mne.Epochs) and each observation will be a single trial. For group-level analysis, this should be an iterable of MNE data containers for averages over epochs (e.g., mne.Evoked), and each observation will be a participant’s average in a within-participants condition.

  • covariates (np.ndarray | pd.DataFrame | iterable of str) – Array or dataframe containing covariates, or an iterable of strings specifying the name(s) of the column(s) in design that contain the covariates.

  • design (pd.DataFrame, optional) – Design matrix containing indicators of experimental condition and/or covariates. The default is None.

  • between (iterable | str, optional) – An iterable containing indicators (integer or string labels) of between-participants conditions, or a string specifying which column in design contains such an indicator. The default is None.

  • within (iterable | str, optional) – An iterable containing indicators (integer or string labels) of within-participants conditions, or a string specifying which column in design contains such an indicator. The default is None.

  • participant (iterable | str, optional) – An iterable containing indicators (integer or string labels) of participant identity, or a string specifying which column in design contains such an indicator. The default is None. This is required only if there is a within-participants condition.

  • source_domain (str, optional) –

    If model is fit to source-space data, this argument specifies the domain of the source space. Must be one of:

  • source_freqs (numpy.ndarray, optional) – If model is fit to source-space data and source domain is time or time-frequency, this argument specifies the frequencies in the source data.

  • boot_stat (str, optional) – Specifies which statistic should be computed on each bootstrap iteration. The default is 'score-covariate-corr'. See pyplsc.PLSC for details.

  • svd_method (str, optional) – The method of SVD decomposition. The default is 'lapack'. See pyplsc.PLSC for details.

  • random_state (int, optional) – Random state for seeding the model. The default is None.

Returns:

PLSC object fit to the data.

Return type:

PLSC