Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = c(-0.2, -0.05, 0.1, 0.15, 0.2)
- wilcox.test(x)
- Wilcoxon signed rank test with continuity correction
- data: x
- V = 9.5, p-value = 0.6845
- alternative hypothesis: true location is not equal to 0
- Warning message:
- In wilcox.test.default(x) : cannot compute exact p-value with ties
- x = c(0.1, 0.3, 0.4, 0.5, 0.8)
- wilcox.test(x, alt="gr")$p.val
- [1] 0.03125
- set.seed(617)
- pv = replicate( 10^5,
- wilcox.test(round(runif(15, -.4, 1),1), alt="g")$p.val )
- There were 50 or more warnings (use warnings() to see the first 50)
- mean(pv <= .05)
- [1] 0.81138
- set.seed(617)
- x = round(runif(15, -.4, 1),1)
- sort(x)
- [1] -0.4 -0.3 -0.1 -0.1 0.1 0.2 0.3 0.5 0.7
- [10] 0.7 0.8 0.8 0.8 1.0 1.0
- wilcox.test(x, alt="g")
- Wilcoxon signed rank test with continuity correction
- data: x
- V = 103.5, p-value = 0.007189
- alternative hypothesis: true location is greater than 0
- Warning message:
- In wilcox.test.default(x, alt = "g") :
- cannot compute exact p-value with ties
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement