API Reference¶
-
bs_1sample
(x: numpy.ndarray, func: Callable[[numpy.ndarray], Any], size: int = 5000) → int[source]¶ One sample bootsrap replicates.
- Parameters
x (arraylike) – The sample from which replicates will be drawn
func (callable[[np.ndarray], float]) – The function that returns the statistic to be calculated on x.
size (int) – The number of bootstrap replicates to generate
- Returns
A numpy array of bootstrap replicates
-
bs_2sample
(x: numpy.ndarray, y: numpy.ndarray, func: Callable[[numpy.ndarray, numpy.ndarray], Any], size: int = 5000) → numpy.ndarray[source]¶ Two sample bootsrap replicates.
- Parameters
x (arraylike) – The first sample from which replicates will be drawn
y (arraylike) – The second sample from which replicates will be drawn
func (callable[[np.ndarray, np.ndarray], float]) – The function that returns the statistic to be calculated on x and y.
size (int) – The number of bootstrap replicates to generate
- Returns
A numpy array of bootstrap replicates
-
bs_pairs
(x: numpy.ndarray, y: numpy.ndarray, func: Callable[[numpy.ndarray, numpy.ndarray], Any], size: int = 5000) → numpy.ndarray[source]¶ Generate bootstrap replicates from pairs of x and y.
- Parameters
x (arraylike) – The first variable from which replicates will be drawn
y (arraylike) – The second variable from which replicates will be drawn
func (callable[[np.ndarray, np.ndarray], float]) – The function that returns the statistic to be calculated on x and y.
size (int) – The number of bootstrap replicates to generate
- Returns
A numpy array of bootstrap replicates
-
permutation_2sample
(x: numpy.ndarray, y: numpy.ndarray, func: Callable[[numpy.ndarray, numpy.ndarray], Any], size: int = 5000) → numpy.ndarray[source]¶ Generate permutation replicates from two samples.
- Parameters
x (arraylike) – The first sample from which replicates will be drawn
y (arraylike) – The second sample from which replicates will be drawn
func (callable[[np.ndarray, np.ndarray], float]) – The function that returns the statistic to be calculated on x and y.
size (int) – The number of permutation replicates to generate
- Returns
A numpy array of bootstrap replicates
-
permutation_2sample_independent
(x: numpy.ndarray, y: numpy.ndarray, func: Callable[[numpy.ndarray, numpy.ndarray], Any], size: int = 5000) → numpy.ndarray[source]¶ Generate permutation replicates from two samples by permuting them independently.
- Parameters
x (arraylike) – The first sample from which replicates will be drawn
y (arraylike) – The second sample from which replicates will be drawn
func (callable[[np.ndarray, np.ndarray], float]) – The function that returns the statistic to be calculated on x and y.
size (int) – The number of permutation replicates to generate
- Returns
A numpy array of bootstrap replicates