|
|
|
##############################################################################
|
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
############################ BOXPLOTS H0 SCENARIOS ###########################
|
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
## Proportion of rejected h0 per dif value in h0 scenarios (A) by DIF size
|
|
|
|
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2,1),xlab='DIF size',ylab='H0 rejection proportion in target scenario')
|
|
|
|
res.null0 <- res.dat[res.dat$eff.size==0 & res.dat$dif.size==0,]
|
|
|
|
points(y=res.null0$h0.rejected.p,x=rep(3,nrow(res.null0)),col='gray',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$eff.size==0 & res.dat$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.dat[res.dat$eff.size==0 & res.dat$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
## Proportion of rejected h0 per dif value in h0 scenarios (A) by DIF size
|
|
|
|
|
|
|
|
par(mfrow=c(2,2))
|
|
|
|
|
|
|
|
# 0 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==0,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='No DIF',ylim=c(0,1))
|
|
|
|
points(y=res.null$h0.rejected.p,x=rep(1,nrow(res.null)),col='#590b0c',pch=3)
|
|
|
|
|
|
|
|
# 1 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==1,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 1 item',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 2 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==2,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 2 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 3 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==3,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
par(mfrow=c(1,1))
|
|
|
|
|
|
|
|
## Proportion of rejected h0 per dif value in h0 scenarios (A) by DIF size (1 item) J=4
|
|
|
|
|
|
|
|
par(mfrow=c(2,2))
|
|
|
|
|
|
|
|
# 0 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==0 & res.dat$J==4,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='No DIF',ylim=c(0,1))
|
|
|
|
points(y=res.null$h0.rejected.p,x=rep(1,nrow(res.null)),col='#590b0c',pch=3)
|
|
|
|
|
|
|
|
# 1 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==1 & res.dat$J==4,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 1 item',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 2 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==2 & res.dat$J==4,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 2 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
par(mfrow=c(1,1))
|
|
|
|
|
|
|
|
|
|
|
|
## Proportion of rejected h0 per dif value in h0 scenarios (A) by DIF size (1 item) J=7
|
|
|
|
|
|
|
|
par(mfrow=c(2,2))
|
|
|
|
|
|
|
|
# 0 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==0 & res.dat$J==7,]
|
|
|
|
nrow(res.null)
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='No DIF',ylim=c(0,1))
|
|
|
|
points(y=res.null$h0.rejected.p,x=rep(1,nrow(res.null)),col='#590b0c',pch=3)
|
|
|
|
|
|
|
|
# 2 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==2 & res.dat$J==7,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 2 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 3 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==3 & res.dat$J==7,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
par(mfrow=c(1,1))
|
|
|
|
|
|
|
|
############# By N
|
|
|
|
|
|
|
|
####### N=100
|
|
|
|
|
|
|
|
|
|
|
|
par(mfrow=c(2,2))
|
|
|
|
|
|
|
|
# 0 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==0 & res.dat$N==100,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='No DIF',ylim=c(0,1))
|
|
|
|
points(y=res.null$h0.rejected.p,x=rep(1,nrow(res.null)),col='#590b0c',pch=3)
|
|
|
|
|
|
|
|
# 1 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==1 & res.dat$N==100,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 1 item',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 2 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==2 & res.dat$N==100,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 2 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 3 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==3 & res.dat$N==100,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
par(mfrow=c(1,1))
|
|
|
|
|
|
|
|
|
|
|
|
####### N=200
|
|
|
|
|
|
|
|
|
|
|
|
par(mfrow=c(2,2))
|
|
|
|
|
|
|
|
# 0 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==0 & res.dat$N==200,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='No DIF',ylim=c(0,1))
|
|
|
|
points(y=res.null$h0.rejected.p,x=rep(1,nrow(res.null)),col='#590b0c',pch=3)
|
|
|
|
|
|
|
|
# 1 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==1 & res.dat$N==200,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 1 item',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 2 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==2 & res.dat$N==200,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 2 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 3 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==3 & res.dat$N==200,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
par(mfrow=c(1,1))
|
|
|
|
|
|
|
|
|
|
|
|
####### N=300
|
|
|
|
|
|
|
|
|
|
|
|
par(mfrow=c(2,2))
|
|
|
|
|
|
|
|
# 0 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==0 & res.dat$N==300,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='No DIF',ylim=c(0,1))
|
|
|
|
points(y=res.null$h0.rejected.p,x=rep(1,nrow(res.null)),col='#590b0c',pch=3)
|
|
|
|
|
|
|
|
# 1 item
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==1 & res.dat$N==300,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 1 item',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 2 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==2 & res.dat$N==300,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 2 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# 3 items
|
|
|
|
res.null <- res.dat[res.dat$eff.size==0 & res.dat$nb.dif==3 & res.dat$N==300,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2),xlab='DIF size',
|
|
|
|
ylab='H0 rejection proportion in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.null[res.null$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.null[res.null$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
par(mfrow=c(1,1))
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
############################ BOXPLOTS H1 SCENARIOS ###########################
|
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
#### CALCULER LA PUISSANCE THEORIQUE AVEC RASCHPOWER
|
|
|
|
|
|
|
|
## Proportion of rejected h0 per dif value in h1 scenarios by DIF size // eff.size positive
|
|
|
|
|
|
|
|
res.null <- res.dat[res.dat$eff.size>0,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2,4,2,3),xlab='DIF size',ylab='H0 rejection proportion in target scenario')
|
|
|
|
res.null0 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==0,]
|
|
|
|
points(y=res.null0$h0.rejected.p,x=rep(3,nrow(res.null0)),col='darkblue',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==-0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==0.3,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(4,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==0.5,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(5,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
|
|
|
|
############# By N // EFF SIZE POSITIVE
|
|
|
|
|
|
|
|
####### N=100
|
|
|
|
|
|
|
|
res.null <- res.dat[res.dat$eff.size>0 & res.dat$N==100,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2,4,2,3),xlab='DIF size',ylab='H0 rejection proportion in target scenario')
|
|
|
|
res.null0 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==0 & res.dat$N==100,]
|
|
|
|
points(y=res.null0$h0.rejected.p,x=rep(3,nrow(res.null0)),col='darkblue',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==-0.3 & res.dat$N==100,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==-0.5 & res.dat$N==100,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==0.3 & res.dat$N==100,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(4,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==0.5 & res.dat$N==100,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(5,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
####### N=300 // DIF à 0.5 - QUELS SONT LES SCENARIOS EN HAUT
|
|
|
|
|
|
|
|
res.null <- res.dat[res.dat$eff.size>0 & res.dat$N==300,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2,4,2,3),xlab='DIF size',ylab='H0 rejection proportion in target scenario')
|
|
|
|
res.null0 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==0 & res.dat$N==300,]
|
|
|
|
points(y=res.null0$h0.rejected.p,x=rep(3,nrow(res.null0)),col='darkblue',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==-0.3 & res.dat$N==300,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==-0.5 & res.dat$N==300,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==0.3 & res.dat$N==300,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(4,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.dat[res.dat$eff.size>0 & res.dat$dif.size==0.5 & res.dat$N==300,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(5,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
|
|
|
|
############# By N // EFF SIZE NEGATIVE
|
|
|
|
|
|
|
|
####### N=100
|
|
|
|
|
|
|
|
res.null <- res.dat[res.dat$eff.size<0 & res.dat$N==100,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2,4,2,3),xlab='DIF size',ylab='H0 rejection proportion in target scenario')
|
|
|
|
res.null0 <- res.dat[res.dat$eff.size<0 & res.dat$dif.size==0 & res.dat$N==100,]
|
|
|
|
points(y=res.null0$h0.rejected.p,x=rep(3,nrow(res.null0)),col='darkblue',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$eff.size<0 & res.dat$dif.size==-0.3 & res.dat$N==100,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.dat[res.dat$eff.size<0 & res.dat$dif.size==-0.5 & res.dat$N==100,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
|
|
|
|
####### N=300 // DIF à 0.5 - QUELS SONT LES SCENARIOS EN HAUT
|
|
|
|
|
|
|
|
res.null <- res.dat[res.dat$eff.size<0 & res.dat$N==300,]
|
|
|
|
boxplot(h0.rejected.p~dif.size,data=res.null,col=c(3,2,4,2,3),xlab='DIF size',ylab='H0 rejection proportion in target scenario')
|
|
|
|
res.null0 <- res.dat[res.dat$eff.size<0 & res.dat$dif.size==0 & res.dat$N==300,]
|
|
|
|
points(y=res.null0$h0.rejected.p,x=rep(3,nrow(res.null0)),col='darkblue',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$eff.size<0 & res.dat$dif.size==-0.3 & res.dat$N==300,]
|
|
|
|
points(y=res.null3$h0.rejected.p,x=rep(2,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null5 <- res.dat[res.dat$eff.size<0 & res.dat$dif.size==-0.5 & res.dat$N==300,]
|
|
|
|
points(y=res.null5$h0.rejected.p,x=rep(1,nrow(res.null5)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
########################## SYSTEMATIC ERROR BOXPLOTS #########################
|
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
# Overall
|
|
|
|
|
|
|
|
boxplot(true.value.in.ci.p~dif.size,data=res.dat,col=c(2,3),xlab='DIF size',
|
|
|
|
ylab='Proportion of true beta value in CI in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==-0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(1,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(5,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(2,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(4,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==0,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(3,nrow(res.null3)),col='gray',pch=3)
|
|
|
|
|
|
|
|
# J=4
|
|
|
|
res.dat.temp <- res.dat[res.dat$J==4,]
|
|
|
|
|
|
|
|
boxplot(true.value.in.ci.p~dif.size,data=res.dat.temp,col=c(2,3),xlab='DIF size',
|
|
|
|
ylab='Proportion of true beta value in CI in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(1,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(5,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(2,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(4,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(3,nrow(res.null3)),col='gray',pch=3)
|
|
|
|
|
|
|
|
|
|
|
|
# J=7
|
|
|
|
res.dat.temp <- res.dat[res.dat$J==7,]
|
|
|
|
|
|
|
|
boxplot(true.value.in.ci.p~dif.size,data=res.dat.temp,col=c(2,3),xlab='DIF size',
|
|
|
|
ylab='Proportion of true beta value in CI in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(1,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(5,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(2,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(4,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(3,nrow(res.null3)),col='gray',pch=3)
|
|
|
|
|
|
|
|
# J=4 / 1 DIF
|
|
|
|
res.dat.temp <- res.dat[res.dat$J==4 & res.dat$nb.dif==1,]
|
|
|
|
|
|
|
|
boxplot(true.value.in.ci.p~dif.size,data=res.dat.temp,col=c(2,3,3,2),xlab='DIF size',
|
|
|
|
ylab='Proportion of true beta value in CI in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(1,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(4,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(2,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(3,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
# J=4 / 2 DIF
|
|
|
|
res.dat.temp <- res.dat[res.dat$J==4 & res.dat$nb.dif==2,]
|
|
|
|
|
|
|
|
boxplot(true.value.in.ci.p~dif.size,data=res.dat.temp,col=c(2,3,3,2),xlab='DIF size',
|
|
|
|
ylab='Proportion of true beta value in CI in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(1,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(4,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(2,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(3,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
|
|
|
|
# J=7 / 2 DIF
|
|
|
|
|
|
|
|
res.dat.temp <- res.dat[res.dat$J==7 & res.dat$nb.dif==2,]
|
|
|
|
|
|
|
|
boxplot(true.value.in.ci.p~dif.size,data=res.dat.temp,col=c(2,3,3,2),xlab='DIF size',
|
|
|
|
ylab='Proportion of true beta value in CI in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(1,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(4,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(2,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(3,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
|
|
|
|
# J=7 / 3 DIF
|
|
|
|
|
|
|
|
res.dat.temp <- res.dat[res.dat$J==7 & res.dat$nb.dif==3,]
|
|
|
|
|
|
|
|
boxplot(true.value.in.ci.p~dif.size,data=res.dat.temp,col=c(2,3,3,2),xlab='DIF size',
|
|
|
|
ylab='Proportion of true beta value in CI in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(1,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.5,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(4,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(2,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat.temp[res.dat.temp$dif.size==0.3,]
|
|
|
|
points(y=res.null3$true.value.in.ci.p,x=rep(3,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
########################## BETA SIGN CHANGE BOXPLOTS #########################
|
|
|
|
#----------------------------------------------------------------------------#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
# Overall
|
|
|
|
|
|
|
|
boxplot(beta.same.sign.truebeta.p~dif.size,data=res.dat,col=c(2,3),xlab='DIF size',
|
|
|
|
ylab='Proportion of estimates with same sign as true value in target scenario',main='DIF on 3 items',ylim=c(0,1))
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==-0.5,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.p,x=rep(1,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==0.5,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.p,x=rep(5,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.p,x=rep(2,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==0.3,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.p,x=rep(4,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==0,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.p,x=rep(3,nrow(res.null3)),col='gray',pch=3)
|
|
|
|
|
|
|
|
# Overall // H0 rejected
|
|
|
|
|
|
|
|
boxplot(beta.same.sign.truebeta.signif.p~dif.size,data=res.dat,col=c(2,3),xlab='DIF size',
|
|
|
|
ylab='Proportion of estimates with same sign as true value in target scenario',main='When H0 rejected',ylim=c(0,1))
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==-0.5,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.signif.p,x=rep(1,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==0.5,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.signif.p,x=rep(5,nrow(res.null3)),col='#590b0c',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==-0.3,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.signif.p,x=rep(2,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==0.3,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.signif.p,x=rep(4,nrow(res.null3)),col='#053305',pch=3)
|
|
|
|
res.null3 <- res.dat[res.dat$dif.size==0,]
|
|
|
|
points(y=res.null3$beta.same.sign.truebeta.signif.p,x=rep(3,nrow(res.null3)),col='gray',pch=3)
|