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 ofstr) – Array or dataframe containing covariates, or an iterable of strings specifying the name(s) of the column(s) indesignthat contain the covariates.design (
pd.DataFrame, optional) – Design matrix containing indicators of experimental condition and/or covariates. The default isNone.between (iterable |
str, optional) – An iterable containing indicators (integer or string labels) of between-participants conditions, or a string specifying which column indesigncontains such an indicator. The default isNone.within (iterable |
str, optional) – An iterable containing indicators (integer or string labels) of within-participants conditions, or a string specifying which column indesigncontains such an indicator. The default isNone.participant (iterable |
str, optional) – An iterable containing indicators (integer or string labels) of participant identity, or a string specifying which column indesigncontains such an indicator. The default isNone. 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:
'time'For output ofmne.minimum_norm.apply_inverse(),mne.beamformer.apply_lcmv(), etc. This is assumed by default.'freq'For output ofmne.minimum_norm.apply_inverse_cov(),mne.beamformer.apply_dics(), etc.'time-freq'For output ofmne.minimum_norm.apply_dics_tfr_epochs, :func:`mne.beamformer.apply_dics_tfr_epochs(), etc.
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'. Seepyplsc.PLSCfor details.svd_method (
str, optional) – The method of SVD decomposition. The default is'lapack'. Seepyplsc.PLSCfor details.random_state (
int, optional) – Random state for seeding the model. The default is None.
- Returns:
PLSC object fit to the data.
- Return type: