|
|
@ -1,252 +1,3 @@
|
|
|
|
se.analytical.beta=mean(s$se_beta),
|
|
|
|
|
|
|
|
m.low.ci.beta=mean(s$beta-1.96*s$se_beta),
|
|
|
|
|
|
|
|
m.high.ci.beta=mean(s$beta+1.96*s$se_beta),
|
|
|
|
|
|
|
|
true.value.in.ci.p=mean(true.value.in.ci),
|
|
|
|
|
|
|
|
h0.rejected.p=mean( (s$beta-1.96*s$se_beta)>0 | (s$beta+1.96*s$se_beta)<0 ),
|
|
|
|
|
|
|
|
beta.same.sign.truebeta.p=mean(beta.same.sign.truebeta.p),
|
|
|
|
|
|
|
|
beta.same.sign.truebeta.signif.p=mean(beta.same.sign.truebeta.p[num.reject])
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
d <- cbind(b,a,z)
|
|
|
|
|
|
|
|
d$prop.
|
|
|
|
|
|
|
|
return(d)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#### Compiled results
|
|
|
|
|
|
|
|
res.dat.dif <- compile_simulation2('5A_100')
|
|
|
|
|
|
|
|
for (x in results[seq(2,length(results))]) {
|
|
|
|
|
|
|
|
y <- compile_simulation2(x)
|
|
|
|
|
|
|
|
res.dat.dif <- bind_rows(res.dat.dif,y)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
res.dat.dif
|
|
|
|
|
|
|
|
ifelse(eff.size==0,NA,eff.size/s$beta>0)
|
|
|
|
|
|
|
|
ifelse(0==0,NA,0/s$beta>0)
|
|
|
|
|
|
|
|
s <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/',"5C_100",'.xls'))
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/',"5C_100",'.xls'))
|
|
|
|
|
|
|
|
s$beta
|
|
|
|
|
|
|
|
0.2/s$beta
|
|
|
|
|
|
|
|
0.2/s$beta>0
|
|
|
|
|
|
|
|
mean(0.2/s$beta>0)
|
|
|
|
|
|
|
|
#### Create data.frame
|
|
|
|
|
|
|
|
results <- c(sapply(1:4,function(x) paste0(x,c('A','B','C','D','E'))),sapply(5:9,function(x) paste0(x,c('A','B','C','D','E','F','G'))))
|
|
|
|
|
|
|
|
results2 <- c(sapply(10:20,function(x) paste0(x,c('A','B','C','D','E','F','G'))))
|
|
|
|
|
|
|
|
results <- c(sapply(c(100,200,300),function(x) paste0(results,'_',x)))
|
|
|
|
|
|
|
|
results2 <- c(sapply(c(100,200,300),function(x) paste0(results2,'_',x)))
|
|
|
|
|
|
|
|
results <- sort(results)
|
|
|
|
|
|
|
|
results2 <- sort(results2)
|
|
|
|
|
|
|
|
results <- c(results,results2)[61:396]
|
|
|
|
|
|
|
|
#### Compiler function
|
|
|
|
|
|
|
|
compile_simulation2 <- function(scenario) {
|
|
|
|
|
|
|
|
name <- as.numeric(gsub("[^0-9.-]", "", substr(scenario,start=0,stop=2)))
|
|
|
|
|
|
|
|
if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="100" & name>4) {
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/',scenario,'.xls'))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="200" & name>4) {
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/',scenario,'.xls'))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="300" & name>4) {
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/',scenario,'.xls'))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
J <- max(which(sapply(1:7,function(x) paste0('item',x) %in% colnames(s) | paste0('item',x,'_1') %in% colnames(s))))
|
|
|
|
|
|
|
|
M <- 1+sum(sapply(1:3,function(x) paste0('item1_',x) %in% colnames(s) ))
|
|
|
|
|
|
|
|
if (M==1) {M <- 2}
|
|
|
|
|
|
|
|
nb.dif <- max(which(sapply(1:3,function(x) paste0('dif',x) %in% colnames(s) | paste0('dif',x,'_1') %in% colnames(s))))
|
|
|
|
|
|
|
|
if (J==4) {
|
|
|
|
|
|
|
|
if (M==2) {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1=mean(s$item1),m.item2=mean(s$item2),m.item3=mean(s$item3),m.item4=mean(s$item4))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1_1=mean(s$item1_1),m.item1_2=mean(s$item1_2),m.item1_3=mean(s$item1_3),
|
|
|
|
|
|
|
|
m.item2_1=mean(s$item2_1),m.item2_2=mean(s$item2_2),m.item2_3=mean(s$item2_3),
|
|
|
|
|
|
|
|
m.item3_1=mean(s$item3_1),m.item3_2=mean(s$item3_2),m.item3_3=mean(s$item3_3),
|
|
|
|
|
|
|
|
m.item4_1=mean(s$item4_1),m.item4_2=mean(s$item4_2),m.item4_3=mean(s$item4_3)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (M==2) {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1=mean(s$item1),m.item2=mean(s$item2),m.item3=mean(s$item3),m.item4=mean(s$item4),
|
|
|
|
|
|
|
|
m.item5=mean(s$item5),m.item6=mean(s$item6),m.item7=mean(s$item7))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1_1=mean(s$item1_1),m.item1_2=mean(s$item1_2),m.item1_3=mean(s$item1_3),
|
|
|
|
|
|
|
|
m.item2_1=mean(s$item2_1),m.item2_2=mean(s$item2_2),m.item2_3=mean(s$item2_3),
|
|
|
|
|
|
|
|
m.item3_1=mean(s$item3_1),m.item3_2=mean(s$item3_2),m.item3_3=mean(s$item3_3),
|
|
|
|
|
|
|
|
m.item4_1=mean(s$item4_1),m.item4_2=mean(s$item4_2),m.item4_3=mean(s$item4_3),
|
|
|
|
|
|
|
|
m.item5_1=mean(s$item5_1),m.item5_2=mean(s$item5_2),m.item5_3=mean(s$item5_3),
|
|
|
|
|
|
|
|
m.item6_1=mean(s$item6_1),m.item6_2=mean(s$item6_2),m.item6_3=mean(s$item6_3),
|
|
|
|
|
|
|
|
m.item7_1=mean(s$item7_1),m.item7_2=mean(s$item7_2),m.item7_3=mean(s$item7_3)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
zz <- substr(scenario,start=0,stop=nchar(scenario)-4)
|
|
|
|
|
|
|
|
N <- substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))
|
|
|
|
|
|
|
|
eff.size <- unique(res.dat[res.dat$scenario==zz & res.dat$N==N,'eff.size'])
|
|
|
|
|
|
|
|
dif.size <- unique(res.dat[res.dat$scenario==zz & res.dat$N==N,'dif.size'])
|
|
|
|
|
|
|
|
b <- data.frame(scenario=zz,
|
|
|
|
|
|
|
|
scenario.type=substr(zz,start=nchar(zz),stop=nchar(zz)),
|
|
|
|
|
|
|
|
N=N,
|
|
|
|
|
|
|
|
J=J,
|
|
|
|
|
|
|
|
M=M,
|
|
|
|
|
|
|
|
eff.size=eff.size,
|
|
|
|
|
|
|
|
nb.dif=nb.dif,
|
|
|
|
|
|
|
|
dif.size=dif.size
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
true.value.in.ci <- eff.size <= s$beta+1.96*s$se_beta & eff.size >= s$beta-1.96*s$se_beta
|
|
|
|
|
|
|
|
beta.same.sign.truebeta.p <- ifelse(eff.size==0,NA,(eff.size/s$beta)>0)
|
|
|
|
|
|
|
|
num.reject <- which((s$beta-1.96*s$se_beta)>0 | (s$beta+1.96*s$se_beta)<0)
|
|
|
|
|
|
|
|
z <- data.frame(m.beta=mean(s$beta),
|
|
|
|
|
|
|
|
se.empirical.beta=sd(s$beta),
|
|
|
|
|
|
|
|
se.analytical.beta=mean(s$se_beta),
|
|
|
|
|
|
|
|
m.low.ci.beta=mean(s$beta-1.96*s$se_beta),
|
|
|
|
|
|
|
|
m.high.ci.beta=mean(s$beta+1.96*s$se_beta),
|
|
|
|
|
|
|
|
true.value.in.ci.p=mean(true.value.in.ci),
|
|
|
|
|
|
|
|
h0.rejected.p=mean( (s$beta-1.96*s$se_beta)>0 | (s$beta+1.96*s$se_beta)<0 ),
|
|
|
|
|
|
|
|
beta.same.sign.truebeta.p=mean(beta.same.sign.truebeta.p),
|
|
|
|
|
|
|
|
beta.same.sign.truebeta.signif.p=mean(beta.same.sign.truebeta.p[num.reject])
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
d <- cbind(b,a,z)
|
|
|
|
|
|
|
|
d$prop.
|
|
|
|
|
|
|
|
return(d)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#### Compiled results
|
|
|
|
|
|
|
|
res.dat.dif <- compile_simulation2('5A_100')
|
|
|
|
|
|
|
|
for (x in results[seq(2,length(results))]) {
|
|
|
|
|
|
|
|
y <- compile_simulation2(x)
|
|
|
|
|
|
|
|
res.dat.dif <- bind_rows(res.dat.dif,y)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
res.dat.dif
|
|
|
|
|
|
|
|
#### Create data.frame
|
|
|
|
|
|
|
|
results <- c(sapply(1:4,function(x) paste0(x,c('A','B','C','D','E'))),sapply(5:9,function(x) paste0(x,c('A','B','C','D','E','F','G'))))
|
|
|
|
|
|
|
|
results2 <- c(sapply(10:20,function(x) paste0(x,c('A','B','C','D','E','F','G'))))
|
|
|
|
|
|
|
|
results <- c(sapply(c(100,200,300),function(x) paste0(results,'_',x)))
|
|
|
|
|
|
|
|
results2 <- c(sapply(c(100,200,300),function(x) paste0(results2,'_',x)))
|
|
|
|
|
|
|
|
results <- sort(results)
|
|
|
|
|
|
|
|
results2 <- sort(results2)
|
|
|
|
|
|
|
|
results <- c(results,results2)[61:396]
|
|
|
|
|
|
|
|
#### Compiler function
|
|
|
|
|
|
|
|
compile_simulation2 <- function(scenario) {
|
|
|
|
|
|
|
|
name <- as.numeric(gsub("[^0-9.-]", "", substr(scenario,start=0,stop=2)))
|
|
|
|
|
|
|
|
if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="100" & name>4) {
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/',scenario,'.xls'))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="200" & name>4) {
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/',scenario,'.xls'))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="300" & name>4) {
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/',scenario,'.xls'))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
J <- max(which(sapply(1:7,function(x) paste0('item',x) %in% colnames(s) | paste0('item',x,'_1') %in% colnames(s))))
|
|
|
|
|
|
|
|
M <- 1+sum(sapply(1:3,function(x) paste0('item1_',x) %in% colnames(s) ))
|
|
|
|
|
|
|
|
if (M==1) {M <- 2}
|
|
|
|
|
|
|
|
nb.dif <- max(which(sapply(1:3,function(x) paste0('dif',x) %in% colnames(s) | paste0('dif',x,'_1') %in% colnames(s))))
|
|
|
|
|
|
|
|
if (J==4) {
|
|
|
|
|
|
|
|
if (M==2) {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1=mean(s$item1),m.item2=mean(s$item2),m.item3=mean(s$item3),m.item4=mean(s$item4))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1_1=mean(s$item1_1),m.item1_2=mean(s$item1_2),m.item1_3=mean(s$item1_3),
|
|
|
|
|
|
|
|
m.item2_1=mean(s$item2_1),m.item2_2=mean(s$item2_2),m.item2_3=mean(s$item2_3),
|
|
|
|
|
|
|
|
m.item3_1=mean(s$item3_1),m.item3_2=mean(s$item3_2),m.item3_3=mean(s$item3_3),
|
|
|
|
|
|
|
|
m.item4_1=mean(s$item4_1),m.item4_2=mean(s$item4_2),m.item4_3=mean(s$item4_3)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (M==2) {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1=mean(s$item1),m.item2=mean(s$item2),m.item3=mean(s$item3),m.item4=mean(s$item4),
|
|
|
|
|
|
|
|
m.item5=mean(s$item5),m.item6=mean(s$item6),m.item7=mean(s$item7))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1_1=mean(s$item1_1),m.item1_2=mean(s$item1_2),m.item1_3=mean(s$item1_3),
|
|
|
|
|
|
|
|
m.item2_1=mean(s$item2_1),m.item2_2=mean(s$item2_2),m.item2_3=mean(s$item2_3),
|
|
|
|
|
|
|
|
m.item3_1=mean(s$item3_1),m.item3_2=mean(s$item3_2),m.item3_3=mean(s$item3_3),
|
|
|
|
|
|
|
|
m.item4_1=mean(s$item4_1),m.item4_2=mean(s$item4_2),m.item4_3=mean(s$item4_3),
|
|
|
|
|
|
|
|
m.item5_1=mean(s$item5_1),m.item5_2=mean(s$item5_2),m.item5_3=mean(s$item5_3),
|
|
|
|
|
|
|
|
m.item6_1=mean(s$item6_1),m.item6_2=mean(s$item6_2),m.item6_3=mean(s$item6_3),
|
|
|
|
|
|
|
|
m.item7_1=mean(s$item7_1),m.item7_2=mean(s$item7_2),m.item7_3=mean(s$item7_3)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
zz <- substr(scenario,start=0,stop=nchar(scenario)-4)
|
|
|
|
|
|
|
|
N <- substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))
|
|
|
|
|
|
|
|
eff.size <- unique(res.dat[res.dat$scenario==zz & res.dat$N==N,'eff.size'])
|
|
|
|
|
|
|
|
dif.size <- unique(res.dat[res.dat$scenario==zz & res.dat$N==N,'dif.size'])
|
|
|
|
|
|
|
|
b <- data.frame(scenario=zz,
|
|
|
|
|
|
|
|
scenario.type=substr(zz,start=nchar(zz),stop=nchar(zz)),
|
|
|
|
|
|
|
|
N=N,
|
|
|
|
|
|
|
|
J=J,
|
|
|
|
|
|
|
|
M=M,
|
|
|
|
|
|
|
|
eff.size=eff.size,
|
|
|
|
|
|
|
|
nb.dif=nb.dif,
|
|
|
|
|
|
|
|
dif.size=dif.size
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
true.value.in.ci <- eff.size <= s$beta+1.96*s$se_beta & eff.size >= s$beta-1.96*s$se_beta
|
|
|
|
|
|
|
|
beta.same.sign.truebeta.p <- ifelse(eff.size==0,NA,(eff.size/s$beta)>0)
|
|
|
|
|
|
|
|
print(beta.same.sign.truebeta.p)
|
|
|
|
|
|
|
|
num.reject <- which((s$beta-1.96*s$se_beta)>0 | (s$beta+1.96*s$se_beta)<0)
|
|
|
|
|
|
|
|
z <- data.frame(m.beta=mean(s$beta),
|
|
|
|
|
|
|
|
se.empirical.beta=sd(s$beta),
|
|
|
|
|
|
|
|
se.analytical.beta=mean(s$se_beta),
|
|
|
|
|
|
|
|
m.low.ci.beta=mean(s$beta-1.96*s$se_beta),
|
|
|
|
|
|
|
|
m.high.ci.beta=mean(s$beta+1.96*s$se_beta),
|
|
|
|
|
|
|
|
true.value.in.ci.p=mean(true.value.in.ci),
|
|
|
|
|
|
|
|
h0.rejected.p=mean( (s$beta-1.96*s$se_beta)>0 | (s$beta+1.96*s$se_beta)<0 ),
|
|
|
|
|
|
|
|
beta.same.sign.truebeta.p=mean(beta.same.sign.truebeta.p),
|
|
|
|
|
|
|
|
beta.same.sign.truebeta.signif.p=mean(beta.same.sign.truebeta.p[num.reject])
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
d <- cbind(b,a,z)
|
|
|
|
|
|
|
|
d$prop.
|
|
|
|
|
|
|
|
return(d)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#### Compiled results
|
|
|
|
|
|
|
|
res.dat.dif <- compile_simulation2('5A_100')
|
|
|
|
|
|
|
|
for (x in results[seq(2,length(results))]) {
|
|
|
|
|
|
|
|
y <- compile_simulation2(x)
|
|
|
|
|
|
|
|
res.dat.dif <- bind_rows(res.dat.dif,y)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#### Create data.frame
|
|
|
|
|
|
|
|
results <- c(sapply(1:4,function(x) paste0(x,c('A','B','C','D','E'))),sapply(5:9,function(x) paste0(x,c('A','B','C','D','E','F','G'))))
|
|
|
|
|
|
|
|
results2 <- c(sapply(10:20,function(x) paste0(x,c('A','B','C','D','E','F','G'))))
|
|
|
|
|
|
|
|
results <- c(sapply(c(100,200,300),function(x) paste0(results,'_',x)))
|
|
|
|
|
|
|
|
results2 <- c(sapply(c(100,200,300),function(x) paste0(results2,'_',x)))
|
|
|
|
|
|
|
|
results <- sort(results)
|
|
|
|
|
|
|
|
results2 <- sort(results2)
|
|
|
|
|
|
|
|
results <- c(results,results2)[61:396]
|
|
|
|
|
|
|
|
#### Compiler function
|
|
|
|
|
|
|
|
compile_simulation2 <- function(scenario) {
|
|
|
|
|
|
|
|
name <- as.numeric(gsub("[^0-9.-]", "", substr(scenario,start=0,stop=2)))
|
|
|
|
|
|
|
|
if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="100" & name>4) {
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/',scenario,'.xls'))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="200" & name>4) {
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/',scenario,'.xls'))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="300" & name>4) {
|
|
|
|
|
|
|
|
s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/',scenario,'.xls'))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
J <- max(which(sapply(1:7,function(x) paste0('item',x) %in% colnames(s) | paste0('item',x,'_1') %in% colnames(s))))
|
|
|
|
|
|
|
|
M <- 1+sum(sapply(1:3,function(x) paste0('item1_',x) %in% colnames(s) ))
|
|
|
|
|
|
|
|
if (M==1) {M <- 2}
|
|
|
|
|
|
|
|
nb.dif <- max(which(sapply(1:3,function(x) paste0('dif',x) %in% colnames(s) | paste0('dif',x,'_1') %in% colnames(s))))
|
|
|
|
|
|
|
|
if (J==4) {
|
|
|
|
|
|
|
|
if (M==2) {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1=mean(s$item1),m.item2=mean(s$item2),m.item3=mean(s$item3),m.item4=mean(s$item4))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1_1=mean(s$item1_1),m.item1_2=mean(s$item1_2),m.item1_3=mean(s$item1_3),
|
|
|
|
|
|
|
|
m.item2_1=mean(s$item2_1),m.item2_2=mean(s$item2_2),m.item2_3=mean(s$item2_3),
|
|
|
|
|
|
|
|
m.item3_1=mean(s$item3_1),m.item3_2=mean(s$item3_2),m.item3_3=mean(s$item3_3),
|
|
|
|
|
|
|
|
m.item4_1=mean(s$item4_1),m.item4_2=mean(s$item4_2),m.item4_3=mean(s$item4_3)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (M==2) {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1=mean(s$item1),m.item2=mean(s$item2),m.item3=mean(s$item3),m.item4=mean(s$item4),
|
|
|
|
|
|
|
|
m.item5=mean(s$item5),m.item6=mean(s$item6),m.item7=mean(s$item7))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
a <- data.frame(m.item1_1=mean(s$item1_1),m.item1_2=mean(s$item1_2),m.item1_3=mean(s$item1_3),
|
|
|
|
|
|
|
|
m.item2_1=mean(s$item2_1),m.item2_2=mean(s$item2_2),m.item2_3=mean(s$item2_3),
|
|
|
|
|
|
|
|
m.item3_1=mean(s$item3_1),m.item3_2=mean(s$item3_2),m.item3_3=mean(s$item3_3),
|
|
|
|
|
|
|
|
m.item4_1=mean(s$item4_1),m.item4_2=mean(s$item4_2),m.item4_3=mean(s$item4_3),
|
|
|
|
|
|
|
|
m.item5_1=mean(s$item5_1),m.item5_2=mean(s$item5_2),m.item5_3=mean(s$item5_3),
|
|
|
|
|
|
|
|
m.item6_1=mean(s$item6_1),m.item6_2=mean(s$item6_2),m.item6_3=mean(s$item6_3),
|
|
|
|
|
|
|
|
m.item7_1=mean(s$item7_1),m.item7_2=mean(s$item7_2),m.item7_3=mean(s$item7_3)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
zz <- substr(scenario,start=0,stop=nchar(scenario)-4)
|
|
|
|
|
|
|
|
N <- substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))
|
|
|
|
N <- substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))
|
|
|
|
eff.size <- unique(res.dat[res.dat$scenario==zz & res.dat$N==N,'eff.size'])
|
|
|
|
eff.size <- unique(res.dat[res.dat$scenario==zz & res.dat$N==N,'eff.size'])
|
|
|
|
dif.size <- unique(res.dat[res.dat$scenario==zz & res.dat$N==N,'dif.size'])
|
|
|
|
dif.size <- unique(res.dat[res.dat$scenario==zz & res.dat$N==N,'dif.size'])
|
|
|
@ -510,3 +261,252 @@ res.dat.dif
|
|
|
|
paste(c(1,5,7,9,11),'A')
|
|
|
|
paste(c(1,5,7,9,11),'A')
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==100,]$true.power
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==100,]$true.power
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==100,]
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==100,]
|
|
|
|
|
|
|
|
###### Puissance théorique
|
|
|
|
|
|
|
|
### Scénarios N=100
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==100,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'D') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'F') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'G') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'C') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'D') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'A') & res.dat$N==100,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'B') & res.dat$N==100,]$theoretical.power <- 0.1522
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'C') & res.dat$N==100,]$theoretical.power <- 0.1522
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'D') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'F') & res.dat$N==100,]$theoretical.power <- 0.1522
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'G') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'C') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'D') & res.dat$N==100,]$theoretical.power <- 0.1522
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'A') & res.dat$N==100,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'B') & res.dat$N==100,]$theoretical.power <- 0.1857
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'C') & res.dat$N==100,]$theoretical.power <- 0.1857
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'D') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'E') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'F') & res.dat$N==100,]$theoretical.power <- 0.1857
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'G') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'C') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'D') & res.dat$N==100,]$theoretical.power <- 0.1857
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'E') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'A') & res.dat$N==100,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'B') & res.dat$N==100,]$theoretical.power <- 0.1852
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'C') & res.dat$N==100,]$theoretical.power <- 0.1852
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'D') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'E') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'F') & res.dat$N==100,]$theoretical.power <- 0.1852
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'G') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'C') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'D') & res.dat$N==100,]$theoretical.power <- 0.1852
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'E') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
### Scénarios N=200
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==200,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==200,]$theoretical.power <- 0.2613
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==200,]$theoretical.power <- 0.2613
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'D') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'E') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'F') & res.dat$N==200,]$theoretical.power <- 0.2613
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'G') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'C') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'D') & res.dat$N==200,]$theoretical.power <- 0.2613
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'E') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'A') & res.dat$N==200,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'B') & res.dat$N==200,]$theoretical.power <- 0.2606
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'C') & res.dat$N==200,]$theoretical.power <- 0.2606
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'D') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'E') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'F') & res.dat$N==200,]$theoretical.power <- 0.2606
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'G') & res.dat$N==200,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'C') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'D') & res.dat$N==200,]$theoretical.power <- 0.2606
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'E') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'A') & res.dat$N==200,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'B') & res.dat$N==200,]$theoretical.power <- 0.3256
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'C') & res.dat$N==200,]$theoretical.power <- 0.3256
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'D') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'E') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'F') & res.dat$N==200,]$theoretical.power <- 0.3256
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'G') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'C') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'D') & res.dat$N==200,]$theoretical.power <- 0.3256
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'E') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'A') & res.dat$N==200,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'B') & res.dat$N==200,]$theoretical.power <- 0.3251
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'C') & res.dat$N==200,]$theoretical.power <- 0.3251
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'D') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'E') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'F') & res.dat$N==200,]$theoretical.power <- 0.3251
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'G') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'C') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'D') & res.dat$N==200,]$theoretical.power <- 0.3251
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'E') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==100,]$theoretical.power
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==100,]
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=2
|
|
|
|
|
|
|
|
res.dat$theoretical.power <- 0
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==100,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'D') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'F') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'G') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'C') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'D') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat$theoretical.power
|
|
|
|
|
|
|
|
###### Puissance théorique
|
|
|
|
|
|
|
|
res.dat$theoretical.power <- 0
|
|
|
|
|
|
|
|
### Scénarios N=100
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==100,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'D') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'F') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'G') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'C') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'D') & res.dat$N==100,]$theoretical.power <- 0.1524
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'A') & res.dat$N==100,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'B') & res.dat$N==100,]$theoretical.power <- 0.1522
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'C') & res.dat$N==100,]$theoretical.power <- 0.1522
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'D') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'F') & res.dat$N==100,]$theoretical.power <- 0.1522
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'G') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'C') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'D') & res.dat$N==100,]$theoretical.power <- 0.1522
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'E') & res.dat$N==100,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'A') & res.dat$N==100,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'B') & res.dat$N==100,]$theoretical.power <- 0.1857
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'C') & res.dat$N==100,]$theoretical.power <- 0.1857
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'D') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'E') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'F') & res.dat$N==100,]$theoretical.power <- 0.1857
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'G') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'C') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'D') & res.dat$N==100,]$theoretical.power <- 0.1857
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'E') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'A') & res.dat$N==100,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'B') & res.dat$N==100,]$theoretical.power <- 0.1852
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'C') & res.dat$N==100,]$theoretical.power <- 0.1852
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'D') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'E') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'F') & res.dat$N==100,]$theoretical.power <- 0.1852
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'G') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'C') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'D') & res.dat$N==100,]$theoretical.power <- 0.1852
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'E') & res.dat$N==100,]$theoretical.power <- 0.5669
|
|
|
|
|
|
|
|
### Scénarios N=200
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==200,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==200,]$theoretical.power <- 0.2613
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==200,]$theoretical.power <- 0.2613
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'D') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'E') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'F') & res.dat$N==200,]$theoretical.power <- 0.2613
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'G') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'C') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'D') & res.dat$N==200,]$theoretical.power <- 0.2613
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'E') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'A') & res.dat$N==200,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'B') & res.dat$N==200,]$theoretical.power <- 0.2606
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'C') & res.dat$N==200,]$theoretical.power <- 0.2606
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'D') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'E') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'F') & res.dat$N==200,]$theoretical.power <- 0.2606
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'G') & res.dat$N==200,]$theoretical.power <- 0.4626
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'C') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'D') & res.dat$N==200,]$theoretical.power <- 0.2606
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'E') & res.dat$N==200,]$theoretical.power <- 0.7507
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'A') & res.dat$N==200,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'B') & res.dat$N==200,]$theoretical.power <- 0.3256
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'C') & res.dat$N==200,]$theoretical.power <- 0.3256
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'D') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'E') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'F') & res.dat$N==200,]$theoretical.power <- 0.3256
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'G') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'C') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'D') & res.dat$N==200,]$theoretical.power <- 0.3256
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'E') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'A') & res.dat$N==200,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'B') & res.dat$N==200,]$theoretical.power <- 0.3251
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'C') & res.dat$N==200,]$theoretical.power <- 0.3251
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'D') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'E') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'F') & res.dat$N==200,]$theoretical.power <- 0.3251
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'G') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'C') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'D') & res.dat$N==200,]$theoretical.power <- 0.3251
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'E') & res.dat$N==200,]$theoretical.power <- 0.8538
|
|
|
|
|
|
|
|
### Scénarios N=300
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==300,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==300,]$theoretical.power <- 0.3658
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==300,]$theoretical.power <- 0.3658
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'D') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'E') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'F') & res.dat$N==300,]$theoretical.power <- 0.3658
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'G') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'C') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'D') & res.dat$N==300,]$theoretical.power <- 0.3658
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(1,'E') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
## Scénarios J=4 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'A') & res.dat$N==300,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'B') & res.dat$N==300,]$theoretical.power <- 0.3652
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'C') & res.dat$N==300,]$theoretical.power <- 0.3652
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'D') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'E') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'F') & res.dat$N==300,]$theoretical.power <- 0.3652
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'G') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'C') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'D') & res.dat$N==300,]$theoretical.power <- 0.3652
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(2,'E') & res.dat$N==300,]$theoretical.power <- 0.8981
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=2
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'A') & res.dat$N==300,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'B') & res.dat$N==300,]$theoretical.power <- 0.4550
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'C') & res.dat$N==300,]$theoretical.power <- 0.4550
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'D') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'E') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'F') & res.dat$N==300,]$theoretical.power <- 0.4550
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'G') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'C') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'D') & res.dat$N==300,]$theoretical.power <- 0.4550
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(3,'E') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
## Scénarios J=7 / M=4
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'A') & res.dat$N==300,]$theoretical.power <- 0.0250
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'B') & res.dat$N==300,]$theoretical.power <- 0.4547
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'C') & res.dat$N==300,]$theoretical.power <- 0.4547
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'D') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'E') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'F') & res.dat$N==300,]$theoretical.power <- 0.4547
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'G') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'C') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'D') & res.dat$N==300,]$theoretical.power <- 0.4547
|
|
|
|
|
|
|
|
res.dat[res.dat$scenario %in% paste0(4,'E') & res.dat$N==300,]$theoretical.power <- 0.9584
|
|
|
|
|
|
|
|
res.dat$theoretical.power
|
|
|
|
|
|
|
|
61:nrow(res.dat)
|
|
|
|
|
|
|
|
res.dat[61:nrow(res.dat),]
|
|
|
|
|
|
|
|
res.dat[61:nrow(res.dat),]$scenario
|
|
|
|
|
|
|
|
res.dat[61:nrow(res.dat),]$theoretical.power
|
|
|
|
|
|
|
|
res.dat.dif$theoretical.power <- res.dat[61:nrow(res.dat),]$theoretical.power
|
|
|
|