Displaying 2 results from an estimated 2 matches for "x_norm1".
Did you mean:
norm1
2016 Apr 06
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
...# this loop steps through the sample sizes
for(ss in 1:dim(sample_sizes)[2]) {
m<-sample_sizes[1,ss]
n<-sample_sizes[2,ss]
# initialize the index for results
i<-1
for (sd in sds) { #first group's standard deviation
#generate random samples from 2 normal distribution
x_norm1<-rnorm(m,5,sds)
y_norm2<-rnorm(n,5,4)
#extract p-value out and store it in vectors
t_equal[(ss-1)*nsds+i]<-t.test(x_norm1,y_norm2,var.equal=TRUE)$p.value
t_unequal[(ss-1)*nsds+i]<-t.test(x_norm1,y_norm2,var.equal=FALSE)$p.value
mann[(ss-1)*nsds+i] <-wilcox.test(x_norm1...
2016 Apr 06
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
...row=5,ncol=5)
for(i in 1:5) {
for(j in 1:5) {
testmat3[i,j]<-i+j
}
}
as.vector(testmat3)
Jim
On Wed, Apr 6, 2016 at 8:04 PM, tan sj <sj_style_1125 at outlook.com> wrote:
> Hi, i am sorry to interrupt, can I ask about this few problems?
>
> t_equal[(ss-1)*nsds+i]<-t.test(x_norm1,y_norm2,var.equal=TRUE)$p.value
> 1. From above, what do "[(ss-1)*nsds+i]" brings to the code?
>
> 2. what is the purpose of having i (the iterative) here ? I see that dr. have set the sim as the iterative then why need to set i <-1 and set it as i<-i+1?
>
> they are...