Re: [R] R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]

2016-04-06 Thread tan sj
Lemon <drjimle...@gmail.com> > Sent: Wednesday, April 6, 2016 4:00 AM > To: tan sj; r-help mailing list > Subject: Re: [R] R-dvel [robustness Simulation study of 2 sample test on > several combination of factors ] > > You have quite a few mistakes in your example. The

Re: [R] R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]

2016-04-06 Thread Michael Friendly
On 4/4/2016 9:15 PM, tan sj wrote: hi, i am new in this field. do favorite If I wish to conduct a simulation on the robustness of two sample test by using R language, is that

Re: [R] R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]

2016-04-05 Thread Jim Lemon
m1,y_norm2,var.equal=TRUE)$p.value > t_unequal[i]<-t.test(x_norm1,y_norm2,var.equal=FALSE)$p.value > mann[i] <-wilcox.test(x_norm1,y_norm2)$p.value > > ##store the result into matrix defined before > matrix_Equal<-t_equal > matrix_Unequal<-t_unequal > matrix_mann<-mann

Re: [R] R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]

2016-04-05 Thread Jim Lemon
Okay, here is a more complete example: sample_sizes<- matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), nrow=2) # see what it looks like sample_sizes ssds<-c(4,4.4,5,6,8) nssds<-length(ssds) results<-list() # first loop steps through the sample for(ss in

Re: [R] R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]

2016-04-04 Thread Jim Lemon
Hi sst, You could set up your sample sizes as a matrix if you don't want all of the combinations: sample_sizes<-matrix(c(10,10,10,25,25,25,...),nrow=2) and then use one loop for the sample sizes: for(ss in 1:dim(sample_sizes)[2]) { ss1<-sample_sizes[1,ss] ss2<-sample_sizes[2,ss] then step

[R] R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]

2016-04-04 Thread tan sj
hi, i am new in this field. do favorite If I wish to conduct a simulation on the robustness of two sample test by using R language, is that any ways in writing the code? There