Skip to content

Wilcoxon and the use of simulation

2 messages · shl2a, Peter Dalgaard

#
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.
#
On Oct 14, 2011, at 09:39 , shl2a wrote:

            
Well, he wants you to use your brain, not ours... This is not a list for helping people with their homework. Look through your teaching materials and notes and see if your friendly prof hasn't already provided an example of doing replicated simulations, drawing a histogram of the results, etc.