############################################################################## #----------------------------------------------------------------------------# ################################## LIBRARIES ################################# #----------------------------------------------------------------------------# ############################################################################## library(TAM) library(doMC) library(parallel) library(pbmcapply) library(funprog) library(dplyr) library(readxl) lastChar <- function(str){ substr(str, nchar(str)-2, nchar(str)) } ############################################################################## #----------------------------------------------------------------------------# ############################# ANALYSIS FUNCTIONS ############################# #----------------------------------------------------------------------------# ############################################################################## pcm_analysis <- function(df=NULL,treatment='TT',irtmodel='PCM2',method='MML') { nbitems <- sum(sapply(1:20,function(x) paste0('item',x)) %in% colnames(df)) resp <- df[,sapply(seq(1,nbitems),function(x) paste0('item',x))] if (method=='MML') { tam1 <- tam.mml(resp=resp,Y=df[,treatment],irtmodel = irtmodel,est.variance = T,verbose=F) } if (method=='JML') { tam1 <- tam.jml(resp=resp,group=1+df[,treatment]) } if (method!='MML' & method!='JML') { stop('Invalid method. Please choose among MML or JML') } return(tam1) } replicate_pcm_analysis_m4 <- function(df=NULL,treatment='TT',irtmodel='PCM2',method='MML',sequence='replication',eff.size=0,difsize=NA,nbdif=0) { nbitems <- sum(sapply(1:20,function(x) paste0('item',x)) %in% colnames(df)) resp <- df[,sapply(seq(1,nbitems),function(x) paste0('item',x))] truebeta <- eff.size if (method=='MML') { n <- max(df[,sequence]) print(n) tam1 <- lapply(seq(1,n), function(x) pcm_analysis(df=df[df[,sequence]==x,],treatment=treatment,irtmodel=irtmodel) ) } listitems <- c(sapply(c('_1','_2','_3'),function(x) paste0(sapply(seq(1,nbitems),function(x) paste0('item',x)),x))) returndat <- data.frame(matrix(nrow=max(df[,sequence]),ncol=length(listitems))) colnames(returndat) <- listitems for (s in seq(1,max(df[,sequence]))) { for (k in seq(1,nbitems)) { returndat[s,paste0('item',k,'_1')] <- tam1[[s]]$item[k,'AXsi_.Cat1'] returndat[s,paste0('item',k,'_2')] <- tam1[[s]]$item[k,'AXsi_.Cat2']-tam1[[s]]$item[k,'AXsi_.Cat1'] returndat[s,paste0('item',k,'_3')] <- tam1[[s]]$item[k,'AXsi_.Cat3']-tam1[[s]]$item[k,'AXsi_.Cat2'] } } returndat <- returndat[,sort_by(listitems, lastChar)] returndat$beta <- sapply(seq(1,max(df[,sequence])),function(k) tam1[[k]]$beta[2]) returndat$se.beta <- 1.413612*sapply(seq(1,max(df[,sequence])),function(k) tam.se(tam1[[k]])$beta$se.Dim1[2] ) returndat$low.ci.beta <- returndat$beta-1.96*returndat$se.beta returndat$high.ci.beta <- returndat$beta+1.96*returndat$se.beta returndat$true.value.in.ci <- 1*(truebeta>returndat$low.ci.beta & truebetareturndat$high.ci.beta) if (truebeta==0) { returndat$beta.same.sign.truebeta <- NA } else { returndat$beta.same.sign.truebeta <- 1*(sign(truebeta)==sign(returndat$beta)) } returndat2 <- data.frame(J=rep(nbitems,max(df[,sequence])), M=1+max(df$item1), N=nrow(df[df$replication==1,])/2, eff.size=truebeta, dif.size= difsize, nb.dif= nbdif ) returndat <- cbind(returndat2,returndat) return(returndat) } replicate_pcm_analysis_m2 <- function(df=NULL,treatment='TT',irtmodel='PCM2',method='MML',sequence='replication',eff.size=0,difsize=NA,nbdif=0) { truebeta <- eff.size nbitems <- sum(sapply(1:20,function(x) paste0('item',x)) %in% colnames(df)) resp <- df[,sapply(seq(1,nbitems),function(x) paste0('item',x))] if (method=='MML') { n <- max(df[,sequence]) print(n) tam1 <- lapply(seq(1,n), function(x) pcm_analysis(df=df[df[,sequence]==x,],treatment=treatment,irtmodel=irtmodel) ) } listitems <- sapply(seq(1,nbitems),function(x) paste0('item',x)) returndat <- data.frame(matrix(nrow=max(df[,sequence]),ncol=length(listitems))) colnames(returndat) <- listitems for (s in seq(1,max(df[,sequence]))) { for (k in seq(1,nbitems)) { returndat[s,paste0('item',k)] <- tam1[[s]]$xsi$xsi[k] } } returndat$beta <- sapply(seq(1,max(df[,sequence])),function(k) tam1[[k]]$beta[2]) returndat$se.beta <- 1.413612*sapply(seq(1,max(df[,sequence])),function(k) tam.se(tam1[[k]])$beta$se.Dim1[2] ) returndat$low.ci.beta <- returndat$beta-1.96*returndat$se.beta returndat$high.ci.beta <- returndat$beta+1.96*returndat$se.beta returndat$true.value.in.ci <- 1*(truebeta>returndat$low.ci.beta & truebetareturndat$high.ci.beta) if (truebeta==0) { returndat$beta.same.sign.truebeta <- NA } else { returndat$beta.same.sign.truebeta <- 1*(sign(truebeta)==sign(returndat$beta)) } returndat2 <- data.frame(J=rep(nbitems,max(df[,sequence])), M=1+max(df$item1), N=nrow(df[df$replication==1,])/2, eff.size=truebeta, dif.size= difsize, nb.dif= nbdif ) returndat <- cbind(returndat2,returndat) return(returndat) } replicate_pcm_analysis<- function(df=NULL,treatment='TT',irtmodel='PCM2',method='MML',sequence='replication',eff.size=0,difsize=NA,nbdif=0) { j <- max(df$item1) if(j==1) { return(replicate_pcm_analysis_m2(df=df,treatment=treatment,irtmodel=irtmodel,method=method,sequence=sequence,eff.size=eff.size,difsize=difsize,nbdif=nbdif)) } else { return(replicate_pcm_analysis_m4(df=df,treatment=treatment,irtmodel=irtmodel,method=method,sequence=sequence,eff.size=eff.size,difsize=difsize,nbdif=nbdif)) } } ############################################################################## #----------------------------------------------------------------------------# ########################## SCENARIO ANALYSIS NO DIF ########################## #----------------------------------------------------------------------------# ############################################################################## registerDoMC(4) ###################################### Scenario 1: J=4 / M=2 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_1A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_1A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_1A_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x))) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_1A_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_1A_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_1A_300.csv') #### B: H1 TRUE / ES 0.2 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_1B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_1B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_1B_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = 0.2)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_1B_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_1B_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_1B_300.csv') #### C: H1 TRUE / ES 0.4 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_1C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_1C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_1C_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = 0.4)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_1C_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_1C_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_1C_300.csv') #### D: H1 TRUE / ES -0.2 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_1D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_1D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_1D_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = -0.2)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_1D_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_1D_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_1D_300.csv') #### E: H1 TRUE / ES -0.4 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_1E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_1E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_1E_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = -0.4)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_1E_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_1E_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_1E_300.csv') ###################################### Scenario 2: J=4 / M=4 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_2A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_2A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_2A_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x))) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_2A_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_2A_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_2A_300.csv') #### B: H1 TRUE / ES 0.2 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_2B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_2B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_2B_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = 0.2)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_2B_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_2B_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_2B_300.csv') #### C: H1 TRUE / ES 0.4 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_2C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_2C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_2C_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = 0.4)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_2C_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_2C_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_2C_300.csv') #### D: H1 TRUE / ES -0.2 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_2D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_2D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_2D_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = -0.2)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_2D_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_2D_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_2D_300.csv') #### E: H1 TRUE / ES -0.4 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_2E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_2E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_2E_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = -0.4)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_2E_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_2E_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_2E_300.csv') ###################################### Scenario 3: J=7 / M=2 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_3A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_3A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_3A_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x))) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_3A_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_3A_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_3A_300.csv') #### B: H1 TRUE / ES 0.2 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_3B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_3B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_3B_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = 0.2)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_3B_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_3B_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_3B_300.csv') #### C: H1 TRUE / ES 0.4 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_3C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_3C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_3C_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = 0.4)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_3C_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_3C_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_3C_300.csv') #### D: H1 TRUE / ES -0.2 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_3D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_3D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_3D_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = -0.2)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_3D_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_3D_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_3D_300.csv') #### E: H1 TRUE / ES -0.4 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_3E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_3E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_3E_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = -0.4)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_3E_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_3E_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_3E_300.csv') ###################################### Scenario 4: J=7 / M=4 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_4A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_4A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_4A_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x))) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_4A_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_4A_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_4A_300.csv') #### B: H1 TRUE / ES 0.2 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_4B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_4B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_4B_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = 0.2)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_4B_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_4B_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_4B_300.csv') #### C: H1 TRUE / ES 0.4 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_4C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_4C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_4C_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = 0.4)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_4C_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_4C_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_4C_300.csv') #### D: H1 TRUE / ES -0.2 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_4D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_4D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_4D_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = -0.2)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_4D_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_4D_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_4D_300.csv') #### E: H1 TRUE / ES -0.4 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100/scenario_4E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200/scenario_4E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300/scenario_4E_300.csv') res <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),eff.size = -0.4)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_4E_100.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_4E_200.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_4E_300.csv') ############################################################################## #----------------------------------------------------------------------------# ######################### SCENARIO ANALYSIS WITH DIF ######################### #----------------------------------------------------------------------------# ############################################################################## registerDoMC(4) ###################################### Scenario 5: J=4 / M=2 / NDIF=1 / DIF=0.3 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_5A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_5A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_5A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_5A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_5A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_5A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_5B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_5B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_5B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_5B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_5B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_5B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_5C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_5C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_5C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_5C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_5C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_5C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_5D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_5D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_5D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_5D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_5D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_5D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_5E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_5E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_5E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_5E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_5E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_5E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_5F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_5F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_5F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_5F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_5F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_5F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_5G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_5G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_5G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_5G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_5G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_5G_300_nodif.csv') ###################################### Scenario 6: J=4 / M=4 / NDIF=1 / DIF=0.3 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_6A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_6A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_6A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_6A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_6A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_6A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_6B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_6B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_6B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_6B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_6B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_6B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_6C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_6C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_6C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_6C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_6C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_6C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_6D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_6D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_6D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_6D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_6D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_6D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_6E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_6E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_6E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_6E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_6E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_6E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_6F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_6F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_6F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_6F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_6F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_6F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_6G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_6G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_6G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_6G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_6G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_6G_300_nodif.csv') ###################################### Scenario 7: J=4 / M=2 / NDIF=1 / DIF=0.5 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_7A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_7A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_7A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_7A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_7A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_7A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_7B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_7B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_7B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_7B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_7B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_7B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_7C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_7C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_7C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_7C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_7C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_7C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_7D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_7D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_7D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_7D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_7D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_7D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_7E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_7E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_7E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_7E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_7E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_7E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_7F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_7F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_7F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_7F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_7F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_7F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_7G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_7G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_7G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_7G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_7G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_7G_300_nodif.csv') ###################################### Scenario 8: J=4 / M=4 / NDIF=1 / DIF=0.5 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_8A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_8A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_8A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_8A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_8A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_8A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_8B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_8B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_8B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_8B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_8B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_8B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_8C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_8C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_8C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_8C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_8C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_8C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_8D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_8D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_8D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_8D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_8D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_8D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_8E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_8E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_8E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_8E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_8E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_8E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_8F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_8F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_8F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_8F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_8F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_8F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_8G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_8G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_8G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_8G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_8G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_8G_300_nodif.csv') ###################################### Scenario 9: J=4 / M=2 / NDIF=2 / DIF=0.3 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_9A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_9A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_9A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_9A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_9A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_9A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_9B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_9B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_9B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_9B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_9B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_9B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_9C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_9C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_9C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_9C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_9C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_9C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_9D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_9D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_9D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_9D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_9D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_9D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_9E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_9E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_9E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_9E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_9E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_9E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_9F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_9F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_9F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_9F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_9F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_9F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_9G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_9G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_9G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_9G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_9G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_9G_300_nodif.csv') ###################################### Scenario 10: J=4 / M=4 / NDIF=2 / DIF=0.3 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_10A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_10A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_10A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_10A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_10A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_10A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_10B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_10B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_10B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_10B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_10B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_10B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_10C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_10C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_10C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_10C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_10C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_10C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_10D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_10D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_10D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_10D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_10D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_10D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_10E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_10E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_10E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_10E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_10E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_10E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_10F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_10F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_10F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_10F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_10F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_10F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_10G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_10G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_10G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_10G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_10G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_10G_300_nodif.csv') ###################################### Scenario 11: J=4 / M=2 / NDIF=2 / DIF=0.5 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_11A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_11A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_11A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_11A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_11A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_11A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_11B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_11B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_11B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_11B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_11B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_11B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_11C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_11C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_11C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_11C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_11C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_11C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_11D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_11D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_11D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_11D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_11D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_11D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_11E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_11E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_11E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_11E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_11E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_11E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_11F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_11F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_11F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_11F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_11F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_11F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_11G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_11G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_11G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_11G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_11G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_11G_300_nodif.csv') ###################################### Scenario 12: J=4 / M=4 / NDIF=2 / DIF=0.5 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_12A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_12A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_12A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_12A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_12A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_12A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_12B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_12B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_12B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_12B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_12B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_12B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_12C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_12C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_12C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_12C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_12C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_12C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_12D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_12D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_12D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_12D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_12D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_12D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_12E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_12E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_12E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_12E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_12E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_12E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_12F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_12F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_12F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_12F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_12F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_12F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_12G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_12G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_12G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_12G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_12G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_12G_300_nodif.csv') ###################################### Scenario 13: J=7 / M=2 / NDIF=2 / DIF=0.3 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_13A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_13A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_13A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_13A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_13A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_13A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_13B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_13B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_13B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_13B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_13B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_13B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_13C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_13C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_13C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_13C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_13C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_13C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_13D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_13D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_13D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_13D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_13D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_13D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_13E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_13E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_13E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_13E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_13E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_13E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_13F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_13F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_13F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_13F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_13F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_13F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_13G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_13G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_13G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_13G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_13G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_13G_300_nodif.csv') ###################################### Scenario 14: J=7 / M=4 / NDIF=2 / DIF=0.3 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_14A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_14A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_14A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_14A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_14A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_14A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_14B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_14B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_14B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_14B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_14B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_14B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_14C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_14C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_14C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_14C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_14C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_14C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_14D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_14D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_14D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_14D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_14D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_14D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_14E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_14E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_14E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_14E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_14E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_14E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_14F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_14F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_14F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_14F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_14F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_14F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_14G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_14G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_14G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_14G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_14G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_14G_300_nodif.csv') ###################################### Scenario 15: J=7 / M=2 / NDIF=2 / DIF=0.5 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_15A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_15A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_15A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_15A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_15A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_15A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_15B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_15B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_15B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_15B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_15B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_15B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_15C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_15C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_15C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_15C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_15C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_15C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_15D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_15D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_15D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_15D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_15D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_15D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_15E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_15E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_15E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_15E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_15E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_15E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_15F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_15F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_15F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_15F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_15F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_15F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_15G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_15G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_15G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_15G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_15G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_15G_300_nodif.csv') ###################################### Scenario 16: J=7 / M=4 / NDIF=2 / DIF=0.5 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_16A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_16A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_16A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_16A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_16A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_16A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_16B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_16B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_16B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_16B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_16B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_16B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_16C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_16C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_16C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_16C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_16C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_16C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_16D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_16D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_16D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_16D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_16D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_16D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_16E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_16E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_16E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_16E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_16E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_16E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_16F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_16F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_16F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_16F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_16F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_16F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_16G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_16G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_16G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_16G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_16G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_16G_300_nodif.csv') ###################################### Scenario 17: J=7 / M=2 / NDIF=3 / DIF=0.3 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_17A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_17A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_17A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_17A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_17A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_17A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_17B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_17B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_17B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_17B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_17B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_17B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_17C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_17C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_17C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_17C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_17C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_17C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_17D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_17D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_17D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_17D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_17D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_17D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_17E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_17E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_17E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_17E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_17E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_17E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_17F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_17F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_17F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_17F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_17F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_17F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_17G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_17G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_17G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_17G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_17G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_17G_300_nodif.csv') ###################################### Scenario 18: J=7 / M=4 / NDIF=3 / DIF=0.3 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_18A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_18A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_18A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_18A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_18A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_18A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_18B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_18B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_18B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_18B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_18B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_18B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_18C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_18C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_18C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_18C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_18C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_18C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_18D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_18D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_18D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_18D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_18D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_18D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_18E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_18E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_18E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_18E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_18E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_18E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_18F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_18F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_18F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_18F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_18F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_18F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_18G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_18G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_18G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.3,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_18G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_18G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_18G_300_nodif.csv') ###################################### Scenario 19: J=7 / M=2 / NDIF=3 / DIF=0.5 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_19A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_19A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_19A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_19A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_19A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_19A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_19B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_19B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_19B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_19B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_19B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_19B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_19C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_19C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_19C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_19C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_19C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_19C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_19D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_19D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_19D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_19D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_19D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_19D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_19E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_19E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_19E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_19E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_19E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_19E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_19F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_19F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_19F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_19F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_19F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_19F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_19G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_19G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_19G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_19G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_19G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_19G_300_nodif.csv') ###################################### Scenario 20: J=7 / M=4 / NDIF=3 / DIF=0.5 #### A: H0 TRUE dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_20A_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_20A_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_20A_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_20A_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_20A_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_20A_300_nodif.csv') #### B: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_20B_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_20B_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_20B_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_20B_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_20B_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_20B_300_nodif.csv') #### C: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_20C_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_20C_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_20C_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_20C_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_20C_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_20C_300_nodif.csv') #### D: H1 TRUE / ES = 0.4 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_20D_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_20D_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_20D_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_20D_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_20D_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_20D_300_nodif.csv') #### E: H1 TRUE / ES = 0.4 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_20E_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_20E_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_20E_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = 0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_20E_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_20E_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_20E_300_nodif.csv') #### F: H1 TRUE / ES = 0.2 / DS = 0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_20F_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_20F_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_20F_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.2)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_20F_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_20F_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_20F_300_nodif.csv') #### G: H1 TRUE / ES = 0.2 / DS = -0.3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100/scenario_20G_100.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200/scenario_20G_200.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300/scenario_20G_300.csv') res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) res_nodif <- pbmclapply(c('dat1','dat2','dat3'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = -0.5,eff.size = -0.4)) write.csv(res_nodif[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N100/scenario_20G_100_nodif.csv') write.csv(res_nodif[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N200/scenario_20G_200_nodif.csv') write.csv(res_nodif[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N300/scenario_20G_300_nodif.csv') ############################################################################## #----------------------------------------------------------------------------# ########################### SCENARIO ANALYSIS N=50 ########################### #----------------------------------------------------------------------------# ############################################################################## registerDoMC(5) ###################################### Scenario 1 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_1A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_1B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_1C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_1D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_1E_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5'),function(x) replicate_pcm_analysis(get(x))) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_1A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_1B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_1C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_1D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_1E_50.csv') ###################################### Scenario 2 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_2A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_2B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_2C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_2D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_2E_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5'),function(x) replicate_pcm_analysis(get(x))) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_2A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_2B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_2C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_2D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_2E_50.csv') ###################################### Scenario 3 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_3A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_3B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_3C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_3D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_3E_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5'),function(x) replicate_pcm_analysis(get(x))) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_3A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_3B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_3C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_3D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_3E_50.csv') ###################################### Scenario 4 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_4A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_4B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_4C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_4D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N50/scenario_4E_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5'),function(x) replicate_pcm_analysis(get(x))) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_4A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_4B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_4C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_4D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_4E_50.csv') ###################################### Scenario 5 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_5A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_5B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_5C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_5D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_5E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_5F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_5G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_5A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_5B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_5C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_5D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_5E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_5F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_5G_50.csv') ###################################### Scenario 6 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_6A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_6B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_6C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_6D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_6E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_6F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_6G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.3)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_6A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_6B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_6C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_6D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_6E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_6F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_6G_50.csv') ###################################### Scenario 7 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_7A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_7B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_7C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_7D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_7E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_7F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_7G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_7A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_7B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_7C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_7D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_7E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_7F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_7G_50.csv') ###################################### Scenario 8 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_8A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_8B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_8C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_8D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_8E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_8F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_8G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 1,difsize = 0.5)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_8A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_8B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_8C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_8D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_8E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_8F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_8G_50.csv') ###################################### Scenario 9 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_9A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_9B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_9C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_9D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_9E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_9F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_9G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 2,difsize = 0.3)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_9A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_9B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_9C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_9D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_9E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_9F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_9G_50.csv') ###################################### Scenario 10 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_10A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_10B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_10C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_10D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_10E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_10F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_10G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 2,difsize = 0.3)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_10A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_10B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_10C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_10D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_10E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_10F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_10G_50.csv') ###################################### Scenario 11 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_11A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_11B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_11C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_11D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_11E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_11F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_11G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 2,difsize = 0.5)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_11A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_11B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_11C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_11D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_11E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_11F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_11G_50.csv') ###################################### Scenario 12 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_12A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_12B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_12C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_12D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_12E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_12F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_12G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 2,difsize = 0.5)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_12A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_12B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_12C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_12D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_12E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_12F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_12G_50.csv') ###################################### Scenario 13 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_13A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_13B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_13C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_13D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_13E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_13F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_13G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 2,difsize = 0.3)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_13A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_13B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_13C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_13D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_13E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_13F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_13G_50.csv') ###################################### Scenario 14 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_14A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_14B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_14C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_14D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_14E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_14F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_14G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 2,difsize = 0.3)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_14A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_14B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_14C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_14D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_14E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_14F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_14G_50.csv') ###################################### Scenario 15 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_15A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_15B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_15C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_15D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_15E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_15F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_15G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 2,difsize = 0.5)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_15A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_15B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_15C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_15D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_15E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_15F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_15G_50.csv') ###################################### Scenario 16 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_16A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_16B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_16C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_16D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_16E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_16F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_16G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 2,difsize = 0.5)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_16A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_16B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_16C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_16D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_16E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_16F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_16G_50.csv') ###################################### Scenario 17 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_17A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_17B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_17C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_17D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_17E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_17F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_17G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 3,difsize = 0.3)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_17A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_17B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_17C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_17D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_17E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_17F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_17G_50.csv') ###################################### Scenario 18 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_18A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_18B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_18C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_18D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_18E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_18F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_18G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 3,difsize = 0.3)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_18A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_18B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_18C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_18D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_18E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_18F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_18G_50.csv') ###################################### Scenario 19 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_19A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_19B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_19C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_19D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_19E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_19F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_19G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 3,difsize = 0.5)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_19A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_19B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_19C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_19D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_19E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_19F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_19G_50.csv') ###################################### Scenario 20 dat1 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_20A_50.csv') dat2 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_20B_50.csv') dat3 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_20C_50.csv') dat4 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_20D_50.csv') dat5 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_20E_50.csv') dat6 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_20F_50.csv') dat7 <- read.csv(file = '/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N50/scenario_20G_50.csv') res <- pbmclapply(c('dat1','dat2','dat3','dat4','dat5','dat6','dat7'),function(x) replicate_pcm_analysis(get(x),nbdif = 3,difsize = 0.5)) write.csv(res[[1]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_20A_50.csv') write.csv(res[[2]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_20B_50.csv') write.csv(res[[3]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_20C_50.csv') write.csv(res[[4]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_20D_50.csv') write.csv(res[[5]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_20E_50.csv') write.csv(res[[6]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_20F_50.csv') write.csv(res[[7]],'/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/scenario_20G_50.csv') ############################################################################## #----------------------------------------------------------------------------# ################################# AGGREGATION ################################ #----------------------------------------------------------------------------# ############################################################################## #### 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(50,100,200,300),function(x) paste0(results,'_',x))) results2 <- c(sapply(c(50,100,200,300),function(x) paste0(results2,'_',x))) results <- sort(results) results2 <- sort(results2) results <- c(results,results2) #### Compiler function compile_simulation <- function(scenario) { name <- as.numeric(gsub("[^0-9.-]", "", substr(scenario,start=0,stop=2))) if (substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50" & name<=4) { s <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_',scenario,'.csv')) } if (substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50" & name>4) { s <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N50/scenario_',scenario,'.csv')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="100" & name<=4) { s <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_',scenario,'.csv')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="100" & name>4) { s <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N100/scenario_',scenario,'_nodif.csv')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="200" & name<=4) { s <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_',scenario,'.csv')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="200" & name>4) { s <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N200/scenario_',scenario,'_nodif.csv')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="300" & name<=4) { s <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_',scenario,'.csv')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="300" & name>4) { s <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/NoDIF/N300/scenario_',scenario,'_nodif.csv')) } if (unique(s$J)==4) { if (unique(s$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 (unique(s$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) ) } } N <- ifelse(substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50","50",substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))) zz <- ifelse(N=="50",substr(scenario,start=0,stop=nchar(scenario)-3),substr(scenario,start=0,stop=nchar(scenario)-4)) b <- data.frame(scenario=zz, scenario.type=substr(zz,start=nchar(zz),stop=nchar(zz)), N=N, J=unique(s$J), M=unique(s$M), eff.size=unique(s$eff.size), nb.dif=unique(s$nb.dif), dif.size=unique(s$dif.size) ) 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$low.ci.beta), m.high.ci.beta=mean(s$high.ci.beta), true.value.in.ci.p=mean(s$true.value.in.ci), h0.rejected.p=mean(s$h0.rejected), beta.same.sign.truebeta.p=mean(s$beta.same.sign.truebeta,na.rm=T), beta.same.sign.truebeta.signif.p=mean(s[s$h0.rejected==1,]$beta.same.sign.truebeta,na.rm=T)) d <- cbind(b,a,z) d$prop. return(d) } #### Compiled results res.dat <- compile_simulation('1A_100') for (x in results[seq(2,length(results))]) { y <- compile_simulation(x) res.dat <- bind_rows(res.dat,y) } res.dat[res.dat$scenario.type=='A','dif.size'] <- -res.dat[res.dat$scenario.type=='A','dif.size'] res.dat[is.na(res.dat$dif.size),'dif.size'] <- 0 res.dat[193:417,'nb.dif'] <- 2 res.dat[417:528,'nb.dif'] <- 3 res.dat[res.dat$scenario.type=="B",]$eff.size <- 0.2 res.dat[res.dat$scenario.type=="C" & res.dat$dif.size==0,]$eff.size <- 0.4 res.dat[res.dat$scenario.type=="C" & res.dat$dif.size!=0,]$eff.size <- 0.2 res.dat[res.dat$scenario.type=="D" & res.dat$dif.size==0,]$eff.size <- -0.2 res.dat[res.dat$scenario.type=="D" & res.dat$dif.size!=0,]$eff.size <- 0.4 res.dat[res.dat$scenario.type=="E" & res.dat$dif.size==0,]$eff.size <- -0.4 res.dat[res.dat$scenario.type=="E" & res.dat$dif.size!=0,]$eff.size <- 0.4 res.dat[res.dat$scenario.type=="F",]$eff.size <- -0.2 res.dat[res.dat$scenario.type=="G",]$eff.size <- -0.4 View(res.dat) res.dat.simple <- res.dat[,c(1:8,13,16:18)] res.dat.simple$m.beta <- round(res.dat.simple$m.beta,3) res.dat.simple ############################################################################## #----------------------------------------------------------------------------# ########################### AGGREGATION DIF MATRICES ######################### #----------------------------------------------------------------------------# ############################################################################## #### 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(50,100,200,300),function(x) paste0(results,'_',x))) results2 <- c(sapply(c(50,100,200,300),function(x) paste0(results2,'_',x))) results <- sort(results) results2 <- sort(results2) results <- c(results,results2)[81:528] #### Compiler function compile_simulation2 <- function(scenario) { name <- as.numeric(gsub("[^0-9.-]", "", substr(scenario,start=0,stop=2))) if (substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50" & name>4) { s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/DIF/N50/',scenario,'.xls')) } 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) ) } } N <- ifelse(substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50","50",substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))) zz <- ifelse(N=="50",substr(scenario,start=0,stop=nchar(scenario)-3),substr(scenario,start=0,stop=nchar(scenario)-4)) 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(rep(eff.size,nrow(s))==0,NA,(rep(eff.size,nrow(s))/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$bias <- res.dat$eff.size-res.dat$m.beta res.dat.dif$bias <- res.dat.dif$eff.size-res.dat.dif$m.beta ############################################################################## #----------------------------------------------------------------------------# ####################### AGGREGATION DIF MATRICES ROSALI ###################### #----------------------------------------------------------------------------# ############################################################################## #### 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(50,100,200,300),function(x) paste0(results,'_',x))) results2 <- c(sapply(c(50,100,200,300),function(x) paste0(results2,'_',x))) results <- sort(results) results2 <- sort(results2) results <- c(results,results2) #### Compiler function compile_simulation2_rosali <- function(scenario) { name <- as.numeric(gsub("[^0-9.-]", "", substr(scenario,start=0,stop=2))) if (substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50" & name>0) { s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/ROSALI-DIF/N50/',scenario,'_original.xls')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="100" & name>0) { s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/ROSALI-DIF/N100/',scenario,'_original.xls')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="200" & name>0) { s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/ROSALI-DIF/N200/',scenario,'_original.xls')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="300" & name>0) { s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/ROSALI-DIF/N300/',scenario,'_original.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) ) } } N <- ifelse(substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50","50",substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))) zz <- ifelse(N=="50",substr(scenario,start=0,stop=nchar(scenario)-3),substr(scenario,start=0,stop=nchar(scenario)-4)) 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(rep(eff.size,nrow(s))==0,NA,(rep(eff.size,nrow(s))/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.rosali <- compile_simulation2_rosali('1A_100') for (x in results[seq(2,length(results))]) { y <- compile_simulation2_rosali(x) res.dat.dif.rosali <- bind_rows(res.dat.dif.rosali,y) } res.dat.dif.rosali$bias <- res.dat.dif.rosali$eff.size-res.dat.dif.rosali$m.beta ############################################################################## #----------------------------------------------------------------------------# ################################### RESALI ################################### #----------------------------------------------------------------------------# ############################################################################## generate_resali <- function(scenario=NULL,grp=NULL) { scen <- as.numeric(gsub("[A,B,C,D,E,F,G,_]","",substr(scenario,0,3))) if (substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50") { N <- 50 } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="100") { N <- 100 } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="200") { N <- 200 } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="300") { N <- 300 } if (scen<5) { dat <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N',N,'/scenario_',scenario,'.csv')) } if (scen>=5) { dat <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N',N,'/scenario_',scenario,'.csv')) } if (scen%in%c(3,4,13:20)) { res <- resali(df=dat[dat$replication==1,],items = seq(1,7),group=grp,verbose=FALSE) df_res <- data.frame(dif.detect.1=ifelse(length(res$dif.items)>=1,res$dif.items[1],NA), dif.detect.2=ifelse(length(res$dif.items)>=2,res$dif.items[2],NA), dif.detect.3=ifelse(length(res$dif.items)>=3,res$dif.items[3],NA), dif.detect.4=ifelse(length(res$dif.items)>=4,res$dif.items[4],NA), dif.detect.5=ifelse(length(res$dif.items)>=5,res$dif.items[5],NA), dif.detect.6=ifelse(length(res$dif.items)>=6,res$dif.items[6],NA), dif.detect.7=ifelse(length(res$dif.items)>=7,res$dif.items[7],NA), dif.detect.unif.1=ifelse(length(res$uniform)>=1,res$uniform[1],NA), dif.detect.unif.2=ifelse(length(res$uniform)>=2,res$uniform[2],NA), dif.detect.unif.3=ifelse(length(res$uniform)>=3,res$uniform[3],NA), dif.detect.unif.4=ifelse(length(res$uniform)>=4,res$uniform[4],NA), dif.detect.unif.5=ifelse(length(res$uniform)>=5,res$uniform[5],NA), dif.detect.unif.6=ifelse(length(res$uniform)>=6,res$uniform[6],NA), dif.detect.unif.7=ifelse(length(res$uniform)>=7,res$uniform[7],NA), N=N, nbdif=ifelse(scen<=4,0,ifelse(scen<=16,2,3)), true.dif.1=ifelse(scen<=4,NA,unique(dat[dat$replication==1,]$dif1)), true.dif.2=ifelse(scen<=4,NA,unique(dat[dat$replication==1,]$dif2)), true.dif.3=ifelse(scen<=16,NA,unique(dat[dat$replication==1,]$dif3)) ) for (k in 2:1000) { if (k%%100==0) { cat(paste0('N=',k,'/1000\n')) } res <- resali(df=dat[dat$replication==k,],items = seq(1,7),group=grp,verbose=FALSE) df_res2 <- data.frame(dif.detect.1=ifelse(length(res$dif.items)>=1,res$dif.items[1],NA), dif.detect.2=ifelse(length(res$dif.items)>=2,res$dif.items[2],NA), dif.detect.3=ifelse(length(res$dif.items)>=3,res$dif.items[3],NA), dif.detect.4=ifelse(length(res$dif.items)>=4,res$dif.items[4],NA), dif.detect.5=ifelse(length(res$dif.items)>=5,res$dif.items[5],NA), dif.detect.6=ifelse(length(res$dif.items)>=6,res$dif.items[6],NA), dif.detect.7=ifelse(length(res$dif.items)>=7,res$dif.items[7],NA), dif.detect.unif.1=ifelse(length(res$uniform)>=1,res$uniform[1],NA), dif.detect.unif.2=ifelse(length(res$uniform)>=2,res$uniform[2],NA), dif.detect.unif.3=ifelse(length(res$uniform)>=3,res$uniform[3],NA), dif.detect.unif.4=ifelse(length(res$uniform)>=4,res$uniform[4],NA), dif.detect.unif.5=ifelse(length(res$uniform)>=5,res$uniform[5],NA), dif.detect.unif.6=ifelse(length(res$uniform)>=6,res$uniform[6],NA), dif.detect.unif.7=ifelse(length(res$uniform)>=7,res$uniform[7],NA), N=N, nbdif=ifelse(scen<=4,0,ifelse(scen<=16,2,3)), true.dif.1=ifelse(scen<=4,NA,unique(dat[dat$replication==k,]$dif1)), true.dif.2=ifelse(scen<=4,NA,unique(dat[dat$replication==k,]$dif2)), true.dif.3=ifelse(scen<=16,NA,unique(dat[dat$replication==k,]$dif3))) df_res <- rbind(df_res,df_res2) } } else if (scen%in%c(1,2,5:12)) { res <- resali(df=dat[dat$replication==1,],items = seq(1,4),group=grp,verbose=FALSE) df_res <- data.frame(dif.detect.1=ifelse(length(res$dif.items)>=1,res$dif.items[1],NA), dif.detect.2=ifelse(length(res$dif.items)>=2,res$dif.items[2],NA), dif.detect.3=ifelse(length(res$dif.items)>=3,res$dif.items[3],NA), dif.detect.4=ifelse(length(res$dif.items)>=4,res$dif.items[4],NA), dif.detect.unif.1=ifelse(length(res$uniform)>=1,res$uniform[1],NA), dif.detect.unif.2=ifelse(length(res$uniform)>=2,res$uniform[2],NA), dif.detect.unif.3=ifelse(length(res$uniform)>=3,res$uniform[3],NA), dif.detect.unif.4=ifelse(length(res$uniform)>=4,res$uniform[4],NA), N=N, nbdif=ifelse(scen<=4,0,ifelse(scen<=8,1,2)), true.dif.1=ifelse(scen<=4,NA,unique(dat[dat$replication==1,]$dif1)), true.dif.2=ifelse(scen<=8,NA,unique(dat[dat$replication==1,]$dif2)) ) for (k in 2:1000) { if (k%%100==0) { cat(paste0('N=',k,'/1000\n')) } res <- resali(df=dat[dat$replication==k,],items = seq(1,4),group=grp,verbose=FALSE) df_res2 <- data.frame(dif.detect.1=ifelse(length(res$dif.items)>=1,res$dif.items[1],NA), dif.detect.2=ifelse(length(res$dif.items)>=2,res$dif.items[2],NA), dif.detect.3=ifelse(length(res$dif.items)>=3,res$dif.items[3],NA), dif.detect.4=ifelse(length(res$dif.items)>=4,res$dif.items[4],NA), dif.detect.unif.1=ifelse(length(res$uniform)>=1,res$uniform[1],NA), dif.detect.unif.2=ifelse(length(res$uniform)>=2,res$uniform[2],NA), dif.detect.unif.3=ifelse(length(res$uniform)>=3,res$uniform[3],NA), dif.detect.unif.4=ifelse(length(res$uniform)>=4,res$uniform[4],NA), N=N, nbdif=ifelse(scen<=4,0,ifelse(scen<=8,1,2)), true.dif.1=ifelse(scen<=4,NA,unique(dat[dat$replication==k,]$dif1)), true.dif.2=ifelse(scen<=8,NA,unique(dat[dat$replication==k,]$dif2))) df_res <- rbind(df_res,df_res2) } } return(df_res) } 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(50,100,200,300),function(x) paste0(results,'_',x))) results2 <- c(sapply(c(50,100,200,300),function(x) paste0(results2,'_',x))) results <- sort(results) results2 <- sort(results2) results <- c(results,results2) for (r in results) { cat(paste0(r,"\n")) cat(paste0("-------------------------------------------","\n")) write.csv(generate_resali(r,"TT"),paste0("/home/corentin/Documents/These/Recherche/Simulations/Analysis/RESALI/Detection/",r,".csv")) cat(paste0("-------------------------------------------","\n")) } ############################################################################## #----------------------------------------------------------------------------# ####################### AGGREGATION DIF MATRICES RESALI ###################### #----------------------------------------------------------------------------# ############################################################################## #### 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(50,100,200,300),function(x) paste0(results,'_',x))) results2 <- c(sapply(c(50,100,200,300),function(x) paste0(results2,'_',x))) results <- sort(results) results2 <- sort(results2) results <- c(results,results2) #### Compiler function compile_simulation2_resali <- function(scenario) { name <- as.numeric(gsub("[^0-9.-]", "", substr(scenario,start=0,stop=2))) if (substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50" & name>0) { s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/resali-DIF/N50/',scenario,'_original.xls')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="100" & name>0) { s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/resali-DIF/N100/',scenario,'_original.xls')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="200" & name>0) { s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/resali-DIF/N200/',scenario,'_original.xls')) } if (substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))=="300" & name>0) { s <- read_excel(paste0('/home/corentin/Documents/These/Recherche/Simulations/Analysis/resali-DIF/N300/',scenario,'_original.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) ) } } N <- ifelse(substr(scenario,start=nchar(scenario)-1,stop=nchar(scenario))=="50","50",substr(scenario,start=nchar(scenario)-2,stop=nchar(scenario))) zz <- ifelse(N=="50",substr(scenario,start=0,stop=nchar(scenario)-3),substr(scenario,start=0,stop=nchar(scenario)-4)) 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(rep(eff.size,nrow(s))==0,NA,(rep(eff.size,nrow(s))/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.resali <- compile_simulation2_resali('1A_100') for (x in results[seq(2,length(results))]) { y <- compile_simulation2_resali(x) res.dat.dif.resali <- bind_rows(res.dat.dif.resali,y) } res.dat.dif.resali$bias <- res.dat.dif.resali$eff.size-res.dat.dif.resali$m.beta ############################################################################## #----------------------------------------------------------------------------# ################################## RASCHPOWER ################################ #----------------------------------------------------------------------------# ############################################################################## ###### 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.05 res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==100,]$theoretical.power <- 0.1543 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==100,]$theoretical.power <- 0.1543 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'D') & res.dat$N==100,]$theoretical.power <- 0.4627 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'E') & res.dat$N==100,]$theoretical.power <- 0.4627 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'F') & res.dat$N==100,]$theoretical.power <- 0.1543 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'G') & res.dat$N==100,]$theoretical.power <- 0.4627 res.dat[res.dat$scenario %in% paste0(1,'C') & res.dat$N==100,]$theoretical.power <- 0.4627 res.dat[res.dat$scenario %in% paste0(1,'D') & res.dat$N==100,]$theoretical.power <- 0.1543 res.dat[res.dat$scenario %in% paste0(1,'E') & res.dat$N==100,]$theoretical.power <- 0.4627 ## 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.05 res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'B') & res.dat$N==100,]$theoretical.power <- 0.2177 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'C') & res.dat$N==100,]$theoretical.power <- 0.2177 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'D') & res.dat$N==100,]$theoretical.power <- 0.6586 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'E') & res.dat$N==100,]$theoretical.power <- 0.6586 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'F') & res.dat$N==100,]$theoretical.power <- 0.2177 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'G') & res.dat$N==100,]$theoretical.power <- 0.6586 res.dat[res.dat$scenario %in% paste0(2,'C') & res.dat$N==100,]$theoretical.power <- 0.6586 res.dat[res.dat$scenario %in% paste0(2,'D') & res.dat$N==100,]$theoretical.power <- 0.2177 res.dat[res.dat$scenario %in% paste0(2,'E') & res.dat$N==100,]$theoretical.power <- 0.6586 ## 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.05 res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'B') & res.dat$N==100,]$theoretical.power <- 0.1870 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'C') & res.dat$N==100,]$theoretical.power <- 0.1870 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'D') & res.dat$N==100,]$theoretical.power <- 0.5666 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'E') & res.dat$N==100,]$theoretical.power <- 0.5666 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'F') & res.dat$N==100,]$theoretical.power <- 0.1870 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'G') & res.dat$N==100,]$theoretical.power <- 0.5666 res.dat[res.dat$scenario %in% paste0(3,'C') & res.dat$N==100,]$theoretical.power <- 0.5666 res.dat[res.dat$scenario %in% paste0(3,'D') & res.dat$N==100,]$theoretical.power <- 0.1870 res.dat[res.dat$scenario %in% paste0(3,'E') & res.dat$N==100,]$theoretical.power <- 0.5666 ## 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.05 res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'B') & res.dat$N==100,]$theoretical.power <- 0.2450 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'C') & res.dat$N==100,]$theoretical.power <- 0.2450 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'D') & res.dat$N==100,]$theoretical.power <- 0.7136 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'E') & res.dat$N==100,]$theoretical.power <- 0.7136 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'F') & res.dat$N==100,]$theoretical.power <- 0.2450 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'G') & res.dat$N==100,]$theoretical.power <- 0.7136 res.dat[res.dat$scenario %in% paste0(4,'C') & res.dat$N==100,]$theoretical.power <- 0.7136 res.dat[res.dat$scenario %in% paste0(4,'D') & res.dat$N==100,]$theoretical.power <- 0.2450 res.dat[res.dat$scenario %in% paste0(4,'E') & res.dat$N==100,]$theoretical.power <- 0.7136 ### 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.05 res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==200,]$theoretical.power <- 0.2618 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==200,]$theoretical.power <- 0.2618 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.2618 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.2618 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.05 res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'B') & res.dat$N==200,]$theoretical.power <- 0.3875 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'C') & res.dat$N==200,]$theoretical.power <- 0.3875 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'D') & res.dat$N==200,]$theoretical.power <- 0.9161 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'E') & res.dat$N==200,]$theoretical.power <- 0.9161 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'F') & res.dat$N==200,]$theoretical.power <- 0.3875 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'G') & res.dat$N==200,]$theoretical.power <- 0.9161 res.dat[res.dat$scenario %in% paste0(2,'C') & res.dat$N==200,]$theoretical.power <- 0.9161 res.dat[res.dat$scenario %in% paste0(2,'D') & res.dat$N==200,]$theoretical.power <- 0.3875 res.dat[res.dat$scenario %in% paste0(2,'E') & res.dat$N==200,]$theoretical.power <- 0.9161 ## 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.05 res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'B') & res.dat$N==200,]$theoretical.power <- 0.3258 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'C') & res.dat$N==200,]$theoretical.power <- 0.3258 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.3258 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.3258 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.05 res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'B') & res.dat$N==200,]$theoretical.power <- 0.4321 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'C') & res.dat$N==200,]$theoretical.power <- 0.4321 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'D') & res.dat$N==200,]$theoretical.power <- 0.9471 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'E') & res.dat$N==200,]$theoretical.power <- 0.9471 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'F') & res.dat$N==200,]$theoretical.power <- 0.4321 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'G') & res.dat$N==200,]$theoretical.power <- 0.9471 res.dat[res.dat$scenario %in% paste0(4,'C') & res.dat$N==200,]$theoretical.power <- 0.9471 res.dat[res.dat$scenario %in% paste0(4,'D') & res.dat$N==200,]$theoretical.power <- 0.4321 res.dat[res.dat$scenario %in% paste0(4,'E') & res.dat$N==200,]$theoretical.power <- 0.9471 ### 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.05 res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==300,]$theoretical.power <- 0.3660 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==300,]$theoretical.power <- 0.3660 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.3660 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.3660 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.05 res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'B') & res.dat$N==300,]$theoretical.power <- 0.5373 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'C') & res.dat$N==300,]$theoretical.power <- 0.5373 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'D') & res.dat$N==300,]$theoretical.power <- 0.9834 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'E') & res.dat$N==300,]$theoretical.power <- 0.9834 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'F') & res.dat$N==300,]$theoretical.power <- 0.5373 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'G') & res.dat$N==300,]$theoretical.power <- 0.9834 res.dat[res.dat$scenario %in% paste0(2,'C') & res.dat$N==300,]$theoretical.power <- 0.9834 res.dat[res.dat$scenario %in% paste0(2,'D') & res.dat$N==300,]$theoretical.power <- 0.5373 res.dat[res.dat$scenario %in% paste0(2,'E') & res.dat$N==300,]$theoretical.power <- 0.9834 ## 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.05 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.05 res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'B') & res.dat$N==300,]$theoretical.power <- 0.5907 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'C') & res.dat$N==300,]$theoretical.power <- 0.5907 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'D') & res.dat$N==300,]$theoretical.power <- 0.9919 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'E') & res.dat$N==300,]$theoretical.power <- 0.9919 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'F') & res.dat$N==300,]$theoretical.power <- 0.5907 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'G') & res.dat$N==300,]$theoretical.power <- 0.9919 res.dat[res.dat$scenario %in% paste0(4,'C') & res.dat$N==300,]$theoretical.power <- 0.9919 res.dat[res.dat$scenario %in% paste0(4,'D') & res.dat$N==300,]$theoretical.power <- 0.5907 res.dat[res.dat$scenario %in% paste0(4,'E') & res.dat$N==300,]$theoretical.power <- 0.9919 ### Scénarios N=50 ## Scénarios J=4 / M=2 res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'A') & res.dat$N==50,]$theoretical.power <- 0.05 res.dat[res.dat$scenario %in% paste0(c(1,5,7,9,11),'B') & res.dat$N==50,]$theoretical.power <- 0.1013 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'C') & res.dat$N==50,]$theoretical.power <- 0.1013 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'D') & res.dat$N==50,]$theoretical.power <- 0.2615 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'E') & res.dat$N==50,]$theoretical.power <- 0.2615 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'F') & res.dat$N==50,]$theoretical.power <- 0.1013 res.dat[res.dat$scenario %in% paste0(c(5,7,9,11),'G') & res.dat$N==50,]$theoretical.power <- 0.2615 res.dat[res.dat$scenario %in% paste0(1,'C') & res.dat$N==50,]$theoretical.power <- 0.2615 res.dat[res.dat$scenario %in% paste0(1,'D') & res.dat$N==50,]$theoretical.power <- 0.1013 res.dat[res.dat$scenario %in% paste0(1,'E') & res.dat$N==50,]$theoretical.power <- 0.2615 ## Scénarios J=4 / M=4 res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'A') & res.dat$N==50,]$theoretical.power <- 0.05 res.dat[res.dat$scenario %in% paste0(c(2,6,8,10,12),'B') & res.dat$N==50,]$theoretical.power <- 0.1339 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'C') & res.dat$N==50,]$theoretical.power <- 0.1339 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'D') & res.dat$N==50,]$theoretical.power <- 0.3863 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'E') & res.dat$N==50,]$theoretical.power <- 0.3863 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'F') & res.dat$N==50,]$theoretical.power <- 0.1339 res.dat[res.dat$scenario %in% paste0(c(6,8,10,12),'G') & res.dat$N==50,]$theoretical.power <- 0.3863 res.dat[res.dat$scenario %in% paste0(2,'C') & res.dat$N==50,]$theoretical.power <- 0.3863 res.dat[res.dat$scenario %in% paste0(2,'D') & res.dat$N==50,]$theoretical.power <- 0.1339 res.dat[res.dat$scenario %in% paste0(2,'E') & res.dat$N==50,]$theoretical.power <- 0.3863 ## Scénarios J=7 / M=2 res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'A') & res.dat$N==50,]$theoretical.power <- 0.05 res.dat[res.dat$scenario %in% paste0(c(3,13,15,17,19),'B') & res.dat$N==50,]$theoretical.power <- 0.1171 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'C') & res.dat$N==50,]$theoretical.power <- 0.1171 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'D') & res.dat$N==50,]$theoretical.power <- 0.3236 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'E') & res.dat$N==50,]$theoretical.power <- 0.3236 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'F') & res.dat$N==50,]$theoretical.power <- 0.1171 res.dat[res.dat$scenario %in% paste0(c(13,15,17,19),'G') & res.dat$N==50,]$theoretical.power <- 0.3236 res.dat[res.dat$scenario %in% paste0(3,'C') & res.dat$N==50,]$theoretical.power <- 0.3236 res.dat[res.dat$scenario %in% paste0(3,'D') & res.dat$N==50,]$theoretical.power <- 0.1171 res.dat[res.dat$scenario %in% paste0(3,'E') & res.dat$N==50,]$theoretical.power <- 0.3236 ## Scénarios J=7 / M=4 res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'A') & res.dat$N==50,]$theoretical.power <- 0.05 res.dat[res.dat$scenario %in% paste0(c(4,14,16,18,20),'B') & res.dat$N==50,]$theoretical.power <- 0.1448 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'C') & res.dat$N==50,]$theoretical.power <- 0.1448 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'D') & res.dat$N==50,]$theoretical.power <- 0.4328 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'E') & res.dat$N==50,]$theoretical.power <- 0.4328 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'F') & res.dat$N==50,]$theoretical.power <- 0.1448 res.dat[res.dat$scenario %in% paste0(c(14,16,18,20),'G') & res.dat$N==50,]$theoretical.power <- 0.4328 res.dat[res.dat$scenario %in% paste0(4,'C') & res.dat$N==50,]$theoretical.power <- 0.4328 res.dat[res.dat$scenario %in% paste0(4,'D') & res.dat$N==50,]$theoretical.power <- 0.1448 res.dat[res.dat$scenario %in% paste0(4,'E') & res.dat$N==50,]$theoretical.power <- 0.4328 ### DIF scenarios res.dat.dif$theoretical.power <- res.dat[81:nrow(res.dat),]$theoretical.power