Bootstrap tests (spynal.randstats.bootstrap)

Nonparametric bootstrap statistics

one_sample_bootstrap_test(data, axis=0, mu=0, stat='t', tail='both', n_resamples=10000, seed=None, return_stats=False, keepdims=True, **kwargs)

Mass univariate 1-sample bootstrap test

Parameters and returns are same as one_sample_test()

Computes stat on each bootstrap resample, and subtracts off stat computed on observed data to center resamples at 0 (mu) to estimate null distribution. p value is proportion of centered resampled values exceeding observed value.

References

Manly (1997) “Randomization, Bootstrap and Monte Carlo Methods in Biology” ch. 3.10

paired_sample_bootstrap_test(data1, data2, axis=0, d=0, stat='t', tail='both', n_resamples=10000, seed=None, return_stats=False, keepdims=True, **kwargs)

Mass univariate paired-sample bootstrap test

Parameters and returns are same as paired_sample_test()

Computes stat on each bootstrap resample, and subtracts off stat computed on observed data to center resamples at 0 (mu) to estimate null distribution. p value is proportion of centered resampled values exceeding observed value.

References

Manly (1997) “Randomization, Bootstrap and Monte Carlo Methods in Biology” ch.6.1

paired_sample_association_bootstrap_test(data1, data2, axis=0, stat='r', tail='both', n_resamples=10000, seed=None, return_stats=False, keepdims=True, **kwargs)

Mass bivariate boostrap test of association (eg correlation) between two paired samples

Parameters and returns are same as paired_sample_association_test()

Observations are bootstrap resampled in pairs, and stat is recomputed on each. Stat computed on observed data is subtracted off resamples, to center them at 0 and estimate null distribution. p value is proportion of centered resampled values exceeding observed value.

two_sample_bootstrap_test(data1, data2, axis=0, stat='t', tail='both', n_resamples=10000, seed=None, return_stats=False, keepdims=True, **kwargs)

Mass univariate bootstrap two-sample test

Parameters and returns are same as two_sample_test()

Computes stat on each pair of bootstrap resamples, and subtracts off stat computed on observed data to center resamples at 0 (mu) to estimate null distribution. p value is proportion of centered resampled values exceeding observed value.

References

Manly (1997) “Randomization, Bootstrap and Monte Carlo Methods in Biology” ch.3.10, 6.3