bootstrap module

Bootstrap routines for Group-level model fitting Included are fast version of the routine using cross-block correlation estimation

Author: joern.diedrichsen@googlemail.com

bootstrap.bootstrap_group_corr(D, M, fixed_effect=None, n_bootstr=1000, fit_scale=False, boot_indx=None, verbose=False)

Bootstrap the group correlation estimate of the PCM model

Parameters:
  • D (list of pcm.Datasets) – List of datasets for each subject

  • M (pcm.Model) – PCM correlation model to fit

  • fixed_effect (array-like or list of array-like) – Optional fixed effect to include in the model. if only one is given, it is assumed to be the same for all subjects, otherwise a subject-specific list.

  • n_bootstr (int) – Number of bootstrap samples to draw (default: 1000)

  • fit_scale (bool) – Whether to fit the scale parameter of the model (default: False)

  • boot_indx (ndarray) – Optional pre-defined bootstrap indices (shape: n_subj x n_bootstr)

  • verbose (bool) – Whether to print progress information during bootstrapping (default: False)

Returns:
  • r_boot (ndarray) – Bootstrap distribution of the group correlation estimate (shape: n_bootstr,)

  • fSNR_boot (ndarray) – Bootstrap distribution of the group fSNR estimate (shape: n_bootstr,)

  • boot_indx (ndarray) – The bootstrap indices used for the resampling (shape: n_subj x n_bootstr