mosaicperm.statistics.adaptive_mosaic_bcv_stat

mosaicperm.statistics.adaptive_mosaic_bcv_stat(residuals: array, new_exposures: array | list, tiles: list, mus: array | None = None) array[source]

Computes a mosaic BCV statistic for several augmented models.

Parameters:
residualsnp.array

(n_obs, n_subjects) array of residuals

new_exposuresnp.array

(n_models, n_subject)-shaped array such that new_exposures[i] is an array of new exposures.

tilesmosaicperm.tilings.Tiling

The Tiling used to produce the mosaic residuals.

musnp.array

Optional n_subjects-length array of estimated means of residuals.

Returns:
r2np.array

Array of mosaic bi-cross validation empirical R^2 values.