[R] Wilcoxon and the use of simulation
shl2a
su.lee.1990 at gmail.com
Fri Oct 14 09:39:32 CEST 2011
Dear forum users,
It's 3:35am and I am swamped with statistics homework lol
I'm terrible with R and this time I have no idea what the prof wants. Here
is the question:
Consider the (two-‐sample) Wilcoxon rank statistic T = Σrank(Xi). For
n1=106 and n2=192, determine by simulation the α=.05 critical point for
testing H0: θ=0, H1:θ<0.
We can do this as follows:
For m=10000 (no wimpy m=200 or 500 as in the book),
draw m=10000 subsets of size 106 from the integers 1:298
using repeatedly the command
xdat = sample(1:298, size=106).
For each such subset, the value of the Wilcoxon is sum(xdat). Be sure to
answer the following question: why is it unnecessary to calculate ranks?
Any help would be greatly appreciately at this time.
--
View this message in context: http://r.789695.n4.nabble.com/Wilcoxon-and-the-use-of-simulation-tp3904036p3904036.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list