I am using Wilcoxon test to compare two paired sets of data for whether their means differ. Besides the p-value, I would also like to know the power of this test. How to compute it in R? Thank you in advance.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
I don't know if there's an analytical solution to your question, but when all else fails, one can simulate the distribution you think the two samples come from many thousands of times using Monte Carlo methods. The percentage of those samples the Wilcoxon test correctly identifies as "different" is the power of the test. For example, if you generated 10,000 different simulated paired samples that match your actual data in terms of size and the distribution they came from, and 8,000 of them are correctly identified by the test as different, your power = 0.80.