Re: [R] Generating data from Null Distribution

2010-01-07 Thread Greg Snow
n...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Jim Silverton > Sent: Wednesday, January 06, 2010 1:17 AM > To: r-help@r-project.org > Subject: Re: [R] Generating data from Null Distribution > > Hello everyone, > > Can someone tell me exactly ho

Re: [R] Generating data from Null Distribution

2010-01-06 Thread Robin Hankin
Jim the 2x2 case is reasonably straightforward because the support is quite a small set. With the aylmer package you could do this: > a <- matrix(c(1,5,7,8),2,2) > sample(seq_along(allprobs(a)),100,replace=TRUE,prob=allprobs(a)) [1] 3 2 4 1 3 4 4 4 4 3 3 4 4 2 3 4 5 4 3 3 4 4 2 1 4 3 3 3 4 2

Re: [R] Generating data from Null Distribution

2010-01-06 Thread Jim Silverton
Hello everyone, Can someone tell me exactly how to generate data from a null distribution for the fisher exact test? I know I have to use the hypergrometric but exactly what commands do I use? Jim [[alternative HTML version deleted]] __ R-help