From 832f836e5573a362cf135c203b846ce5363aa7b4 Mon Sep 17 00:00:00 2001 From: corentinchoisy Date: Mon, 15 Jan 2024 13:48:29 +0100 Subject: [PATCH] Updated J=4 scenarios with DIF --- .../DIF/scenarios_DIF_J4_baseline_100.do | 1671 ++++++++++++++--- .../DIF/scenarios_DIF_J4_baseline_200.do | 1671 ++++++++++++++--- .../DIF/scenarios_DIF_J4_baseline_300.do | 1671 ++++++++++++++--- 3 files changed, 4092 insertions(+), 921 deletions(-) diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do index fcddb3c..48665b8 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do @@ -144,7 +144,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_5B_100.csv", replace -* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 5C - N=100" @@ -154,9 +154,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.3 \ 0 \ 0 \ 0) + mat E= (0.3 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.3 \ 0 \ 0) @@ -167,14 +174,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -257,7 +257,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_5D_100.csv", replace -* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 5E - N=100" @@ -267,9 +267,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.3 \ 0 \ 0 \ 0) + mat E= (0.3 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.3 \ 0 \ 0) @@ -280,14 +287,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -313,9 +313,120 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_5E_100.csv", replace - - - +* Scenario 5F : H_1 is TRUE / Effect size -0.2 / DIF negative + + di "Scenario 5F - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_5F_100.csv", replace + + + + +* Scenario 5G : H_1 is TRUE / Effect size -0.4 / DIF negative + + di "Scenario 5G - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_5G_100.csv", replace @@ -437,7 +548,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_6B_100.csv", replace -* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 6C - N=100" @@ -447,6 +558,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -460,14 +578,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -549,7 +660,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_6D_100.csv", replace -* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 6E - N=100" @@ -559,6 +670,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -572,14 +690,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -606,6 +717,119 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_6E_100.csv", replace +* Scenario 6F : H_1 is TRUE / Effect size -0.2 / DIF negative + +di "Scenario 6E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_6F_100.csv", replace + + +* Scenario 6G : H_1 is TRUE / Effect size -0.4 / DIF negative + +di "Scenario 6G - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_6G_100.csv", replace + **** ---------------------------------------------------------------------------------------------------------------------------------- **** @@ -730,7 +954,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_7B_100.csv", replace -* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 7C - N=100" @@ -740,9 +964,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.5 \ 0 \ 0 \ 0) + mat E= (0.5 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.5 \ 0 \ 0) @@ -753,14 +984,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -843,7 +1067,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_7D_100.csv", replace -* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 7E - N=100" @@ -853,9 +1077,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.5 \ 0 \ 0 \ 0) + mat E= (0.5 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.5 \ 0 \ 0) @@ -866,14 +1097,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -899,6 +1123,117 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_7E_100.csv", replace +* Scenario 7F : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 7F - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_7F_100.csv", replace + +* Scenario 7G : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 7G - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_7G_100.csv", replace @@ -1024,7 +1359,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_8B_100.csv", replace -* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 8C - N=100" @@ -1034,6 +1369,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -1047,14 +1389,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1136,7 +1471,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_8D_100.csv", replace -* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 8E - N=100" @@ -1146,6 +1481,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -1159,14 +1501,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1193,8 +1528,118 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_8E_100.csv", replace - - +* Scenario 8F : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 8F - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_8F_100.csv", replace + + +* Scenario 8G : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 8G - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_8G_100.csv", replace @@ -1364,7 +1809,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_9B_100.csv", replace -* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 9C - N=100" @@ -1381,39 +1826,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1517,7 +1962,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_9D_100.csv", replace -* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 9E - N=100" @@ -1534,39 +1979,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1595,6 +2040,158 @@ forvalues replication = 1/1000 { +* Scenario 9F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 9F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_9F_100.csv", replace + + +* Scenario 9G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + +di "Scenario 9G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_9G_100.csv", replace @@ -1753,7 +2350,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_10B_100.csv", replace -* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 10C - N=100" @@ -1770,39 +2367,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - if `difj'==1 { - mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1906,7 +2503,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_10D_100.csv", replace -* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 10E - N=100" @@ -1923,39 +2520,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - if `difj'==1 { - mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1982,6 +2579,161 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_10E_100.csv", replace +* Scenario 10F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 10F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_10F_100.csv", replace + + +* Scenario 10G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 10G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_10G_100.csv", replace + + + **** Scenarios with : DIF size 0.5 **** ** Scenario 11: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 @@ -2139,7 +2891,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_11B_100.csv", replace -* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 11C - N=100" @@ -2156,39 +2908,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.5 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.5 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.5 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.5) - } - if `difj'==1 { - mat F=(0.5 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.5 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.5 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.5) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2292,7 +3044,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_11D_100.csv", replace -* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 11E - N=100" @@ -2309,39 +3061,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.5 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.5 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.5 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.5) - } - if `difj'==1 { - mat F=(0.5 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.5 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.5 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.5) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2368,8 +3120,158 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_11E_100.csv", replace - - +* Scenario 11F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 11F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_11F_100.csv", replace + + +* Scenario 11G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 11G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_11G_100.csv", replace @@ -2528,7 +3430,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_12B_100.csv", replace -* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 12C - N=100" @@ -2545,39 +3447,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - if `difj'==1 { - mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2681,7 +3583,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_12D_100.csv", replace -* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 12E - N=100" @@ -2698,39 +3600,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - if `difj'==1 { - mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2756,3 +3658,158 @@ forvalues replication = 1/1000 { } } export delimited using "`path'/scenario_12E_100.csv", replace + + + +* Scenario 12F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + +di "Scenario 12F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_12F_100.csv", replace + + +* Scenario 12G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + +di "Scenario 12G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_12G_100.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do index d94cf6f..5c9d4a1 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do @@ -144,7 +144,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_5B_200.csv", replace -* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 5C - N=200" @@ -154,9 +154,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.3 \ 0 \ 0 \ 0) + mat E= (0.3 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.3 \ 0 \ 0) @@ -167,14 +174,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -257,7 +257,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_5D_200.csv", replace -* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 5E - N=200" @@ -267,9 +267,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.3 \ 0 \ 0 \ 0) + mat E= (0.3 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.3 \ 0 \ 0) @@ -280,14 +287,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -313,9 +313,120 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_5E_200.csv", replace - - - +* Scenario 5F : H_1 is TRUE / Effect size -0.2 / DIF negative + + di "Scenario 5F - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_5F_200.csv", replace + + + + +* Scenario 5G : H_1 is TRUE / Effect size -0.4 / DIF negative + + di "Scenario 5G - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_5G_200.csv", replace @@ -437,7 +548,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_6B_200.csv", replace -* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 6C - N=200" @@ -447,6 +558,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -460,14 +578,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -549,7 +660,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_6D_200.csv", replace -* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 6E - N=200" @@ -559,6 +670,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -572,14 +690,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -606,6 +717,119 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_6E_200.csv", replace +* Scenario 6F : H_1 is TRUE / Effect size -0.2 / DIF negative + +di "Scenario 6E - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_6F_200.csv", replace + + +* Scenario 6G : H_1 is TRUE / Effect size -0.4 / DIF negative + +di "Scenario 6G - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_6G_200.csv", replace + **** ---------------------------------------------------------------------------------------------------------------------------------- **** @@ -730,7 +954,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_7B_200.csv", replace -* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 7C - N=200" @@ -740,9 +964,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.5 \ 0 \ 0 \ 0) + mat E= (0.5 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.5 \ 0 \ 0) @@ -753,14 +984,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -843,7 +1067,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_7D_200.csv", replace -* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 7E - N=200" @@ -853,9 +1077,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.5 \ 0 \ 0 \ 0) + mat E= (0.5 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.5 \ 0 \ 0) @@ -866,14 +1097,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -899,6 +1123,117 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_7E_200.csv", replace +* Scenario 7F : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 7F - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_7F_200.csv", replace + +* Scenario 7G : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 7G - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_7G_200.csv", replace @@ -1024,7 +1359,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_8B_200.csv", replace -* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 8C - N=200" @@ -1034,6 +1369,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -1047,14 +1389,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1136,7 +1471,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_8D_200.csv", replace -* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 8E - N=200" @@ -1146,6 +1481,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -1159,14 +1501,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1193,8 +1528,118 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_8E_200.csv", replace - - +* Scenario 8F : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 8F - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_8F_200.csv", replace + + +* Scenario 8G : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 8G - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_8G_200.csv", replace @@ -1364,7 +1809,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_9B_200.csv", replace -* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 9C - N=200" @@ -1381,39 +1826,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1517,7 +1962,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_9D_200.csv", replace -* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 9E - N=200" @@ -1534,39 +1979,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1595,6 +2040,158 @@ forvalues replication = 1/1000 { +* Scenario 9F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 9F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_9F_200.csv", replace + + +* Scenario 9G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + +di "Scenario 9G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_9G_200.csv", replace @@ -1753,7 +2350,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_10B_200.csv", replace -* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 10C - N=200" @@ -1770,39 +2367,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - if `difj'==1 { - mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1906,7 +2503,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_10D_200.csv", replace -* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 10E - N=200" @@ -1923,39 +2520,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - if `difj'==1 { - mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1982,6 +2579,161 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_10E_200.csv", replace +* Scenario 10F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 10F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_10F_200.csv", replace + + +* Scenario 10G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 10G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_10G_200.csv", replace + + + **** Scenarios with : DIF size 0.5 **** ** Scenario 11: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 @@ -2139,7 +2891,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_11B_200.csv", replace -* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 11C - N=200" @@ -2156,39 +2908,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.5 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.5 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.5 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.5) - } - if `difj'==1 { - mat F=(0.5 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.5 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.5 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.5) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2292,7 +3044,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_11D_200.csv", replace -* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 11E - N=200" @@ -2309,39 +3061,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.5 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.5 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.5 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.5) - } - if `difj'==1 { - mat F=(0.5 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.5 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.5 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.5) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2368,8 +3120,158 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_11E_200.csv", replace - - +* Scenario 11F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 11F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_11F_200.csv", replace + + +* Scenario 11G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 11G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_11G_200.csv", replace @@ -2528,7 +3430,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_12B_200.csv", replace -* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 12C - N=200" @@ -2545,39 +3447,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - if `difj'==1 { - mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2681,7 +3583,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_12D_200.csv", replace -* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 12E - N=200" @@ -2698,39 +3600,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - if `difj'==1 { - mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2756,3 +3658,158 @@ forvalues replication = 1/1000 { } } export delimited using "`path'/scenario_12E_200.csv", replace + + + +* Scenario 12F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + +di "Scenario 12F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_12F_200.csv", replace + + +* Scenario 12G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + +di "Scenario 12G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_12G_200.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do index 68caa25..5918ed3 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do @@ -144,7 +144,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_5B_300.csv", replace -* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 5C - N=300" @@ -154,9 +154,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.3 \ 0 \ 0 \ 0) + mat E= (0.3 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.3 \ 0 \ 0) @@ -167,14 +174,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -257,7 +257,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_5D_300.csv", replace -* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 5E - N=300" @@ -267,9 +267,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.3 \ 0 \ 0 \ 0) + mat E= (0.3 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.3 \ 0 \ 0) @@ -280,14 +287,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -313,9 +313,120 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_5E_300.csv", replace - - - +* Scenario 5F : H_1 is TRUE / Effect size -0.2 / DIF negative + + di "Scenario 5F - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_5F_300.csv", replace + + + + +* Scenario 5G : H_1 is TRUE / Effect size -0.4 / DIF negative + + di "Scenario 5G - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_5G_300.csv", replace @@ -437,7 +548,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_6B_300.csv", replace -* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 6C - N=300" @@ -447,6 +558,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -460,14 +578,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -549,7 +660,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_6D_300.csv", replace -* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 6E - N=300" @@ -559,6 +670,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -572,14 +690,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -606,6 +717,119 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_6E_300.csv", replace +* Scenario 6F : H_1 is TRUE / Effect size -0.2 / DIF negative + +di "Scenario 6E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_6F_300.csv", replace + + +* Scenario 6G : H_1 is TRUE / Effect size -0.4 / DIF negative + +di "Scenario 6G - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_6G_300.csv", replace + **** ---------------------------------------------------------------------------------------------------------------------------------- **** @@ -730,7 +954,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_7B_300.csv", replace -* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 7C - N=300" @@ -740,9 +964,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.5 \ 0 \ 0 \ 0) + mat E= (0.5 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.5 \ 0 \ 0) @@ -753,14 +984,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -843,7 +1067,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_7D_300.csv", replace -* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 7E - N=300" @@ -853,9 +1077,16 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) if `difi'==1 { - mat E= (0.5 \ 0 \ 0 \ 0) + mat E= (0.5 \ 0 \ 0 \ 0) } if `difi'==2 { mat E= (0 \ 0.5 \ 0 \ 0) @@ -866,14 +1097,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0 \ 0 \ 0 \ 0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -899,6 +1123,117 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_7E_300.csv", replace +* Scenario 7F : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 7F - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_7F_300.csv", replace + +* Scenario 7G : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 7G - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_7G_300.csv", replace @@ -1024,7 +1359,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_8B_300.csv", replace -* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF on control +* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF negative di "Scenario 8C - N=300" @@ -1034,6 +1369,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -1047,14 +1389,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1136,7 +1471,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_8D_300.csv", replace -* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF on control +* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF negative di "Scenario 8E - N=300" @@ -1146,6 +1481,13 @@ forvalues replication = 1/1000 { } qui local difi = runiformint(1,4) + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) if `difi'==1 { mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -1159,14 +1501,7 @@ forvalues replication = 1/1000 { if `difi'==4 { mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) } - mat D=B+E - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat D=B-E qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1193,8 +1528,118 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_8E_300.csv", replace - - +* Scenario 8F : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 8F - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_8F_300.csv", replace + + +* Scenario 8G : H_1 is TRUE / Effect size 0.4 / DIF negative + +di "Scenario 8G - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_8G_300.csv", replace @@ -1364,7 +1809,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_9B_300.csv", replace -* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 9C - N=300" @@ -1381,39 +1826,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1517,7 +1962,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_9D_300.csv", replace -* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 9E - N=300" @@ -1534,39 +1979,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1595,6 +2040,158 @@ forvalues replication = 1/1000 { +* Scenario 9F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 9F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_9F_300.csv", replace + + +* Scenario 9G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + +di "Scenario 9G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_9G_300.csv", replace @@ -1753,7 +2350,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_10B_300.csv", replace -* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 10C - N=300" @@ -1770,39 +2367,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - if `difj'==1 { - mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1906,7 +2503,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_10D_300.csv", replace -* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 10E - N=300" @@ -1923,39 +2520,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - if `difj'==1 { - mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1982,6 +2579,161 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_10E_300.csv", replace +* Scenario 10F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 10F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_10F_300.csv", replace + + +* Scenario 10G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 10G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_10G_300.csv", replace + + + **** Scenarios with : DIF size 0.5 **** ** Scenario 11: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 @@ -2139,7 +2891,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_11B_300.csv", replace -* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 11C - N=300" @@ -2156,39 +2908,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.5 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.5 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.5 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.5) - } - if `difj'==1 { - mat F=(0.5 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.5 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.5 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.5) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2292,7 +3044,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_11D_300.csv", replace -* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 11E - N=300" @@ -2309,39 +3061,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) - if `difi'==1 { - mat E=(0.5 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.5 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.5 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.5) - } - if `difj'==1 { - mat F=(0.5 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.5 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.5 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.5) - } - mat D=B+E+F + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2368,8 +3120,158 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_11E_300.csv", replace - - +* Scenario 11F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 11F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_11F_300.csv", replace + + +* Scenario 11G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + + di "Scenario 11G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_11G_300.csv", replace @@ -2528,7 +3430,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_12B_300.csv", replace -* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 12C - N=300" @@ -2545,39 +3447,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - if `difj'==1 { - mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2681,7 +3583,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_12D_300.csv", replace -* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 12E - N=300" @@ -2698,39 +3600,39 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - if `difj'==1 { - mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==2 { - mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2756,3 +3658,158 @@ forvalues replication = 1/1000 { } } export delimited using "`path'/scenario_12E_300.csv", replace + + + +* Scenario 12F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + +di "Scenario 12F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_12F_300.csv", replace + + +* Scenario 12G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 + +di "Scenario 12G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen dif1 = `difi' + qui gen dif2 = `difj' + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_12G_300.csv", replace