A permutation test (aka randomization test) for MATLAB, testing for a difference in means between two samples. It supports one- and two-tailed tests, and returns a p-value, the observed difference, and the effect size. The result can optionally be visualized using a histogram. It is also possible to perform exact tests, during which all possible permutations are considered.
Laurens R Krol (2019). Permutation Test (https://www.github.com/lrkrol/permutationTest), GitHub. Retrieved .
Dear Miguel, this sounds like a comma might have accidentally been deleted on your end. Please re-download the exact file provided here and run it again. If you continue to have issues, it would be better if you could open a new issue on GitHub: https://github.com/lrkrol/permutationTest/issues
If I try to run the exact same example that you provided:
sample1 = randn(1,5000);
sample2 = randn(1,5000) + .1;
permutationTest(sample1, sample2, 10000, 'plotresult', 1);
The code gives the "Error: File: permutationTest.m Line: 81 Column: 80
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct
matrices, use brackets instead of parentheses". I am a beginner in MATLAB coding. Is there anyway to workaround this?
Thanks for this code, very easy to use and understand.
Works really well! Thanks for the upload :)
- Changed number of bins in the plot
Added exact test