Hi Sean,

Thank you for your reply. What I posted would be for one sample, but I need to have let say 20 samples into two groups, that the first group would have different mean and standard deviation than the second group; and that was my problem how to generate these.

I did something like 

S <- 10000
 n <- 10
 data1 <- c(runif(n*S*0.2,0,0.05), runif(n*S*0.6,0.06,0.95),runif(n*S*0.2,0.96,1))
 data2 <- c(runif(n*S*0.2,0.06,0.1), runif(n*S*0.6,0.11,0.8),runif(n*S*0.2,0.81,0.9))
 
 group1 <- matrix(data1, nrow = S,ncol = n)
 group2 <- matrix(data2, nrow = S,ncol = n)
 
 wt <- rep(NA, S)
 for (i in 1:S) {
 wt[i] <- wilcox.test(group1[i, ], group2[i, ], alternative = "two.sided")$p.value }
 Wsize <- sum(wt < 0.05)/S
 Wsize

I very thankful for any help.

Samor

--- On Tue, 28/9/10, Sean Davis <sdavis2@mail.nih.gov> wrote:

From: Sean Davis <sdavis2@mail.nih.gov>
Subject: Re: [BioC] Simulation of the beta average
To: "Samor Gandhi" <samorgandhi@yahoo.com>
Cc: "bioconductor@stat.math.ethz.ch" <bioconductor@stat.math.ethz.ch>
Date: Tuesday, 28 September, 2010, 17:46



On Tue, Sep 28, 2010 at 7:15 AM, Samor Gandhi <samorgandhi@yahoo.com> wrote:

Hi Sean,

I am trying to compute the power of the SAMr for t-test and Wilcoxon test!



Hi, Samor.
You might need to look into the data a bit more and perhaps review a bit about power calculation before proceeding further.  There are a few steps missing, I think.  What you posted doesn't constitute a simulation that could be used for power calculations unless I misunderstand what you are trying to do.

Sean
 
Regards,
Samor

--- On Tue, 28/9/10, Sean Davis <sdavis2@mail.nih.gov> wrote:


From: Sean Davis <sdavis2@mail.nih.gov>
Subject: Re: [BioC] Simulation of the beta average
To: "Samor Gandhi" <samorgandhi@yahoo.com>

Cc: bioconductor@stat.math.ethz.ch
Date: Tuesday, 28 September, 2010, 14:31



On Tue, Sep 28, 2010 at 4:45 AM, Samor Gandhi <samorgandhi@yahoo.com> wrote:


Hello,



I would like to run a simulation study on the beta average of the Beta Studio illumin. I did something like x <- c(runif(200,0,0.1), runif(600,0.11,0.89),runif(200,0.9,1)); hist(x)! Would this be a reasonable simulation?




Hi, Samor.  
I think the answer to your question is going to depend on what you mean by "reasonable" and that will depend on the question you are actually trying to answer.  What is the question you are trying to answer?  Are you trying to perform hypothesis testing or algorithm development, or something else?  


Sean 





      




      
	[[alternative HTML version deleted]]

