Created
July 29, 2018 01:58
-
-
Save otaviomguerra/949e6de36b1f2c45d1708de145641dec to your computer and use it in GitHub Desktop.
Perform various bootstrap replications using bootstrap_replicates.py function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def draw_bs_reps(data, func, size=1): | |
"""Draw bootstrap replicates.""" | |
# Initialize array of replicates: bs_replicates | |
bs_replicates = np.empty(size) | |
# Generate replicates | |
for i in range(size): | |
bs_replicates[i] = bootstrap_replicate_1d(data, func) | |
return bs_replicates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment