From c2b7c57293249cf1b6a4aa5a63d61f1f0297c711 Mon Sep 17 00:00:00 2001 From: corentinchoisy Date: Mon, 15 Jan 2024 14:36:46 +0100 Subject: [PATCH] Updated all scenarios --- .../DIF/scenarios_DIF_J4_baseline_100.do | 24 +- .../DIF/scenarios_DIF_J4_baseline_200.do | 24 +- .../DIF/scenarios_DIF_J4_baseline_300.do | 24 +- .../DIF/scenarios_DIF_J7_baseline_100.do | 2920 +++++++++++++---- .../DIF/scenarios_DIF_J7_baseline_200.do | 2920 +++++++++++++---- .../DIF/scenarios_DIF_J7_baseline_300.do | 2920 +++++++++++++---- .../NoDIF/scenarios_noDIF_baseline_100.do | 313 ++ .../NoDIF/scenarios_noDIF_baseline_200.do | 1015 ++++-- .../NoDIF/scenarios_noDIF_baseline_300.do | 1134 ++++--- 9 files changed, 8672 insertions(+), 2622 deletions(-) diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do index 48665b8..ec9127e 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do @@ -1123,7 +1123,7 @@ 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 +* Scenario 7F : H_1 is TRUE / Effect size -0.2 / DIF negative di "Scenario 7F - N=100" @@ -1179,7 +1179,7 @@ di "Scenario 7F - N=100" } export delimited using "`path'/scenario_7F_100.csv", replace -* Scenario 7G : H_1 is TRUE / Effect size 0.4 / DIF negative +* Scenario 7G : H_1 is TRUE / Effect size -0.4 / DIF negative di "Scenario 7G - N=100" @@ -1528,7 +1528,7 @@ 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 +* Scenario 8F : H_1 is TRUE / Effect size -0.2 / DIF negative di "Scenario 8F - N=100" @@ -1585,7 +1585,7 @@ di "Scenario 8F - N=100" export delimited using "`path'/scenario_8F_100.csv", replace -* Scenario 8G : H_1 is TRUE / Effect size 0.4 / DIF negative +* Scenario 8G : H_1 is TRUE / Effect size -0.4 / DIF negative di "Scenario 8G - N=100" @@ -2040,7 +2040,7 @@ forvalues replication = 1/1000 { -* Scenario 9F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 9F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 9F - N=100" @@ -2117,7 +2117,7 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_9F_100.csv", replace -* Scenario 9G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 9G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 9G - N=100" @@ -2579,7 +2579,7 @@ 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 +* Scenario 10F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 10F - N=100" @@ -2656,7 +2656,7 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_10F_100.csv", replace -* Scenario 10G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 10G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 10G - N=100" @@ -3120,7 +3120,7 @@ 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 +* Scenario 11F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 11F - N=100" @@ -3197,7 +3197,7 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_11F_100.csv", replace -* Scenario 11G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 11G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 11G - N=100" @@ -3661,7 +3661,7 @@ forvalues replication = 1/1000 { -* Scenario 12F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 12F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 12F - N=100" @@ -3738,7 +3738,7 @@ di "Scenario 12F - N=100" export delimited using "`path'/scenario_12F_100.csv", replace -* Scenario 12G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 12G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 12G - N=100" diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do index 5c9d4a1..78bc3dc 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do @@ -1123,7 +1123,7 @@ 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 +* Scenario 7F : H_1 is TRUE / Effect size -0.2 / DIF negative di "Scenario 7F - N=200" @@ -1179,7 +1179,7 @@ di "Scenario 7F - N=200" } export delimited using "`path'/scenario_7F_200.csv", replace -* Scenario 7G : H_1 is TRUE / Effect size 0.4 / DIF negative +* Scenario 7G : H_1 is TRUE / Effect size -0.4 / DIF negative di "Scenario 7G - N=200" @@ -1528,7 +1528,7 @@ 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 +* Scenario 8F : H_1 is TRUE / Effect size -0.2 / DIF negative di "Scenario 8F - N=200" @@ -1585,7 +1585,7 @@ di "Scenario 8F - N=200" export delimited using "`path'/scenario_8F_200.csv", replace -* Scenario 8G : H_1 is TRUE / Effect size 0.4 / DIF negative +* Scenario 8G : H_1 is TRUE / Effect size -0.4 / DIF negative di "Scenario 8G - N=200" @@ -2040,7 +2040,7 @@ forvalues replication = 1/1000 { -* Scenario 9F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 9F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 9F - N=200" @@ -2117,7 +2117,7 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_9F_200.csv", replace -* Scenario 9G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 9G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 9G - N=200" @@ -2579,7 +2579,7 @@ 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 +* Scenario 10F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 10F - N=200" @@ -2656,7 +2656,7 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_10F_200.csv", replace -* Scenario 10G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 10G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 10G - N=200" @@ -3120,7 +3120,7 @@ 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 +* Scenario 11F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 11F - N=200" @@ -3197,7 +3197,7 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_11F_200.csv", replace -* Scenario 11G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 11G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 11G - N=200" @@ -3661,7 +3661,7 @@ forvalues replication = 1/1000 { -* Scenario 12F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 12F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 12F - N=200" @@ -3738,7 +3738,7 @@ di "Scenario 12F - N=200" export delimited using "`path'/scenario_12F_200.csv", replace -* Scenario 12G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 12G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 12G - N=200" diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do index 5918ed3..ee998b1 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do @@ -1123,7 +1123,7 @@ 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 +* Scenario 7F : H_1 is TRUE / Effect size -0.2 / DIF negative di "Scenario 7F - N=300" @@ -1179,7 +1179,7 @@ di "Scenario 7F - N=300" } export delimited using "`path'/scenario_7F_300.csv", replace -* Scenario 7G : H_1 is TRUE / Effect size 0.4 / DIF negative +* Scenario 7G : H_1 is TRUE / Effect size -0.4 / DIF negative di "Scenario 7G - N=300" @@ -1528,7 +1528,7 @@ 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 +* Scenario 8F : H_1 is TRUE / Effect size -0.2 / DIF negative di "Scenario 8F - N=300" @@ -1585,7 +1585,7 @@ di "Scenario 8F - N=300" export delimited using "`path'/scenario_8F_300.csv", replace -* Scenario 8G : H_1 is TRUE / Effect size 0.4 / DIF negative +* Scenario 8G : H_1 is TRUE / Effect size -0.4 / DIF negative di "Scenario 8G - N=300" @@ -2040,7 +2040,7 @@ forvalues replication = 1/1000 { -* Scenario 9F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 9F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 9F - N=300" @@ -2117,7 +2117,7 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_9F_300.csv", replace -* Scenario 9G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 9G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 9G - N=300" @@ -2579,7 +2579,7 @@ 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 +* Scenario 10F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 10F - N=300" @@ -2656,7 +2656,7 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_10F_300.csv", replace -* Scenario 10G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 10G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 10G - N=300" @@ -3120,7 +3120,7 @@ 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 +* Scenario 11F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 11F - N=300" @@ -3197,7 +3197,7 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_11F_300.csv", replace -* Scenario 11G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 11G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 11G - N=300" @@ -3661,7 +3661,7 @@ forvalues replication = 1/1000 { -* Scenario 12F : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 12F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 di "Scenario 12F - N=300" @@ -3738,7 +3738,7 @@ di "Scenario 12F - N=300" export delimited using "`path'/scenario_12F_300.csv", replace -* Scenario 12G : H_1 is TRUE / Effect size 0.4 / DIF negative x2 +* Scenario 12G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 di "Scenario 12G - N=300" diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_100.do b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_100.do index d8c8c94..601dee4 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_100.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_100.do @@ -226,7 +226,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_13B_100.csv", replace -* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 13C - N=100" @@ -244,57 +244,57 @@ forvalues replication = 1/1000 { qui local difj : word 2 of `ItemsDIF' - mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difi'==5 { - mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difi'==6 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difi'==7 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difj'==5 { - mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difj'==6 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difj'==7 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -416,7 +416,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_13D_100.csv", replace -* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 13E - N=100" @@ -433,57 +433,57 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difi'==5 { - mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difi'==6 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difi'==7 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difj'==5 { - mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difj'==6 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difj'==7 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -512,6 +512,198 @@ forvalues replication = 1/1000 { +* Scenario 13F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + +di "Scenario 13F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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_13F_100.csv", replace + + + +* Scenario 13G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + +di "Scenario 13G- N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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_13G_100.csv", replace + + + ** Scenario 14: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 @@ -704,7 +896,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_14B_100.csv", replace -* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 14C - N=100" @@ -721,57 +913,57 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 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0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==7 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -893,7 +1085,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_14D_100.csv", replace -* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 14E - N=100" @@ -910,58 +1102,58 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.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0.3 \ 0,0,0 \ 0,0,0) - } - if `difj'==6 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==7 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -987,6 +1179,196 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_14E_100.csv", replace +* Scenario 14F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + + di "Scenario 14F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_14F_100.csv", replace + + + +* Scenario 14G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + +di "Scenario 14G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_14G_100.csv", replace + **** Scenarios with : DIF size 0.5 **** @@ -1180,7 +1562,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_15B_100.csv", replace -* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 15C - N=100" @@ -1197,6 +1579,13 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -1240,14 +1629,7 @@ forvalues replication = 1/1000 { if `difj'==7 { mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1369,7 +1751,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_15D_100.csv", replace -* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 15E - N=100" @@ -1386,6 +1768,13 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -1429,14 +1818,7 @@ forvalues replication = 1/1000 { if `difj'==7 { mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1465,6 +1847,198 @@ forvalues replication = 1/1000 { +* Scenario 15F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + + di "Scenario 15F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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_15F_100.csv", replace + + + +* Scenario 15G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + +di "Scenario 15G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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_15G_100.csv", replace + + + ** Scenario 16: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 @@ -1657,7 +2231,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_16B_100.csv", replace -* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 16C - N=100" @@ -1667,65 +2241,65 @@ forvalues replication = 1/1000 { di "replication = `replication'" } qui set obs 7 - 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 B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==5 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==6 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==7 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==5 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==6 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==7 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 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(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -1846,7 +2420,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_16D_100.csv", replace -* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 16E - N=100" @@ -1863,58 +2437,58 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==5 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==6 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==7 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==5 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==6 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==7 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 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'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -1940,7 +2514,195 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_16E_100.csv", replace - +* Scenario 16F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + +di "Scenario 16F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_16F_100.csv", replace + + + +* Scenario 16G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + + di "Scenario 16G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_16G_100.csv", replace @@ -2198,7 +2960,7 @@ di "Scenario 17B - N=100" -* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 17C - N=100" @@ -2217,6 +2979,11 @@ di "Scenario 17B - N=100" qui local difk : word 3 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { @@ -2282,13 +3049,7 @@ di "Scenario 17B - N=100" if `difk'==7 { mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F-G qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2439,133 +3200,369 @@ di "Scenario 17B - N=100" qui save `data',replace } } - export delimited using "`path'/scenario_17D_100.csv", replace - - - - - - - - - - - -* Scenario 17E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 - - di "Scenario 17E - N=100" - - forvalues replication = 1/1000 { - clear - if mod(`replication',100)==0 { - di "replication = `replication'" - } - qui set obs 7 - qui gen xxx = _n - qui sample 3 ,count - qui valuesof xxx - qui local ItemsDIF = r(values) - qui local difi : word 1 of `ItemsDIF' - qui local difj : word 2 of `ItemsDIF' - qui local difk : word 3 of `ItemsDIF' - - mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difi'==5 { - mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difi'==6 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difi'==7 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difj'==5 { - mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difj'==6 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difj'==7 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difk'==1 { - mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difk'==2 { - mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difk'==3 { - mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difk'==4 { - mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difk'==5 { - mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difk'==6 { - mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difk'==7 { - mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) 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 dif3 = `difk' - 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_17E_100.csv", replace + export delimited using "`path'/scenario_17D_100.csv", replace + + + + + + + + + + + + * Scenario 17E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 + + di "Scenario 17E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difk'==1 { + mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_17E_100.csv", replace + + + +* Scenario 17F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 17F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difk'==1 { + mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_17F_100.csv", replace + + + +* Scenario 17G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 17G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difk'==1 { + mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_17G_100.csv", replace @@ -2823,7 +3820,7 @@ di "Scenario 18B - N=100" -* Scenario 18C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 18C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 18C - N=100" @@ -2843,78 +3840,78 @@ di "Scenario 18B - N=100" - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0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0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difk'==3 { - mat G=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difk'==4 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difk'==5 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difk'==6 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difk'==7 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F+G + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.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0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difk'==1 { + mat G=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==2 { + mat G=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -3076,7 +4073,7 @@ di "Scenario 18B - N=100" -* Scenario 18E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 +* Scenario 18E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 di "Scenario 18E - N=100" @@ -3094,6 +4091,12 @@ di "Scenario 18B - N=100" qui local difj : word 2 of `ItemsDIF' qui local difk : word 3 of `ItemsDIF' + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) if `difi'==1 { mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -3158,14 +4161,8 @@ di "Scenario 18B - N=100" if `difk'==7 { mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -3196,6 +4193,244 @@ di "Scenario 18B - N=100" +* Scenario 18F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 18F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difk'==1 { + mat G=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==2 { + mat G=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_18F_100.csv", replace + + + + +* Scenario 18G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 18G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=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\ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_18G_100.csv", replace + + + + @@ -3448,7 +4683,7 @@ di "Scenario 19B - N=100" -* Scenario 19C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 19C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 19C - N=100" @@ -3468,6 +4703,12 @@ di "Scenario 19B - N=100" + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -3532,13 +4773,7 @@ di "Scenario 19B - N=100" if `difk'==7 { mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F-G qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -3689,7 +4924,7 @@ di "Scenario 19B - N=100" -* Scenario 19E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 +* Scenario 19E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 di "Scenario 19E - N=100" @@ -3707,6 +4942,12 @@ di "Scenario 19B - N=100" qui local difj : word 2 of `ItemsDIF' qui local difk : word 3 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -3771,13 +5012,7 @@ di "Scenario 19B - N=100" if `difk'==7 { mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F-G qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -3806,6 +5041,238 @@ di "Scenario 19B - N=100" export delimited using "`path'/scenario_19E_100.csv", replace +* Scenario 19F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 19F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difk'==1 { + mat G=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_19F_100.csv", replace + +* Scenario 19G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 19G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difk'==1 { + mat G=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_19G_100.csv", replace + @@ -4051,7 +5518,7 @@ di "Scenario 20B - N=100" export delimited using "`path'/scenario_20B_100.csv", replace -* Scenario 20C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 20C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 20C - N=100" @@ -4071,78 +5538,78 @@ di "Scenario 20B - N=100" - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,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0,0,0 \ 0,0,0) - } - if `difk'==3 { - mat G=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difk'==4 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difk'==5 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difk'==6 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difk'==7 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F+G + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0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,0.5) + } + if `difk'==1 { + mat G=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==2 { + mat G=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4292,7 +5759,7 @@ di "Scenario 20B - N=100" -* Scenario 20E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 +* Scenario 20E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 di "Scenario 20E - N=100" @@ -4310,6 +5777,12 @@ di "Scenario 20B - N=100" qui local difj : word 2 of `ItemsDIF' qui local difk : word 3 of `ItemsDIF' + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) if `difi'==1 { mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -4374,14 +5847,8 @@ di "Scenario 20B - N=100" if `difk'==7 { mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4407,3 +5874,236 @@ di "Scenario 20B - N=100" } } export delimited using "`path'/scenario_20E_100.csv", replace + + +* Scenario 20F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 20F - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difk'==1 { + mat G=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==2 { + mat G=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_20F_100.csv", replace + +* Scenario 20G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 20G - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \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5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_20G_100.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_200.do b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_200.do index c38cacc..54ca56d 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_200.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_200.do @@ -226,7 +226,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_13B_200.csv", replace -* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 13C - N=200" @@ -244,57 +244,57 @@ forvalues replication = 1/1000 { qui local difj : word 2 of `ItemsDIF' - mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difi'==5 { - mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difi'==6 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difi'==7 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difj'==5 { - mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difj'==6 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difj'==7 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -416,7 +416,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_13D_200.csv", replace -* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 13E - N=200" @@ -433,57 +433,57 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difi'==5 { - mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difi'==6 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difi'==7 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difj'==5 { - mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difj'==6 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difj'==7 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -512,6 +512,198 @@ forvalues replication = 1/1000 { +* Scenario 13F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + +di "Scenario 13F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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_13F_200.csv", replace + + + +* Scenario 13G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + +di "Scenario 13G- N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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_13G_200.csv", replace + + + ** Scenario 14: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 @@ -704,7 +896,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_14B_200.csv", replace -* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 14C - N=200" @@ -721,57 +913,57 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \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') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -893,7 +1085,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_14D_200.csv", replace -* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 14E - N=200" @@ -910,58 +1102,58 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==3 { - mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3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68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -987,6 +1179,196 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_14E_200.csv", replace +* Scenario 14F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + + di "Scenario 14F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_14F_200.csv", replace + + + +* Scenario 14G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + +di "Scenario 14G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { +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0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_14G_200.csv", replace + **** Scenarios with : DIF size 0.5 **** @@ -1180,7 +1562,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_15B_200.csv", replace -* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 15C - N=200" @@ -1197,6 +1579,13 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -1240,14 +1629,7 @@ forvalues replication = 1/1000 { if `difj'==7 { mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1369,7 +1751,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_15D_200.csv", replace -* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 15E - N=200" @@ -1386,6 +1768,13 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -1429,14 +1818,7 @@ forvalues replication = 1/1000 { if `difj'==7 { mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1465,6 +1847,198 @@ forvalues replication = 1/1000 { +* Scenario 15F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + + di "Scenario 15F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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_15F_200.csv", replace + + + +* Scenario 15G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + +di "Scenario 15G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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_15G_200.csv", replace + + + ** Scenario 16: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 @@ -1657,7 +2231,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_16B_200.csv", replace -* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 16C - N=200" @@ -1667,65 +2241,65 @@ forvalues replication = 1/1000 { di "replication = `replication'" } qui set obs 7 - 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 B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==2 { - mat E=(0,0,0 \ 0.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0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -1846,7 +2420,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_16D_200.csv", replace -* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 16E - N=200" @@ -1863,58 +2437,58 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' -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0,0) - } - if `difj'==5 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==6 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==7 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -1940,7 +2514,195 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_16E_200.csv", replace - +* Scenario 16F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + +di "Scenario 16F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_16F_200.csv", replace + + + +* Scenario 16G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + + di "Scenario 16G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_16G_200.csv", replace @@ -2198,7 +2960,7 @@ di "Scenario 17B - N=200" -* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 17C - N=200" @@ -2217,6 +2979,11 @@ di "Scenario 17B - N=200" qui local difk : word 3 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { @@ -2282,13 +3049,7 @@ di "Scenario 17B - N=200" if `difk'==7 { mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F-G qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2439,133 +3200,369 @@ di "Scenario 17B - N=200" qui save `data',replace } } - export delimited using "`path'/scenario_17D_200.csv", replace - - - - - - - - - - - -* Scenario 17E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 - - di "Scenario 17E - N=200" - - forvalues replication = 1/1000 { - clear - if mod(`replication',100)==0 { - di "replication = `replication'" - } - qui set obs 7 - qui gen xxx = _n - qui sample 3 ,count - qui valuesof xxx - qui local ItemsDIF = r(values) - qui local difi : word 1 of `ItemsDIF' - qui local difj : word 2 of `ItemsDIF' - qui local difk : word 3 of `ItemsDIF' - - mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difi'==5 { - mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difi'==6 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difi'==7 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difj'==5 { - mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difj'==6 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difj'==7 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difk'==1 { - mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difk'==2 { - mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difk'==3 { - mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difk'==4 { - mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difk'==5 { - mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difk'==6 { - mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difk'==7 { - mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) 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 dif3 = `difk' - 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_17E_200.csv", replace + export delimited using "`path'/scenario_17D_200.csv", replace + + + + + + + + + + + + * Scenario 17E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 + + di "Scenario 17E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difk'==1 { + mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_17E_200.csv", replace + + + +* Scenario 17F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 17F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difk'==1 { + mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_17F_200.csv", replace + + + +* Scenario 17G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 17G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difk'==1 { + mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_17G_200.csv", replace @@ -2823,7 +3820,7 @@ di "Scenario 18B - N=200" -* Scenario 18C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 18C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 18C - N=200" @@ -2843,78 +3840,78 @@ di "Scenario 18B - N=200" - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==5 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==6 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==7 { - mat E=(0,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0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difk'==6 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difk'==7 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F+G + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0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3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -3076,7 +4073,7 @@ di "Scenario 18B - N=200" -* Scenario 18E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 +* Scenario 18E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 di "Scenario 18E - N=200" @@ -3094,6 +4091,12 @@ di "Scenario 18B - N=200" qui local difj : word 2 of `ItemsDIF' qui local difk : word 3 of `ItemsDIF' + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) if `difi'==1 { mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -3158,14 +4161,8 @@ di "Scenario 18B - N=200" if `difk'==7 { mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -3196,6 +4193,244 @@ di "Scenario 18B - N=200" +* Scenario 18F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 18F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0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,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difk'==1 { + mat G=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==2 { + mat G=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_18F_200.csv", replace + + + + +* Scenario 18G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 18G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(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 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_18G_200.csv", replace + + + + @@ -3448,7 +4683,7 @@ di "Scenario 19B - N=200" -* Scenario 19C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 19C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 19C - N=200" @@ -3468,6 +4703,12 @@ di "Scenario 19B - N=200" + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -3532,13 +4773,7 @@ di "Scenario 19B - N=200" if `difk'==7 { mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F-G qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -3689,7 +4924,7 @@ di "Scenario 19B - N=200" -* Scenario 19E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 +* Scenario 19E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 di "Scenario 19E - N=200" @@ -3707,6 +4942,12 @@ di "Scenario 19B - N=200" qui local difj : word 2 of `ItemsDIF' qui local difk : word 3 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -3771,13 +5012,7 @@ di "Scenario 19B - N=200" if `difk'==7 { mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F-G qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -3806,6 +5041,238 @@ di "Scenario 19B - N=200" export delimited using "`path'/scenario_19E_200.csv", replace +* Scenario 19F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 19F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difk'==1 { + mat G=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_19F_200.csv", replace + +* Scenario 19G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 19G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difk'==1 { + mat G=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_19G_200.csv", replace + @@ -4051,7 +5518,7 @@ di "Scenario 20B - N=200" export delimited using "`path'/scenario_20B_200.csv", replace -* Scenario 20C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 20C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 20C - N=200" @@ -4071,78 +5538,78 @@ di "Scenario 20B - N=200" - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==5 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==6 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==7 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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,0,0 \ 0,0,0) - } - if `difk'==6 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difk'==7 { - mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F+G + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.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0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4292,7 +5759,7 @@ di "Scenario 20B - N=200" -* Scenario 20E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 +* Scenario 20E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 di "Scenario 20E - N=200" @@ -4310,6 +5777,12 @@ di "Scenario 20B - N=200" qui local difj : word 2 of `ItemsDIF' qui local difk : word 3 of `ItemsDIF' + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) if `difi'==1 { mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -4374,14 +5847,8 @@ di "Scenario 20B - N=200" if `difk'==7 { mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4407,3 +5874,236 @@ di "Scenario 20B - N=200" } } export delimited using "`path'/scenario_20E_200.csv", replace + + +* Scenario 20F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 20F - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,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if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difk'==1 { + mat G=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==2 { + mat G=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_20F_200.csv", replace + +* Scenario 20G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 20G - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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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 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_20G_200.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_300.do b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_300.do index a17d90c..415bc47 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_300.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_300.do @@ -226,7 +226,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_13B_300.csv", replace -* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 13C - N=300" @@ -244,57 +244,57 @@ forvalues replication = 1/1000 { qui local difj : word 2 of `ItemsDIF' - mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difi'==5 { - mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difi'==6 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difi'==7 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difj'==5 { - mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difj'==6 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difj'==7 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -416,7 +416,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_13D_300.csv", replace -* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 13E - N=300" @@ -433,57 +433,57 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difi'==5 { - mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difi'==6 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difi'==7 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difj'==5 { - mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difj'==6 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difj'==7 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -512,6 +512,198 @@ forvalues replication = 1/1000 { +* Scenario 13F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + +di "Scenario 13F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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_13F_300.csv", replace + + + +* Scenario 13G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + +di "Scenario 13G- N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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_13G_300.csv", replace + + + ** Scenario 14: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 @@ -704,7 +896,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_14B_300.csv", replace -* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 14C - N=300" @@ -721,57 +913,57 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==5 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==6 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==7 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==5 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difj'==6 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==7 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 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j'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -893,7 +1085,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_14D_300.csv", replace -* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 14E - N=300" @@ -910,58 +1102,58 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==5 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==6 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==7 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==5 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difj'==6 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difj'==7 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) - } - mat D=B+E+F + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -987,6 +1179,196 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_14E_300.csv", replace +* Scenario 14F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + + di "Scenario 14F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \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,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(7) 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_14F_300.csv", replace + + + +* Scenario 14G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + +di "Scenario 14G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_14G_300.csv", replace + **** Scenarios with : DIF size 0.5 **** @@ -1180,7 +1562,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_15B_300.csv", replace -* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 15C - N=300" @@ -1197,6 +1579,13 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -1240,14 +1629,7 @@ forvalues replication = 1/1000 { if `difj'==7 { mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1369,7 +1751,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_15D_300.csv", replace -* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 15E - N=300" @@ -1386,6 +1768,13 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -1429,14 +1818,7 @@ forvalues replication = 1/1000 { if `difj'==7 { mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -1465,6 +1847,198 @@ forvalues replication = 1/1000 { +* Scenario 15F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + + di "Scenario 15F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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_15F_300.csv", replace + + + +* Scenario 15G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + +di "Scenario 15G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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_15G_300.csv", replace + + + ** Scenario 16: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 @@ -1657,7 +2231,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_16B_300.csv", replace -* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 +* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF negative x2 di "Scenario 16C - N=300" @@ -1667,65 +2241,65 @@ forvalues replication = 1/1000 { di "replication = `replication'" } qui set obs 7 - 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 B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==5 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==6 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==7 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==4 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==5 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difj'==6 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difj'==7 { - mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) - } - mat D=B+E+F + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -1846,7 +2420,7 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_16D_300.csv", replace -* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 +* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF negative x2 di "Scenario 16E - N=300" @@ -1863,58 +2437,58 @@ forvalues replication = 1/1000 { qui local difi : word 1 of `ItemsDIF' qui local difj : word 2 of `ItemsDIF' - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 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5) - } - mat D=B+E+F + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -1940,7 +2514,195 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_16E_300.csv", replace - +* Scenario 16F : H_1 is TRUE / Effect size -0.2 / DIF negative x2 + +di "Scenario 16F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_16F_300.csv", replace + + + +* Scenario 16G : H_1 is TRUE / Effect size -0.4 / DIF negative x2 + + di "Scenario 16G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + 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= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.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,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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(7) 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_16G_300.csv", replace @@ -2198,7 +2960,7 @@ di "Scenario 17B - N=300" -* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 17C - N=300" @@ -2217,6 +2979,11 @@ di "Scenario 17B - N=300" qui local difk : word 3 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { @@ -2282,13 +3049,7 @@ di "Scenario 17B - N=300" if `difk'==7 { mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F-G qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -2439,133 +3200,369 @@ di "Scenario 17B - N=300" qui save `data',replace } } - export delimited using "`path'/scenario_17D_300.csv", replace - - - - - - - - - - - -* Scenario 17E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 - - di "Scenario 17E - N=300" - - forvalues replication = 1/1000 { - clear - if mod(`replication',100)==0 { - di "replication = `replication'" - } - qui set obs 7 - qui gen xxx = _n - qui sample 3 ,count - qui valuesof xxx - qui local ItemsDIF = r(values) - qui local difi : word 1 of `ItemsDIF' - qui local difj : word 2 of `ItemsDIF' - qui local difk : word 3 of `ItemsDIF' - - mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - if `difi'==1 { - mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==2 { - mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==3 { - mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difi'==4 { - mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difi'==5 { - mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difi'==6 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difi'==7 { - mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difj'==1 { - mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==2 { - mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==3 { - mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difj'==4 { - mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difj'==5 { - mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difj'==6 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difj'==7 { - mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - if `difk'==1 { - mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difk'==2 { - mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) - } - if `difk'==3 { - mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) - } - if `difk'==4 { - mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) - } - if `difk'==5 { - mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) - } - if `difk'==6 { - mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) - } - if `difk'==7 { - mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) - } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) 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 dif3 = `difk' - 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_17E_300.csv", replace + export delimited using "`path'/scenario_17D_300.csv", replace + + + + + + + + + + + + * Scenario 17E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 + + di "Scenario 17E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difk'==1 { + mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_17E_300.csv", replace + + + +* Scenario 17F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 17F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difk'==1 { + mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_17F_300.csv", replace + + + +* Scenario 17G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 17G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + if `difk'==1 { + mat G=(0.3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.3 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.3 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.3 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.3 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.3 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_17G_300.csv", replace @@ -2823,7 +3820,7 @@ di "Scenario 18B - N=300" -* Scenario 18C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 18C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 18C - N=300" @@ -2843,78 +3840,78 @@ di "Scenario 18B - N=300" - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==5 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) - } - if `difi'==6 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) - } - if `difi'==7 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difj'==3 { - mat F=(0,0,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1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \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,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -3076,7 +4073,7 @@ di "Scenario 18B - N=300" -* Scenario 18E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 +* Scenario 18E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 di "Scenario 18E - N=300" @@ -3094,6 +4091,12 @@ di "Scenario 18B - N=300" qui local difj : word 2 of `ItemsDIF' qui local difk : word 3 of `ItemsDIF' + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) if `difi'==1 { mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -3158,14 +4161,8 @@ di "Scenario 18B - N=300" if `difk'==7 { mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -3196,6 +4193,244 @@ di "Scenario 18B - N=300" +* Scenario 18F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 18F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \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) + } + if `difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_18F_300.csv", replace + + + + +* Scenario 18G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 18G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difk'==1 { + mat G=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==2 { + mat G=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_18G_300.csv", replace + + + + @@ -3448,7 +4683,7 @@ di "Scenario 19B - N=300" -* Scenario 19C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 19C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 19C - N=300" @@ -3468,6 +4703,12 @@ di "Scenario 19B - N=300" + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -3532,13 +4773,7 @@ di "Scenario 19B - N=300" if `difk'==7 { mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F-G qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -3689,7 +4924,7 @@ di "Scenario 19B - N=300" -* Scenario 19E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 +* Scenario 19E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 di "Scenario 19E - N=300" @@ -3707,6 +4942,12 @@ di "Scenario 19B - N=300" qui local difj : word 2 of `ItemsDIF' qui local difk : word 3 of `ItemsDIF' + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) if `difi'==1 { mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) @@ -3771,13 +5012,7 @@ di "Scenario 19B - N=300" if `difk'==7 { mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D=B-E-F-G qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 @@ -3806,6 +5041,238 @@ di "Scenario 19B - N=300" export delimited using "`path'/scenario_19E_300.csv", replace +* Scenario 19F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 19F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difk'==1 { + mat G=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_19F_300.csv", replace + +* Scenario 19G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 19G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difi'==5 { + mat E=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difi'==6 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difi'==7 { + mat E=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difj'==5 { + mat F=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difj'==6 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difj'==7 { + mat F=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + if `difk'==1 { + mat G=(0.5 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==2 { + mat G=(0 \ 0.5 \ 0 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==3 { + mat G=(0 \ 0 \ 0.5 \ 0 \ 0 \ 0 \ 0) + } + if `difk'==4 { + mat G=(0 \ 0 \ 0 \ 0.5 \ 0 \ 0 \ 0) + } + if `difk'==5 { + mat G=(0 \ 0 \ 0 \ 0 \ 0.5 \ 0 \ 0) + } + if `difk'==6 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0.5 \ 0) + } + if `difk'==7 { + mat G=(0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_19G_300.csv", replace + @@ -4051,7 +5518,7 @@ di "Scenario 20B - N=300" export delimited using "`path'/scenario_20B_300.csv", replace -* Scenario 20C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 +* Scenario 20C : H_1 is TRUE / Effect size 0.2 / DIF negative x3 di "Scenario 20C - N=300" @@ -4071,78 +5538,78 @@ di "Scenario 20B - N=300" - mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - if `difi'==1 { - mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==4 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) - } - if `difi'==5 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) - } - if `difi'==6 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) - } - if `difi'==7 { - mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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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0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 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0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4292,7 +5759,7 @@ di "Scenario 20B - N=300" -* Scenario 20E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 +* Scenario 20E : H_1 is TRUE / Effect size 0.4 / DIF negative x3 di "Scenario 20E - N=300" @@ -4310,6 +5777,12 @@ di "Scenario 20B - N=300" qui local difj : word 2 of `ItemsDIF' qui local difk : word 3 of `ItemsDIF' + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) if `difi'==1 { mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) @@ -4374,14 +5847,8 @@ di "Scenario 20B - N=300" if `difk'==7 { mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) } - mat D=B+E+F+G - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4407,3 +5874,236 @@ di "Scenario 20B - N=300" } } export delimited using "`path'/scenario_20E_300.csv", replace + + +* Scenario 20F : H_1 is TRUE / Effect size -0.2 / DIF negative x3 + +di "Scenario 20F - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,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difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) 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 dif3 = `difk' + 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_20F_300.csv", replace + +* Scenario 20G : H_1 is TRUE / Effect size -0.4 / DIF negative x3 + +di "Scenario 20G - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',100)==0 { + di "replication = `replication'" + } + qui set obs 7 + qui gen xxx = _n + qui sample 3 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + qui local difk : word 3 of `ItemsDIF' + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==5 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==6 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==7 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 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 \ 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 \ 0,0,0 \ 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 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==5 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==6 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==7 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difk'==1 { + mat G=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==2 { + mat G=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==3 { + mat G=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==4 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difk'==5 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difk'==6 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difk'==7 { + mat G=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B-E-F-G + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) 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 dif3 = `difk' + 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_20G_300.csv", replace diff --git a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_100.do b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_100.do index 65f1502..4f36f15 100644 --- a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_100.do +++ b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_100.do @@ -145,6 +145,84 @@ forvalues replication = 1/1000 { } export delimited using "`path'/scenario_1C_100.csv", replace +* Scenario 1D : H_0 is FALSE / Effect size = -0.2 + + di "SCENARIO 1D - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1D_100.csv", replace + + * Scenario 1E : H_0 is FALSE / Effect size = -0.4 + + di "SCENARIO 1E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1E_100.csv", replace + + + **------------------------------------------------------------------------------------** @@ -264,6 +342,88 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_2C_100.csv", replace + +* Scenario 2D : H_0 is FALSE / Effect size = -0.2 + di "SCENARIO 2D - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_2D_100.csv", replace + +* Scenario 2E : H_0 is FALSE / Effect size = -0.4 + di "SCENARIO 2E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_2E_100.csv", replace + + + + + + + + **------------------------------------------------------------------------------------** @@ -382,6 +542,84 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_3C_100.csv", replace +* Scenario 3D : H_0 is FALSE / Effect size = -0.2 + di "SCENARIO 3D - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3D_100.csv", replace + +* Scenario 3E : H_0 is FALSE / Effect size = -0.4 + di "SCENARIO 3E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3E_100.csv", replace + + + + + **------------------------------------------------------------------------------------** @@ -498,3 +736,78 @@ forvalues replication = 1/1000 { } } export delimited using "`path'/scenario_4C_100.csv", replace + + +* Scenario 4D : H_0 is FALSE / Effect size = -0.2 + di "SCENARIO 4D - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4D_100.csv", replace + +* Scenario 4E : H_0 is FALSE / Effect size = -0.4 + di "SCENARIO 4E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4E_100.csv", replace diff --git a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_200.do b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_200.do index ac78a2b..ea15c14 100644 --- a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_200.do +++ b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_200.do @@ -6,7 +6,7 @@ * * ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) * - * outputs : scenario_1,scenario_2,scenario_3,scenario_4, for N=100/200/300 + * outputs : scenario_1,scenario_2,scenario_3,scenario_4, for N=200/200/300 * * * Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' @@ -20,28 +20,344 @@ adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" * Set data output folder path local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF" + + +* Scenarios with : n = 100 *========================== local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200" local Nn = 200 -** Scenario 1: J = 4 items / M = 2 modalities / N=100 per group / TT=treatment variable +** Scenario 1: J = 4 items / M = 2 modalities / N=200 per group / TT=treatment variable + +* Scenario 1A : H_0 is TRUE + +di "SCENARIO 1A - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + qui simirt, nbobs(`Nn') mu(0) 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 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_1A_200.csv", replace + + + * Scenario 1B : H_0 is FALSE / Effect size = 0.2 + + di "SCENARIO 1B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1B_200.csv", replace + +* Scenario 1C : H_0 is FALSE / Effect size = 0.4 + +di "SCENARIO 1C - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1C_200.csv", replace + +* Scenario 1D : H_0 is FALSE / Effect size = -0.2 + + di "SCENARIO 1D - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1D_200.csv", replace + + * Scenario 1E : H_0 is FALSE / Effect size = -0.4 + + di "SCENARIO 1E - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1E_200.csv", replace + + + + +**------------------------------------------------------------------------------------** + + +** Scenario 2: J = 4 items / M = 4 modalities / N=200 per group / TT=treatment variable - * Scenario 1A : H_0 is TRUE - di "SCENARIO 1A - N=200" + * Scenario 2A : H_0 is TRUE + di "SCENARIO 2A - N=200" forvalues replication = 1/1000 { if mod(`replication',10)==0 { di "replication = `replication'" } - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + 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) + qui simirt, nbobs(`Nn') mu(0) 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 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_2A_200.csv", replace + + + * Scenario 2B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 2B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_2B_200.csv", replace + + * Scenario 2C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 2C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_2C_200.csv", replace + + + +* Scenario 2D : H_0 is FALSE / Effect size = -0.2 + di "SCENARIO 2D - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + 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.2) cov(1) dim(4) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -62,260 +378,381 @@ local Nn = 200 qui save `data',replace } } - export delimited using "`path'/scenario_1A_200.csv", replace - + export delimited using "`path'/scenario_2D_200.csv", replace - * Scenario 1B : H_0 is FALSE / Effect size = 0.2 - di "SCENARIO 1B - N=200" +* Scenario 2E : H_0 is FALSE / Effect size = -0.4 + di "SCENARIO 2E - N=200" - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - 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 + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',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) + 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 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_1B_200.csv", replace + clear + use `grp0' + qui append using `grp1' + drop id + 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_2E_200.csv", replace - * Scenario 1C : H_0 is FALSE / Effect size = 0.4 - di "SCENARIO 1C - N=200" - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - 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) - 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 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_1C_200.csv", replace -**------------------------------------------------------------------------------------** -** Scenario 2: J = 4 items / M = 4 modalities / N=100 per group / TT=treatment variable +**------------------------------------------------------------------------------------** - * Scenario 2A : H_0 is TRUE - di "SCENARIO 2A - N=200" - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - 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) - qui simirt, nbobs(`Nn') mu(0) 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 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_2A_200.csv", replace - - - * Scenario 2B : H_0 is FALSE / Effect size = 0.2 - di "SCENARIO 2B - N=200" +** Scenario 3: J = 7 items / M = 2 modalities / N=200 per group / TT=treatment variable + +* Scenario 3A : H_0 is TRUE +di "SCENARIO 3A - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3A_200.csv", replace + + + * Scenario 3B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 3B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3B_200.csv", replace + +* Scenario 3C : H_0 is FALSE / Effect size = 0.4 +di "SCENARIO 3C - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3C_200.csv", replace + + +* Scenario 3D : H_0 is FALSE / Effect size = -0.2 + di "SCENARIO 3D - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3D_200.csv", replace + +* Scenario 3E : H_0 is FALSE / Effect size = -0.4 + di "SCENARIO 3E - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3E_200.csv", replace - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - 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) - 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 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_2B_200.csv", replace - * Scenario 2C : H_0 is FALSE / Effect size = 0.4 - di "SCENARIO 2C - N=200" - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - 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) - 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 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_2C_200.csv", replace **------------------------------------------------------------------------------------** -** Scenario 3: J = 7 items / M = 2 modalities / N=100 per group / TT=treatment variable +** Scenario 4: J = 7 items / M = 4 modalities / N=200 per group / TT=treatment variable - * Scenario 3A : H_0 is TRUE - di "SCENARIO 3A - N=200" + * Scenario 4A : H_0 is TRUE + di "SCENARIO 4A - N=200" forvalues replication = 1/1000 { if mod(`replication',10)==0 { di "replication = `replication'" } - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4A_200.csv", replace - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - clear - use `grp0' - qui append using `grp1' - drop id - 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_3A_200.csv", replace + * Scenario 4B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 4B - N=200" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4B_200.csv", replace - * Scenario 3B : H_0 is FALSE / Effect size = 0.2 - di "SCENARIO 3B - N=200" + * Scenario 4C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 4C - N=200" forvalues replication = 1/1000 { if mod(`replication',10)==0 { di "replication = `replication'" } - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4C_200.csv", replace + + +* Scenario 4D : H_0 is FALSE / Effect size = -0.2 + di "SCENARIO 4D - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -336,23 +773,23 @@ local Nn = 200 qui save `data',replace } } - export delimited using "`path'/scenario_3B_200.csv", replace + export delimited using "`path'/scenario_4D_200.csv", replace - * Scenario 3C : H_0 is FALSE / Effect size = 0.4 - di "SCENARIO 3C - N=200" +* Scenario 4E : H_0 is FALSE / Effect size = -0.4 + di "SCENARIO 4E - N=200" - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -373,122 +810,4 @@ local Nn = 200 qui save `data',replace } } - export delimited using "`path'/scenario_3C_200.csv", replace - - -**------------------------------------------------------------------------------------** - - -** Scenario 4: J = 7 items / M = 4 modalities / N=100 per group / TT=treatment variable - - * Scenario 4A : H_0 is TRUE - di "SCENARIO 4A - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - - clear - use `grp0' - qui append using `grp1' - drop id - 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_4A_200.csv", replace - - - * Scenario 4B : H_0 is FALSE / Effect size = 0.2 - di "SCENARIO 4B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - - clear - use `grp0' - qui append using `grp1' - drop id - 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_4B_200.csv", replace - - * Scenario 4C : H_0 is FALSE / Effect size = 0.4 - di "SCENARIO 4C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - - clear - use `grp0' - qui append using `grp1' - drop id - 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_4C_200.csv", replace + export delimited using "`path'/scenario_4E_200.csv", replace diff --git a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_300.do b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_300.do index 612f506..2c2f8ef 100644 --- a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_300.do +++ b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_300.do @@ -6,7 +6,7 @@ * * ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) * - * outputs : scenario_1,scenario_2,scenario_3,scenario_4, for N=100/200/300 + * outputs : scenario_1,scenario_2,scenario_3,scenario_4, for N=300/200/300 * * * Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' @@ -20,131 +20,214 @@ adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" * Set data output folder path local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF" -* Scenarios with : n = 300 + + +* Scenarios with : n = 100 *========================== local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300" local Nn = 300 -** Scenario 1: J = 4 items / M = 2 modalities / N=100 per group / TT=treatment variable - - * Scenario 1A : H_0 is TRUE - di "SCENARIO 1A - N=300" +** Scenario 1: J = 4 items / M = 2 modalities / N=300 per group / TT=treatment variable + +* Scenario 1A : H_0 is TRUE + +di "SCENARIO 1A - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + qui simirt, nbobs(`Nn') mu(0) 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 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_1A_300.csv", replace + + + * Scenario 1B : H_0 is FALSE / Effect size = 0.2 + + di "SCENARIO 1B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1B_300.csv", replace + +* Scenario 1C : H_0 is FALSE / Effect size = 0.4 + +di "SCENARIO 1C - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1C_300.csv", replace + +* Scenario 1D : H_0 is FALSE / Effect size = -0.2 + + di "SCENARIO 1D - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1D_300.csv", replace + + * Scenario 1E : H_0 is FALSE / Effect size = -0.4 + + di "SCENARIO 1E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_1E_300.csv", replace - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - 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) - qui simirt, nbobs(`Nn') mu(0) 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 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_1A_300.csv", replace - - - * Scenario 1B : H_0 is FALSE / Effect size = 0.2 - di "SCENARIO 1B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - 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) - 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 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_1B_300.csv", replace - - * Scenario 1C : H_0 is FALSE / Effect size = 0.4 - di "SCENARIO 1C - N=300" - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - 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) - 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 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_1C_300.csv", replace **------------------------------------------------------------------------------------** -** Scenario 2: J = 4 items / M = 4 modalities / N=100 per group / TT=treatment variable +** Scenario 2: J = 4 items / M = 4 modalities / N=300 per group / TT=treatment variable * Scenario 2A : H_0 is TRUE di "SCENARIO 2A - N=300" @@ -153,73 +236,73 @@ local Nn = 300 if mod(`replication',10)==0 { di "replication = `replication'" } - 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) - qui simirt, nbobs(`Nn') mu(0) 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 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_2A_300.csv", replace - - - * Scenario 2B : H_0 is FALSE / Effect size = 0.2 - di "SCENARIO 2B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - 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) - 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 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_2B_300.csv", 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) + 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) + qui simirt, nbobs(`Nn') mu(0) 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 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_2A_300.csv", replace + + + * Scenario 2B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 2B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_2B_300.csv", replace * Scenario 2C : H_0 is FALSE / Effect size = 0.4 di "SCENARIO 2C - N=300" @@ -228,159 +311,319 @@ local Nn = 300 if mod(`replication',10)==0 { di "replication = `replication'" } - 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) - 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 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_2C_300.csv", 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) + 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) + 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 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_2C_300.csv", replace + + + +* Scenario 2D : H_0 is FALSE / Effect size = -0.2 + di "SCENARIO 2D - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_2D_300.csv", replace + +* Scenario 2E : H_0 is FALSE / Effect size = -0.4 + di "SCENARIO 2E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + 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) + 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 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_2E_300.csv", replace -**------------------------------------------------------------------------------------** -** Scenario 3: J = 7 items / M = 2 modalities / N=100 per group / TT=treatment variable - * Scenario 3A : H_0 is TRUE - di "SCENARIO 3A - N=300" - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - - clear - use `grp0' - qui append using `grp1' - drop id - 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_3A_300.csv", replace - - - * Scenario 3B : H_0 is FALSE / Effect size = 0.2 - di "SCENARIO 3B - N=300" - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - - clear - use `grp0' - qui append using `grp1' - drop id - 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_3B_300.csv", replace - - * Scenario 3C : H_0 is FALSE / Effect size = 0.4 - di "SCENARIO 3C - N=300" - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - - clear - use `grp0' - qui append using `grp1' - drop id - 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_3C_300.csv", replace +**------------------------------------------------------------------------------------** + + +** Scenario 3: J = 7 items / M = 2 modalities / N=300 per group / TT=treatment variable + +* Scenario 3A : H_0 is TRUE +di "SCENARIO 3A - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3A_300.csv", replace + + + * Scenario 3B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 3B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3B_300.csv", replace + +* Scenario 3C : H_0 is FALSE / Effect size = 0.4 +di "SCENARIO 3C - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3C_300.csv", replace + + +* Scenario 3D : H_0 is FALSE / Effect size = -0.2 + di "SCENARIO 3D - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3D_300.csv", replace + +* Scenario 3E : H_0 is FALSE / Effect size = -0.4 + di "SCENARIO 3E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_3E_300.csv", replace + + + **------------------------------------------------------------------------------------** -** Scenario 4: J = 7 items / M = 4 modalities / N=100 per group / TT=treatment variable +** Scenario 4: J = 7 items / M = 4 modalities / N=300 per group / TT=treatment variable * Scenario 4A : H_0 is TRUE di "SCENARIO 4A - N=300" @@ -389,35 +632,35 @@ local Nn = 300 if mod(`replication',10)==0 { di "replication = `replication'" } - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - - clear - use `grp0' - qui append using `grp1' - drop id - 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_4A_300.csv", replace + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4A_300.csv", replace * Scenario 4B : H_0 is FALSE / Effect size = 0.2 @@ -427,35 +670,35 @@ local Nn = 300 if mod(`replication',10)==0 { di "replication = `replication'" } - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - - clear - use `grp0' - qui append using `grp1' - drop id - 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_4B_300.csv", replace + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4B_300.csv", replace * Scenario 4C : H_0 is FALSE / Effect size = 0.4 di "SCENARIO 4C - N=300" @@ -464,32 +707,107 @@ local Nn = 300 if mod(`replication',10)==0 { di "replication = `replication'" } - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear - qui gen TT = 1 - tempfile grp1 - qui save `grp1',replace - - clear - use `grp0' - qui append using `grp1' - drop id - 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_4C_300.csv", replace + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4C_300.csv", replace + + +* Scenario 4D : H_0 is FALSE / Effect size = -0.2 + di "SCENARIO 4D - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(-0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4D_300.csv", replace + +* Scenario 4E : H_0 is FALSE / Effect size = -0.4 + di "SCENARIO 4E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(`Nn') mu(-0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + 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_4E_300.csv", replace