Created
October 15, 2019 11:51
-
-
Save VictorSaenger/e92c7ab0da66acaded345d7bc3dfdb46 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #Copy pooled distribution: | |
| pS = copy.copy(pV) | |
| #Initialize permutation: | |
| pD = [] | |
| #Define p (number of permutations): | |
| p=1000 | |
| # Permutation loop: | |
| for i in range(0,p): | |
| # Shuffle the data: | |
| random.shuffle(pS) | |
| # Compute permuted absolute difference of your two sampled distributions and store it in pD: | |
| pD.append(np.abs(np.average(pS[0:int(len(pS)/2)]) - np.average(pS[int(len(pS)/2):]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment