diff --git a/README.md b/README.md index f9c8724..2e3626a 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ **Data** données simulées |__**DIF** données pour les scénarios avec DIF - |__ **N100** données pour 100 patients - |__ **N200** données pour 100 patients - |__ **N300** données pour 100 patients + |__ **N100** données pour 100 patients + |__ **N200** données pour 100 patients + |__ **N300** données pour 100 patients |__**noDIF** données pour les scénarios sans DIF - |__ **N100** données pour 100 patients - |__ **N200** données pour 100 patients - |__ **N300** données pour 100 patients + |__ **N100** données pour 100 patients + |__ **N200** données pour 100 patients + |__ **N300** données pour 100 patients |__ **Utilities** Autres données utiles **Modules** fichiers .ado et transcriptions R |__simirt.ado @@ -24,7 +24,7 @@ ## Conventions de nomenclature -**XX_N** - Scénarios standard sans confusion / N réplications +**XX_N** - Scénarios de référence sans confusion / N réplications **1XX_N** - TBA / N réplications **2XX_N** - TBA / N réplications **3XX_N** - TBA / N réplications diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do new file mode 100644 index 0000000..d42adbd --- /dev/null +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_100.do @@ -0,0 +1,2698 @@ +*================================================================================================================================================= +* Date : 2024-01-04 +* Stata version : Stata 18 SE +* +* This program creates dataset with DIF for a randomized controlled trial scenario. +* 4 items +* +* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) +* + * outputs : scenario_5,scenario_6,scenario_7,scenario_8,scenario_9,scenario_10,scenario_11,scenario_12 for N=100 +* +* +* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' +* +*================================================================================================================================================ + +* Load simirt.ado +adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" + +* Set data output folder path + +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100" +local Nn = 100 + +*========================== +* Scenarios with : J=4 +*========================== + +************** Scenarios with : DIF on 1 item ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 5: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 5A : H_0 is TRUE / DIF on treatment + +di "Scenario 5A - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_5A_100.csv", replace + + + * Scenario 5B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 5B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_5B_100.csv", replace + +* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 5C - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_5C_100.csv", replace + + +* Scenario 5D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 5D - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_5D_100.csv", replace + +* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 5E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_5E_100.csv", replace + + + + + + + + + + + + +** Scenario 6: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 6A : H_0 is TRUE / DIF on treatment + +di "Scenario 6A - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 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_6A_100.csv", replace + +* Scenario 6B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 6B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_6B_100.csv", replace + +* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 6C - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_6C_100.csv", replace + +* Scenario 6D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 6D - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_6D_100.csv", replace + +* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 6E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_6E_100.csv", replace + + + + +**** ---------------------------------------------------------------------------------------------------------------------------------- **** + + + + +**** Scenarios with : DIF size 0.5 **** + +** Scenario 7: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 + +* Scenario 7A : H_0 is TRUE / DIF on treatment + +di "Scenario 7A - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_7A_100.csv", replace + + + * Scenario 7B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 7B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_7B_100.csv", replace + +* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 7C - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_7C_100.csv", replace + + +* Scenario 7D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 7D - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_7D_100.csv", replace + +* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 7E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_7E_100.csv", replace + + + + + + + + + + + + +** Scenario 8: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 + +* Scenario 8A : H_0 is TRUE / DIF on treatment + +di "Scenario 8A - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 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_8A_100.csv", replace + +* Scenario 8B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 8B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_8B_100.csv", replace + +* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 8C - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_8C_100.csv", replace + +* Scenario 8D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 8D - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_8D_100.csv", replace + +* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 8E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_8E_100.csv", replace + + + + + + + + + + + + + + +************** Scenarios with : DIF on 2 items ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 9: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 9A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 9A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_9A_100.csv", replace + + + * Scenario 9B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 9B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_9B_100.csv", replace + +* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 9C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_9C_100.csv", replace + + +* Scenario 9D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 9D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_9D_100.csv", replace + +* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 9E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_9E_100.csv", replace + + + + + + +** Scenario 10: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 10A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 10A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_10A_100.csv", replace + + + * Scenario 10B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 10B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-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) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_10B_100.csv", replace + +* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 10C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_10C_100.csv", replace + + +* Scenario 10D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 10D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_10D_100.csv", replace + +* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 10E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_10E_100.csv", replace + +**** Scenarios with : DIF size 0.5 **** + +** Scenario 11: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 + +* Scenario 11A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 11A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_11A_100.csv", replace + + + * Scenario 11B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 11B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_11B_100.csv", replace + +* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 11C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_11C_100.csv", replace + + +* Scenario 11D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 11D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_11D_100.csv", replace + +* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 11E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_11E_100.csv", replace + + + + + + +** Scenario 12: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 + +* Scenario 12A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 12A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_12A_100.csv", replace + + + * Scenario 12B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 12B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_12B_100.csv", replace + +* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 12C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_12C_100.csv", replace + + +* Scenario 12D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 12D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_12D_100.csv", replace + +* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 12E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_12E_100.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do new file mode 100644 index 0000000..d72c96d --- /dev/null +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_200.do @@ -0,0 +1,2698 @@ +*================================================================================================================================================= +* Date : 2024-01-04 +* Stata version : Stata 18 SE +* +* This program creates dataset with DIF for a randomized controlled trial scenario. +* 4 items +* +* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) +* + * outputs : scenario_5,scenario_6,scenario_7,scenario_8,scenario_9,scenario_10,scenario_11,scenario_12 for N=200 +* +* +* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' +* +*================================================================================================================================================ + +* Load simirt.ado +adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" + +* Set data output folder path + +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200" +local Nn = 200 + +*========================== +* Scenarios with : J=4 +*========================== + +************** Scenarios with : DIF on 1 item ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 5: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 5A : H_0 is TRUE / DIF on treatment + +di "Scenario 5A - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_5A_200.csv", replace + + + * Scenario 5B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 5B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_5B_200.csv", replace + +* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 5C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_5C_200.csv", replace + + +* Scenario 5D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 5D - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_5D_200.csv", replace + +* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 5E - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_5E_200.csv", replace + + + + + + + + + + + + +** Scenario 6: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 6A : H_0 is TRUE / DIF on treatment + +di "Scenario 6A - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 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_6A_200.csv", replace + +* Scenario 6B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 6B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_6B_200.csv", replace + +* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 6C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_6C_200.csv", replace + +* Scenario 6D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 6D - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_6D_200.csv", replace + +* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 6E - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_6E_200.csv", replace + + + + +**** ---------------------------------------------------------------------------------------------------------------------------------- **** + + + + +**** Scenarios with : DIF size 0.5 **** + +** Scenario 7: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 + +* Scenario 7A : H_0 is TRUE / DIF on treatment + +di "Scenario 7A - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_7A_200.csv", replace + + + * Scenario 7B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 7B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_7B_200.csv", replace + +* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 7C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_7C_200.csv", replace + + +* Scenario 7D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 7D - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_7D_200.csv", replace + +* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 7E - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_7E_200.csv", replace + + + + + + + + + + + + +** Scenario 8: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 + +* Scenario 8A : H_0 is TRUE / DIF on treatment + +di "Scenario 8A - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 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_8A_200.csv", replace + +* Scenario 8B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 8B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_8B_200.csv", replace + +* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 8C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_8C_200.csv", replace + +* Scenario 8D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 8D - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_8D_200.csv", replace + +* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 8E - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_8E_200.csv", replace + + + + + + + + + + + + + + +************** Scenarios with : DIF on 2 items ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 9: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 9A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 9A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_9A_200.csv", replace + + + * Scenario 9B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 9B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_9B_200.csv", replace + +* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 9C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_9C_200.csv", replace + + +* Scenario 9D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 9D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_9D_200.csv", replace + +* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 9E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_9E_200.csv", replace + + + + + + +** Scenario 10: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 10A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 10A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_10A_200.csv", replace + + + * Scenario 10B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 10B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-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) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_10B_200.csv", replace + +* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 10C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_10C_200.csv", replace + + +* Scenario 10D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 10D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_10D_200.csv", replace + +* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 10E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_10E_200.csv", replace + +**** Scenarios with : DIF size 0.5 **** + +** Scenario 11: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 + +* Scenario 11A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 11A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_11A_200.csv", replace + + + * Scenario 11B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 11B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_11B_200.csv", replace + +* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 11C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_11C_200.csv", replace + + +* Scenario 11D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 11D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_11D_200.csv", replace + +* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 11E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_11E_200.csv", replace + + + + + + +** Scenario 12: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 + +* Scenario 12A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 12A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_12A_200.csv", replace + + + * Scenario 12B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 12B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_12B_200.csv", replace + +* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 12C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_12C_200.csv", replace + + +* Scenario 12D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 12D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_12D_200.csv", replace + +* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 12E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_12E_200.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do new file mode 100644 index 0000000..00b4e19 --- /dev/null +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J4_baseline_300.do @@ -0,0 +1,2698 @@ +*================================================================================================================================================= +* Date : 2024-01-04 +* Stata version : Stata 18 SE +* +* This program creates dataset with DIF for a randomized controlled trial scenario. +* 4 items +* +* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) +* + * outputs : scenario_5,scenario_6,scenario_7,scenario_8,scenario_9,scenario_10,scenario_11,scenario_12 for N=300 +* +* +* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' +* +*================================================================================================================================================ + +* Load simirt.ado +adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" + +* Set data output folder path + +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300" +local Nn = 300 + +*========================== +* Scenarios with : J=4 +*========================== + +************** Scenarios with : DIF on 1 item ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 5: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 5A : H_0 is TRUE / DIF on treatment + +di "Scenario 5A - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_5A_300.csv", replace + + + * Scenario 5B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 5B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_5B_300.csv", replace + +* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 5C - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_5C_300.csv", replace + + +* Scenario 5D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 5D - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_5D_300.csv", replace + +* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 5E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_5E_300.csv", replace + + + + + + + + + + + + +** Scenario 6: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 6A : H_0 is TRUE / DIF on treatment + +di "Scenario 6A - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 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_6A_300.csv", replace + +* Scenario 6B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 6B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_6B_300.csv", replace + +* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 6C - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_6C_300.csv", replace + +* Scenario 6D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 6D - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_6D_300.csv", replace + +* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 6E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_6E_300.csv", replace + + + + +**** ---------------------------------------------------------------------------------------------------------------------------------- **** + + + + +**** Scenarios with : DIF size 0.5 **** + +** Scenario 7: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 + +* Scenario 7A : H_0 is TRUE / DIF on treatment + +di "Scenario 7A - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_7A_300.csv", replace + + + * Scenario 7B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 7B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_7B_300.csv", replace + +* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 7C - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_7C_300.csv", replace + + +* Scenario 7D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 7D - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_7D_300.csv", replace + +* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 7E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E= (0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E= (0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E= (0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E= (0 \ 0 \ 0 \ 0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) 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_7E_300.csv", replace + + + + + + + + + + + + +** Scenario 8: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 + +* Scenario 8A : H_0 is TRUE / DIF on treatment + +di "Scenario 8A - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 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_8A_300.csv", replace + +* Scenario 8B : H_1 is TRUE / Effect size 0.2 / DIF on treatment + + di "Scenario 8B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_8B_300.csv", replace + +* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF on control + + di "Scenario 8C - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_8C_300.csv", replace + +* Scenario 8D : H_1 is TRUE / Effect size 0.4 / DIF on treatment + + di "Scenario 8D - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_8D_300.csv", replace + +* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF on control + + di "Scenario 8E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,4) + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat D= (0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat D= (0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat D= (0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat D= (0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + 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_8E_300.csv", replace + + + + + + + + + + + + + + +************** Scenarios with : DIF on 2 items ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 9: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 9A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 9A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_9A_300.csv", replace + + + * Scenario 9B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 9B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_9B_300.csv", replace + +* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 9C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_9C_300.csv", replace + + +* Scenario 9D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 9D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_9D_300.csv", replace + +* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 9E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.3 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.3 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.3 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.3) + } + if `difj'==1 { + mat F=(0.3 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.3 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.3 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_9E_300.csv", replace + + + + + + +** Scenario 10: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 10A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 10A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_10A_300.csv", replace + + + * Scenario 10B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 10B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-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) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_10B_300.csv", replace + +* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 10C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_10C_300.csv", replace + + +* Scenario 10D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 10D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_10D_300.csv", replace + +* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 10E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + if `difj'==1 { + mat F=(0.3,0.3,0.3 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.3,0.3,0.3 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.3,0.3,0.3 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.3,0.3,0.3) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_10E_300.csv", replace + +**** Scenarios with : DIF size 0.5 **** + +** Scenario 11: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 + +* Scenario 11A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 11A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_11A_300.csv", replace + + + * Scenario 11B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 11B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_11B_300.csv", replace + +* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 11C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_11C_300.csv", replace + + +* Scenario 11D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 11D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_11D_300.csv", replace + +* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 11E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-0.84 \ -0.25 \ 0.25 \ 0.84) + if `difi'==1 { + mat E=(0.5 \ 0 \ 0 \ 0) + } + if `difi'==2 { + mat E=(0 \ 0.5 \ 0 \ 0) + } + if `difi'==3 { + mat E=(0 \ 0 \ 0.5 \ 0) + } + if `difi'==4 { + mat E=(0 \ 0 \ 0 \ 0.5) + } + if `difj'==1 { + mat F=(0.5 \ 0 \ 0 \ 0) + } + if `difj'==2 { + mat F=(0 \ 0.5 \ 0 \ 0) + } + if `difj'==3 { + mat F=(0 \ 0 \ 0.5 \ 0) + } + if `difj'==4 { + mat F=(0 \ 0 \ 0 \ 0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_11E_300.csv", replace + + + + + + +** Scenario 12: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 + +* Scenario 12A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 12A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_12A_300.csv", replace + + + * Scenario 12B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 12B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_12B_300.csv", replace + +* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 12C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_12C_300.csv", replace + + +* Scenario 12D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 12D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen 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_12D_300.csv", replace + +* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 12E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui set obs 4 + qui gen xxx = _n + qui sample 2 ,count + qui valuesof xxx + qui local ItemsDIF = r(values) + qui local difi : word 1 of `ItemsDIF' + qui local difj : word 2 of `ItemsDIF' + + mat B= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + if `difi'==1 { + mat E=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difi'==2 { + mat E=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difi'==3 { + mat E=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difi'==4 { + mat E=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + if `difj'==1 { + mat F=(0.5,0.5,0.5 \ 0,0,0 \ 0,0,0 \ 0,0,0) + } + if `difj'==2 { + mat F=(0,0,0 \ 0.5,0.5,0.5 \ 0,0,0 \ 0,0,0) + } + if `difj'==3 { + mat F=(0,0,0 \ 0,0,0 \ 0.5,0.5,0.5 \ 0,0,0) + } + if `difj'==4 { + mat F=(0,0,0 \ 0,0,0 \ 0,0,0 \ 0.5,0.5,0.5) + } + mat D=B+E+F + qui simirt, nbobs(`Nn') mu(0) 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_12E_300.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_100.do b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_100.do new file mode 100644 index 0000000..7f5bd3a --- /dev/null +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_100.do @@ -0,0 +1,4309 @@ +*================================================================================================================================================= +* Date : 2024-01-04 +* Stata version : Stata 18 SE +* +* This program creates dataset with DIF for a randomized controlled trial scenario. +* 7 items +* +* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) +* + * outputs : scenario_13,scenario_14,scenario_15,scenario_16,scenario_17,scenario_18,scenario_19,scenario_20 for N=100 +* +* +* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' +* +*================================================================================================================================================ + +* Load simirt.ado +adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" + +* Set data output folder path + +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100" +local Nn = 100 + + +*========================== +* Scenarios with : J=7 +*========================== + +************** Scenarios with : DIF on 2 items ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 13: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 13A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 13A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_13A_100.csv", replace + + + * Scenario 13B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 13B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_13B_100.csv", replace + +* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 13C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_13C_100.csv", replace + + +* Scenario 13D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 13D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_13D_100.csv", replace + +* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 13E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_13E_100.csv", replace + + + + +** Scenario 14: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 14A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 14A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_14A_100.csv", replace + + + * Scenario 14B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 14B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_14B_100.csv", replace + +* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 14C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_14C_100.csv", replace + + +* Scenario 14D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 14D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_14D_100.csv", replace + +* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 14E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_14E_100.csv", replace + + +**** Scenarios with : DIF size 0.5 **** + +** Scenario 15: J = 7 items / M = 2 modalities / DIF SIZE = 0.5 + +* Scenario 15A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 15A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_15A_100.csv", replace + + + * Scenario 15B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 15B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_15B_100.csv", replace + +* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 15C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_15C_100.csv", replace + + +* Scenario 15D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 15D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_15D_100.csv", replace + +* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 15E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_15E_100.csv", replace + + + + +** Scenario 16: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 + +* Scenario 16A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 16A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_16A_100.csv", replace + + + * Scenario 16B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 16B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_16B_100.csv", replace + +* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 16C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_16C_100.csv", replace + + +* Scenario 16D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 16D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_16D_100.csv", replace + +* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 16E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_16E_100.csv", replace + + + + + +************** Scenarios with : DIF on 3 items ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 17: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 17A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 17A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_17A_100.csv", replace + + +* Scenario 17B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 17B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_17B_100.csv", replace + + + + + + + + + + + +* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 17C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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.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_17C_100.csv", replace + + + + + + + +* Scenario 17D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 17D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_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',10)==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 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 18: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 18A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 18A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_18A_100.csv", replace + + +* Scenario 18B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 18B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_18B_100.csv", replace + + + + + + + + + + + +* Scenario 18C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 18C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_18C_100.csv", replace + + + + + + + +* Scenario 18D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 18D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_18D_100.csv", replace + + + + + + + + + + + +* Scenario 18E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 + + di "Scenario 18E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_18E_100.csv", replace + + + + + + + + + + + + +**** Scenarios with : DIF size 0.5 **** + + +** Scenario 19: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 19A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 19A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_19A_100.csv", replace + + +* Scenario 19B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 19B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_19B_100.csv", replace + + + +* Scenario 19C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 19C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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.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) 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_19C_100.csv", replace + + + +* Scenario 19D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 19D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_19D_100.csv", replace + + + +* Scenario 19E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 + + di "Scenario 19E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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.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) 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_19E_100.csv", replace + + + + + + +** Scenario 20: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 20A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 20A - N=100" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_20A_100.csv", replace + + +* Scenario 20B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 20B - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_20B_100.csv", replace + + +* Scenario 20C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 20C - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_20C_100.csv", replace + + + +* Scenario 20D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 20D - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_20D_100.csv", replace + + + +* Scenario 20E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 + + di "Scenario 20E - N=100" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_20E_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 new file mode 100644 index 0000000..d1d5fe9 --- /dev/null +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_200.do @@ -0,0 +1,4309 @@ +*================================================================================================================================================= +* Date : 2024-01-04 +* Stata version : Stata 18 SE +* +* This program creates dataset with DIF for a randomized controlled trial scenario. +* 7 items +* +* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) +* + * outputs : scenario_13,scenario_14,scenario_15,scenario_16,scenario_17,scenario_18,scenario_19,scenario_20 for N=200 +* +* +* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' +* +*================================================================================================================================================ + +* Load simirt.ado +adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" + +* Set data output folder path + +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N200" +local Nn = 200 + + +*========================== +* Scenarios with : J=7 +*========================== + +************** Scenarios with : DIF on 2 items ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 13: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 13A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 13A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_13A_200.csv", replace + + + * Scenario 13B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 13B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_13B_200.csv", replace + +* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 13C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_13C_200.csv", replace + + +* Scenario 13D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 13D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_13D_200.csv", replace + +* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 13E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_13E_200.csv", replace + + + + +** Scenario 14: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 14A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 14A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_14A_200.csv", replace + + + * Scenario 14B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 14B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_14B_200.csv", replace + +* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 14C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_14C_200.csv", replace + + +* Scenario 14D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 14D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_14D_200.csv", replace + +* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 14E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_14E_200.csv", replace + + +**** Scenarios with : DIF size 0.5 **** + +** Scenario 15: J = 7 items / M = 2 modalities / DIF SIZE = 0.5 + +* Scenario 15A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 15A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_15A_200.csv", replace + + + * Scenario 15B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 15B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_15B_200.csv", replace + +* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 15C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_15C_200.csv", replace + + +* Scenario 15D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 15D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_15D_200.csv", replace + +* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 15E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_15E_200.csv", replace + + + + +** Scenario 16: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 + +* Scenario 16A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 16A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_16A_200.csv", replace + + + * Scenario 16B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 16B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_16B_200.csv", replace + +* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 16C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_16C_200.csv", replace + + +* Scenario 16D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 16D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_16D_200.csv", replace + +* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 16E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_16E_200.csv", replace + + + + + +************** Scenarios with : DIF on 3 items ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 17: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 17A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 17A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_17A_200.csv", replace + + +* Scenario 17B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 17B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_17B_200.csv", replace + + + + + + + + + + + +* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 17C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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.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_17C_200.csv", replace + + + + + + + +* Scenario 17D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 17D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_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',10)==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 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 18: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 18A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 18A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_18A_200.csv", replace + + +* Scenario 18B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 18B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_18B_200.csv", replace + + + + + + + + + + + +* Scenario 18C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 18C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_18C_200.csv", replace + + + + + + + +* Scenario 18D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 18D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_18D_200.csv", replace + + + + + + + + + + + +* Scenario 18E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 + + di "Scenario 18E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_18E_200.csv", replace + + + + + + + + + + + + +**** Scenarios with : DIF size 0.5 **** + + +** Scenario 19: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 19A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 19A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_19A_200.csv", replace + + +* Scenario 19B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 19B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_19B_200.csv", replace + + + +* Scenario 19C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 19C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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.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) 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_19C_200.csv", replace + + + +* Scenario 19D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 19D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_19D_200.csv", replace + + + +* Scenario 19E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 + + di "Scenario 19E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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.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) 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_19E_200.csv", replace + + + + + + +** Scenario 20: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 20A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 20A - N=200" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_20A_200.csv", replace + + +* Scenario 20B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 20B - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_20B_200.csv", replace + + +* Scenario 20C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 20C - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_20C_200.csv", replace + + + +* Scenario 20D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 20D - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_20D_200.csv", replace + + + +* Scenario 20E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 + + di "Scenario 20E - N=200" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_20E_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 new file mode 100644 index 0000000..093e9bb --- /dev/null +++ b/Scripts/Scenarios/DIF/scenarios_DIF_J7_baseline_300.do @@ -0,0 +1,4309 @@ +*================================================================================================================================================= +* Date : 2024-01-04 +* Stata version : Stata 18 SE +* +* This program creates dataset with DIF for a randomized controlled trial scenario. +* 7 items +* +* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) +* + * outputs : scenario_13,scenario_14,scenario_15,scenario_16,scenario_17,scenario_18,scenario_19,scenario_20 for N=300 +* +* +* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' +* +*================================================================================================================================================ + +* Load simirt.ado +adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" + +* Set data output folder path + +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N300" +local Nn = 300 + + +*========================== +* Scenarios with : J=7 +*========================== + +************** Scenarios with : DIF on 2 items ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 13: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 13A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 13A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_13A_300.csv", replace + + + * Scenario 13B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 13B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_13B_300.csv", replace + +* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 13C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_13C_300.csv", replace + + +* Scenario 13D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 13D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_13D_300.csv", replace + +* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 13E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_13E_300.csv", replace + + + + +** Scenario 14: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 14A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 14A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_14A_300.csv", replace + + + * Scenario 14B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 14B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_14B_300.csv", replace + +* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 14C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_14C_300.csv", replace + + +* Scenario 14D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 14D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_14D_300.csv", replace + +* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 14E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_14E_300.csv", replace + + +**** Scenarios with : DIF size 0.5 **** + +** Scenario 15: J = 7 items / M = 2 modalities / DIF SIZE = 0.5 + +* Scenario 15A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 15A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_15A_300.csv", replace + + + * Scenario 15B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 15B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_15B_300.csv", replace + +* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 15C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_15C_300.csv", replace + + +* Scenario 15D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 15D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_15D_300.csv", replace + +* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 15E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_15E_300.csv", replace + + + + +** Scenario 16: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 + +* Scenario 16A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 16A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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) 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_16A_300.csv", replace + + + * Scenario 16B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 16B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_16B_300.csv", replace + +* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 16C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_16C_300.csv", replace + + +* Scenario 16D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 16D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_16D_300.csv", replace + +* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 16E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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) 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_16E_300.csv", replace + + + + + +************** Scenarios with : DIF on 3 items ************** + +**** Scenarios with : DIF size 0.3 **** + +** Scenario 17: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 17A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 17A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_17A_300.csv", replace + + +* Scenario 17B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 17B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_17B_300.csv", replace + + + + + + + + + + + +* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 17C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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.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_17C_300.csv", replace + + + + + + + +* Scenario 17D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 17D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_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',10)==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 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 18: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 18A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 18A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_18A_300.csv", replace + + +* Scenario 18B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 18B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_18B_300.csv", replace + + + + + + + + + + + +* Scenario 18C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 18C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_18C_300.csv", replace + + + + + + + +* Scenario 18D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 18D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_18D_300.csv", replace + + + + + + + + + + + +* Scenario 18E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 + + di "Scenario 18E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_18E_300.csv", replace + + + + + + + + + + + + +**** Scenarios with : DIF size 0.5 **** + + +** Scenario 19: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 19A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 19A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_19A_300.csv", replace + + +* Scenario 19B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 19B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_19B_300.csv", replace + + + +* Scenario 19C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 19C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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.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) 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_19C_300.csv", replace + + + +* Scenario 19D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 19D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_19D_300.csv", replace + + + +* Scenario 19E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 + + di "Scenario 19E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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.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) 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_19E_300.csv", replace + + + + + + +** Scenario 20: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 + +* Scenario 20A : H_0 is TRUE / DIF on treatment x3 +di "Scenario 20A - N=300" + +forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 + di + 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_20A_300.csv", replace + + +* Scenario 20B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 + +di "Scenario 20B - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_20B_300.csv", replace + + +* Scenario 20C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 + + di "Scenario 20C - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_20C_300.csv", replace + + + +* Scenario 20D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 + + di "Scenario 20D - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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 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_20D_300.csv", replace + + + +* Scenario 20E : H_1 is TRUE / Effect size 0.4 / DIF on control x3 + + di "Scenario 20E - N=300" + + forvalues replication = 1/1000 { + clear + if mod(`replication',10)==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= (-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) 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_20E_300.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do deleted file mode 100644 index 8037e6a..0000000 --- a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do +++ /dev/null @@ -1,14344 +0,0 @@ -*================================================================================================================================================= -* Date : 2024-01-04 -* Stata version : Stata 18 SE -* -* This program creates dataset without DIF for a randomized controlled trial scenario -* -* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) -* - * outputs : scenario_1,scenario_2,scenario_3,scenario_5, for N=100/200/300 -* -* -* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' -* -* -*================================================================================================================================================ - -* Load simirt.ado -adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" - -* Set data output folder path - -local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100" -local Nn = 100 - - - - -*========================== -* Scenarios with : J=4 -*========================== - -************** Scenarios with : DIF on 1 item ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 5: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 5A : H_0 is TRUE / DIF on treatment - -di "Scenario 5A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5A_100.csv", replace - - - * Scenario 5B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 5B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5B_100.csv", replace - -* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 5C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5C_100.csv", replace - - -* Scenario 5D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 5D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5D_100.csv", replace - -* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 5E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5E_100.csv", replace - - - - - - - - - - - - -** Scenario 6: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 6A : H_0 is TRUE / DIF on treatment - -di "Scenario 6A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6A_100.csv", replace - -* Scenario 6B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 6B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6B_100.csv", replace - -* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 6C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6C_100.csv", replace - -* Scenario 6D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 6D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6D_100.csv", replace - -* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 6E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6E_100.csv", replace - - - - -**** ---------------------------------------------------------------------------------------------------------------------------------- **** - - - - -**** Scenarios with : DIF size 0.5 **** - -** Scenario 7: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 7A : H_0 is TRUE / DIF on treatment - -di "Scenario 7A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7A_100.csv", replace - - - * Scenario 7B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 7B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7B_100.csv", replace - -* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 7C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7C_100.csv", replace - - -* Scenario 7D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 7D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7D_100.csv", replace - -* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 7E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7E_100.csv", replace - - - - - - - - - - - - -** Scenario 8: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 8A : H_0 is TRUE / DIF on treatment - -di "Scenario 8A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8A_100.csv", replace - -* Scenario 8B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 8B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8B_100.csv", replace - -* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 8C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8C_100.csv", replace - -* Scenario 8D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 8D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8D_100.csv", replace - -* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 8E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8E_100.csv", replace - - - - - - - - - - - - - - -************** Scenarios with : DIF on 2 items ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 9: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 9A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 9A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9A_100.csv", replace - - - * Scenario 9B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 9B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9B_100.csv", replace - -* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 9C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9C_100.csv", replace - - -* Scenario 9D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 9D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9D_100.csv", replace - -* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 9E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9E_100.csv", replace - - -* Scenario 9F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 9F - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_9F_100.csv", replace - - -* Scenario 9G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 9G - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_9G_100.csv", replace - -* Scenario 9H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 9H - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_9H_100.csv", replace - - - - - - - - - -** Scenario 10: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 10A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 10A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10A_100.csv", replace - - - * Scenario 10B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 10B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10B_100.csv", replace - -* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 10C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10C_100.csv", replace - - -* Scenario 10D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 10D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10D_100.csv", replace - -* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 10E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10E_100.csv", replace - - -* Scenario 10F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 10F - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_10F_100.csv", replace - - -* Scenario 10G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 10G - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_10G_100.csv", replace - -* Scenario 10H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 10H - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_10H_100.csv", replace - - - - - - - - -**** Scenarios with : DIF size 0.5 **** - -** Scenario 11: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 11A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 11A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11A_100.csv", replace - - - * Scenario 11B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 11B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11B_100.csv", replace - -* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 11C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11C_100.csv", replace - - -* Scenario 11D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 11D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11D_100.csv", replace - -* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 11E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11E_100.csv", replace - - -* Scenario 11F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 11F - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_11F_100.csv", replace - - -* Scenario 11G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 11G - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_11G_100.csv", replace - -* Scenario 11H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 11H - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_11H_100.csv", replace - - - - - - - - - -** Scenario 12: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 12A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 12A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12A_100.csv", replace - - - * Scenario 12B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 12B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12B_100.csv", replace - -* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 12C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12C_100.csv", replace - - -* Scenario 12D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 12D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12D_100.csv", replace - -* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 12E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12E_100.csv", replace - - -* Scenario 12F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 12F - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_12F_100.csv", replace - - -* Scenario 12G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 12G - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_12G_100.csv", replace - -* Scenario 12H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 12H - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_12H_100.csv", replace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*========================== -* Scenarios with : J=7 -*========================== - -************** Scenarios with : DIF on 2 items ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 13: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 13A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 13A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13A_100.csv", replace - - - * Scenario 13B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 13B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13B_100.csv", replace - -* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 13C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13C_100.csv", replace - - -* Scenario 13D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 13D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13D_100.csv", replace - -* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 13E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13E_100.csv", replace - - -* Scenario 13F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 13F - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_13F_100.csv", replace - - -* Scenario 13G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 13G - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_13G_100.csv", replace - -* Scenario 13H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 13H - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_13H_100.csv", replace - - - - - - - - - -** Scenario 14: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 14A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 14A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14A_100.csv", replace - - - * Scenario 14B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 14B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14B_100.csv", replace - -* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 14C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14C_100.csv", replace - - -* Scenario 14D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 14D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14D_100.csv", replace - -* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 14E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14E_100.csv", replace - - -* Scenario 14F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 14F - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.85,-0.85, 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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.45,1.45,2.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.85,-0.85, 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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.45,1.45,2.45) - } - 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_14F_100.csv", replace - - -* Scenario 14G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 14G - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.85,-0.85, 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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.45,1.45,2.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.85,-0.85, 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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.45,1.45,2.45) - } - 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_14G_100.csv", replace - -* Scenario 14H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 14H - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.85,-0.85, 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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.45,1.45,2.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.85,-0.85, 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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.45,1.45,2.45) - } - 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_14H_100.csv", replace - - - - - -**** Scenarios with : DIF size 0.5 **** - -** Scenario 15: J = 7 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 15A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 15A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15A_100.csv", replace - - - * Scenario 15B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 15B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15B_100.csv", replace - -* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 15C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15C_100.csv", replace - - -* Scenario 15D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 15D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15D_100.csv", replace - -* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 15E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15E_100.csv", replace - - -* Scenario 15F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 15F - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - 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_15F_100.csv", replace - - -* Scenario 15G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 15G - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - 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_15G_100.csv", replace - -* Scenario 15H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 15H - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - 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_15H_100.csv", replace - - - - - - - - - -** Scenario 16: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 16A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 16A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16A_100.csv", replace - - - * Scenario 16B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 16B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16B_100.csv", replace - -* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 16C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16C_100.csv", replace - - -* Scenario 16D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 16D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16D_100.csv", replace - -* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 16E - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16E_100.csv", replace - - -* Scenario 16F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 16F - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.65,1.65,2.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.65,1.65,2.65) - } - 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_16F_100.csv", replace - - -* Scenario 16G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 16G - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.65,1.65,2.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.65,1.65,2.65) - } - 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_16G_100.csv", replace - -* Scenario 16H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 16H - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.65,1.65,2.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.65,1.65,2.65) - } - 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_16H_100.csv", replace - - - -************** Scenarios with : DIF on 3 items ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 17: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 17A : H_0 is TRUE / DIF on treatment x3 -di "Scenario 17A - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17A_100.csv", replace - - -* Scenario 17B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 - -di "Scenario 17B - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17B_100.csv", replace - - - - - - - - - - - -* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 - - di "Scenario 17C - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17C_100.csv", replace - - - - - - - -* Scenario 17D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 - - di "Scenario 17D - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_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 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17E_100.csv", replace - - - - - - -* Scenario 17F : H_0 is TRUE / DIF on treatment x2 + DIF on control (other item) - -di "Scenario 17F - N=100" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_17F_100.csv", replace - - - - - - - * Scenario 17G : H_0 is TRUE / DIF on treatment + DIF on control x2 (other item) - - di "Scenario 17G - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_17G_100.csv", replace - - - - - - - - -* Scenario 17H : H_0 is TRUE / DIF on treatment x2 + DIF on control (other item) - - di "Scenario 17H - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_17H_100.csv", replace - - - - - - -* Scenario 17I : H_0 is TRUE / DIF on treatment + DIF on control x2 (other item) - - di "Scenario 17I - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_17I_100.csv", replace - - - - - - - - -* Scenario 17J : H_0 is TRUE / DIF on treatment x2 + DIF on control (other item) - - di "Scenario 17J - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_17J_100.csv", replace - - - - - - -* Scenario 17K : H_0 is TRUE / DIF on treatment + DIF on control x2 (other item) - - di "Scenario 17K - N=100" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_17K_100.csv", replace - - - - - - - - -** Scenario 18: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 18A : H_0 is TRUE / DIF on treatment x3 - -* Scenario 18B : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x3 - -* Scenario 18C : H_1 is TRUE / Effect Size 0.2 / DIF on control x3 - -* Scenario 18D : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x3 - -* Scenario 18E : H_1 is TRUE / Effect Size 0.4 / DIF on control x3 - -* Scenario 18F : H_0 is TRUE / DIF on treatment x2 + DIF on control x1 - -* Scenario 18G : H_0 is TRUE / DIF on treatment x1 + DIF on control x2 - -* Scenario 18H : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x2 + DIF on control x1 - -* Scenario 18I : H_1 is TRUE / Effect Size 0.2 / DIF on control x1 + DIF on control x2 - -* Scenario 18J : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x2 + DIF on control x1 - -* Scenario 18K : H_1 is TRUE / Effect Size 0.4 / DIF on control x1 + DIF on control x2 - - - - - - - - - - - - - - - - - - - - -**** Scenarios with : DIF size 0.5 **** - - - -** Scenario 19: J = 7 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 19A : H_0 is TRUE / DIF on treatment x3 - -* Scenario 19B : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x3 - -* Scenario 19C : H_1 is TRUE / Effect Size 0.2 / DIF on control x3 - -* Scenario 19D : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x3 - -* Scenario 19E : H_1 is TRUE / Effect Size 0.4 / DIF on control x3 - -* Scenario 19F : H_0 is TRUE / DIF on treatment x2 + DIF on control x1 - -* Scenario 19G : H_0 is TRUE / DIF on treatment x1 + DIF on control x2 - -* Scenario 19H : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x2 + DIF on control x1 - -* Scenario 19I : H_1 is TRUE / Effect Size 0.2 / DIF on control x1 + DIF on control x2 - -* Scenario 19J : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x2 + DIF on control x1 - -* Scenario 19K : H_1 is TRUE / Effect Size 0.4 / DIF on control x1 + DIF on control x2 - - - - - - - - - - -** Scenario 20: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 20A : H_0 is TRUE / DIF on treatment x3 - -* Scenario 20B : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x3 - -* Scenario 20C : H_1 is TRUE / Effect Size 0.2 / DIF on control x3 - -* Scenario 20D : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x3 - -* Scenario 20E : H_1 is TRUE / Effect Size 0.4 / DIF on control x3 - -* Scenario 20F : H_0 is TRUE / DIF on treatment x2 + DIF on control x1 - -* Scenario 20G : H_0 is TRUE / DIF on treatment x1 + DIF on control x2 - -* Scenario 20H : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x2 + DIF on control x1 - -* Scenario 20I : H_1 is TRUE / Effect Size 0.2 / DIF on control x1 + DIF on control x2 - -* Scenario 20J : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x2 + DIF on control x1 - -* Scenario 20K : H_1 is TRUE / Effect Size 0.4 / DIF on control x1 + DIF on control x2 diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_200.do b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_200.do deleted file mode 100644 index 96edff3..0000000 --- a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_200.do +++ /dev/null @@ -1,14344 +0,0 @@ -*================================================================================================================================================= -* Date : 2024-01-04 -* Stata version : Stata 18 SE -* -* This program creates dataset without DIF for a randomized controlled trial scenario -* -* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) -* - * outputs : scenario_1,scenario_2,scenario_3,scenario_5, 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' -* -* -*================================================================================================================================================ - -* Load simirt.ado -adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" - -* Set data output folder path - -local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100" -local Nn = 200 - - - - -*========================== -* Scenarios with : J=4 -*========================== - -************** Scenarios with : DIF on 1 item ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 5: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 5A : H_0 is TRUE / DIF on treatment - -di "Scenario 5A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5A_200.csv", replace - - - * Scenario 5B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 5B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5B_200.csv", replace - -* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 5C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5C_200.csv", replace - - -* Scenario 5D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 5D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5D_200.csv", replace - -* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 5E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5E_200.csv", replace - - - - - - - - - - - - -** Scenario 6: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 6A : H_0 is TRUE / DIF on treatment - -di "Scenario 6A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6A_200.csv", replace - -* Scenario 6B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 6B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6B_200.csv", replace - -* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 6C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6C_200.csv", replace - -* Scenario 6D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 6D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6D_200.csv", replace - -* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 6E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6E_200.csv", replace - - - - -**** ---------------------------------------------------------------------------------------------------------------------------------- **** - - - - -**** Scenarios with : DIF size 0.5 **** - -** Scenario 7: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 7A : H_0 is TRUE / DIF on treatment - -di "Scenario 7A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7A_200.csv", replace - - - * Scenario 7B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 7B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7B_200.csv", replace - -* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 7C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7C_200.csv", replace - - -* Scenario 7D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 7D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7D_200.csv", replace - -* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 7E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7E_200.csv", replace - - - - - - - - - - - - -** Scenario 8: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 8A : H_0 is TRUE / DIF on treatment - -di "Scenario 8A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8A_200.csv", replace - -* Scenario 8B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 8B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8B_200.csv", replace - -* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 8C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8C_200.csv", replace - -* Scenario 8D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 8D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8D_200.csv", replace - -* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 8E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8E_200.csv", replace - - - - - - - - - - - - - - -************** Scenarios with : DIF on 2 items ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 9: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 9A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 9A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9A_200.csv", replace - - - * Scenario 9B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 9B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9B_200.csv", replace - -* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 9C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9C_200.csv", replace - - -* Scenario 9D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 9D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9D_200.csv", replace - -* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 9E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9E_200.csv", replace - - -* Scenario 9F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 9F - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_9F_200.csv", replace - - -* Scenario 9G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 9G - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_9G_200.csv", replace - -* Scenario 9H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 9H - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_9H_200.csv", replace - - - - - - - - - -** Scenario 10: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 10A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 10A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10A_200.csv", replace - - - * Scenario 10B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 10B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10B_200.csv", replace - -* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 10C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10C_200.csv", replace - - -* Scenario 10D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 10D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10D_200.csv", replace - -* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 10E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10E_200.csv", replace - - -* Scenario 10F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 10F - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_10F_200.csv", replace - - -* Scenario 10G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 10G - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_10G_200.csv", replace - -* Scenario 10H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 10H - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_10H_200.csv", replace - - - - - - - - -**** Scenarios with : DIF size 0.5 **** - -** Scenario 11: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 11A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 11A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11A_200.csv", replace - - - * Scenario 11B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 11B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11B_200.csv", replace - -* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 11C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11C_200.csv", replace - - -* Scenario 11D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 11D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11D_200.csv", replace - -* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 11E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11E_200.csv", replace - - -* Scenario 11F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 11F - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_11F_200.csv", replace - - -* Scenario 11G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 11G - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_11G_200.csv", replace - -* Scenario 11H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 11H - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_11H_200.csv", replace - - - - - - - - - -** Scenario 12: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 12A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 12A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12A_200.csv", replace - - - * Scenario 12B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 12B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12B_200.csv", replace - -* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 12C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12C_200.csv", replace - - -* Scenario 12D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 12D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12D_200.csv", replace - -* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 12E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12E_200.csv", replace - - -* Scenario 12F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 12F - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_12F_200.csv", replace - - -* Scenario 12G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 12G - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_12G_200.csv", replace - -* Scenario 12H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 12H - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_12H_200.csv", replace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*========================== -* Scenarios with : J=7 -*========================== - -************** Scenarios with : DIF on 2 items ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 13: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 13A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 13A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13A_200.csv", replace - - - * Scenario 13B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 13B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13B_200.csv", replace - -* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 13C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13C_200.csv", replace - - -* Scenario 13D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 13D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13D_200.csv", replace - -* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 13E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13E_200.csv", replace - - -* Scenario 13F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 13F - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_13F_200.csv", replace - - -* Scenario 13G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 13G - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_13G_200.csv", replace - -* Scenario 13H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 13H - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_13H_200.csv", replace - - - - - - - - - -** Scenario 14: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 14A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 14A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14A_200.csv", replace - - - * Scenario 14B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 14B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14B_200.csv", replace - -* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 14C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14C_200.csv", replace - - -* Scenario 14D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 14D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14D_200.csv", replace - -* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 14E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14E_200.csv", replace - - -* Scenario 14F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 14F - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.85,-0.85, 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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.45,1.45,2.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.85,-0.85, 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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.45,1.45,2.45) - } - 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_14F_200.csv", replace - - -* Scenario 14G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 14G - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.85,-0.85, 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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.45,1.45,2.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.85,-0.85, 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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.45,1.45,2.45) - } - 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_14G_200.csv", replace - -* Scenario 14H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 14H - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.85,-0.85, 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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.45,1.45,2.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.85,-0.85, 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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.45,1.45,2.45) - } - 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_14H_200.csv", replace - - - - - -**** Scenarios with : DIF size 0.5 **** - -** Scenario 15: J = 7 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 15A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 15A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15A_200.csv", replace - - - * Scenario 15B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 15B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15B_200.csv", replace - -* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 15C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15C_200.csv", replace - - -* Scenario 15D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 15D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15D_200.csv", replace - -* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 15E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15E_200.csv", replace - - -* Scenario 15F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 15F - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - 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_15F_200.csv", replace - - -* Scenario 15G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 15G - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - 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_15G_200.csv", replace - -* Scenario 15H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 15H - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - 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_15H_200.csv", replace - - - - - - - - - -** Scenario 16: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 16A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 16A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16A_200.csv", replace - - - * Scenario 16B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 16B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16B_200.csv", replace - -* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 16C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16C_200.csv", replace - - -* Scenario 16D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 16D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16D_200.csv", replace - -* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 16E - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16E_200.csv", replace - - -* Scenario 16F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 16F - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.65,1.65,2.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.65,1.65,2.65) - } - 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_16F_200.csv", replace - - -* Scenario 16G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 16G - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.65,1.65,2.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.65,1.65,2.65) - } - 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_16G_200.csv", replace - -* Scenario 16H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 16H - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.65,1.65,2.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.65,1.65,2.65) - } - 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_16H_200.csv", replace - - - -************** Scenarios with : DIF on 3 items ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 17: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 17A : H_0 is TRUE / DIF on treatment x3 -di "Scenario 17A - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17A_200.csv", replace - - -* Scenario 17B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 - -di "Scenario 17B - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17B_200.csv", replace - - - - - - - - - - - -* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 - - di "Scenario 17C - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17C_200.csv", replace - - - - - - - -* Scenario 17D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 - - di "Scenario 17D - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_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 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17E_200.csv", replace - - - - - - -* Scenario 17F : H_0 is TRUE / DIF on treatment x2 + DIF on control (other item) - -di "Scenario 17F - N=200" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_17F_200.csv", replace - - - - - - - * Scenario 17G : H_0 is TRUE / DIF on treatment + DIF on control x2 (other item) - - di "Scenario 17G - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_17G_200.csv", replace - - - - - - - - -* Scenario 17H : H_0 is TRUE / DIF on treatment x2 + DIF on control (other item) - - di "Scenario 17H - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_17H_200.csv", replace - - - - - - -* Scenario 17I : H_0 is TRUE / DIF on treatment + DIF on control x2 (other item) - - di "Scenario 17I - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_17I_200.csv", replace - - - - - - - - -* Scenario 17J : H_0 is TRUE / DIF on treatment x2 + DIF on control (other item) - - di "Scenario 17J - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_17J_200.csv", replace - - - - - - -* Scenario 17K : H_0 is TRUE / DIF on treatment + DIF on control x2 (other item) - - di "Scenario 17K - N=200" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_17K_200.csv", replace - - - - - - - - -** Scenario 18: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 18A : H_0 is TRUE / DIF on treatment x3 - -* Scenario 18B : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x3 - -* Scenario 18C : H_1 is TRUE / Effect Size 0.2 / DIF on control x3 - -* Scenario 18D : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x3 - -* Scenario 18E : H_1 is TRUE / Effect Size 0.4 / DIF on control x3 - -* Scenario 18F : H_0 is TRUE / DIF on treatment x2 + DIF on control x1 - -* Scenario 18G : H_0 is TRUE / DIF on treatment x1 + DIF on control x2 - -* Scenario 18H : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x2 + DIF on control x1 - -* Scenario 18I : H_1 is TRUE / Effect Size 0.2 / DIF on control x1 + DIF on control x2 - -* Scenario 18J : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x2 + DIF on control x1 - -* Scenario 18K : H_1 is TRUE / Effect Size 0.4 / DIF on control x1 + DIF on control x2 - - - - - - - - - - - - - - - - - - - - -**** Scenarios with : DIF size 0.5 **** - - - -** Scenario 19: J = 7 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 19A : H_0 is TRUE / DIF on treatment x3 - -* Scenario 19B : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x3 - -* Scenario 19C : H_1 is TRUE / Effect Size 0.2 / DIF on control x3 - -* Scenario 19D : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x3 - -* Scenario 19E : H_1 is TRUE / Effect Size 0.4 / DIF on control x3 - -* Scenario 19F : H_0 is TRUE / DIF on treatment x2 + DIF on control x1 - -* Scenario 19G : H_0 is TRUE / DIF on treatment x1 + DIF on control x2 - -* Scenario 19H : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x2 + DIF on control x1 - -* Scenario 19I : H_1 is TRUE / Effect Size 0.2 / DIF on control x1 + DIF on control x2 - -* Scenario 19J : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x2 + DIF on control x1 - -* Scenario 19K : H_1 is TRUE / Effect Size 0.4 / DIF on control x1 + DIF on control x2 - - - - - - - - - - -** Scenario 20: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 20A : H_0 is TRUE / DIF on treatment x3 - -* Scenario 20B : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x3 - -* Scenario 20C : H_1 is TRUE / Effect Size 0.2 / DIF on control x3 - -* Scenario 20D : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x3 - -* Scenario 20E : H_1 is TRUE / Effect Size 0.4 / DIF on control x3 - -* Scenario 20F : H_0 is TRUE / DIF on treatment x2 + DIF on control x1 - -* Scenario 20G : H_0 is TRUE / DIF on treatment x1 + DIF on control x2 - -* Scenario 20H : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x2 + DIF on control x1 - -* Scenario 20I : H_1 is TRUE / Effect Size 0.2 / DIF on control x1 + DIF on control x2 - -* Scenario 20J : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x2 + DIF on control x1 - -* Scenario 20K : H_1 is TRUE / Effect Size 0.4 / DIF on control x1 + DIF on control x2 diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_300.do b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_300.do deleted file mode 100644 index f8f5c54..0000000 --- a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_300.do +++ /dev/null @@ -1,14344 +0,0 @@ -*================================================================================================================================================= -* Date : 2024-01-04 -* Stata version : Stata 18 SE -* -* This program creates dataset without DIF for a randomized controlled trial scenario -* -* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) -* - * outputs : scenario_1,scenario_2,scenario_3,scenario_5, 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' -* -* -*================================================================================================================================================ - -* Load simirt.ado -adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" - -* Set data output folder path - -local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N100" -local Nn = 300 - - - - -*========================== -* Scenarios with : J=4 -*========================== - -************** Scenarios with : DIF on 1 item ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 5: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 5A : H_0 is TRUE / DIF on treatment - -di "Scenario 5A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5A_300.csv", replace - - - * Scenario 5B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 5B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5B_300.csv", replace - -* Scenario 5C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 5C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5C_300.csv", replace - - -* Scenario 5D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 5D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5D_300.csv", replace - -* Scenario 5E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 5E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_5E_300.csv", replace - - - - - - - - - - - - -** Scenario 6: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 6A : H_0 is TRUE / DIF on treatment - -di "Scenario 6A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6A_300.csv", replace - -* Scenario 6B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 6B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6B_300.csv", replace - -* Scenario 6C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 6C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6C_300.csv", replace - -* Scenario 6D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 6D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6D_300.csv", replace - -* Scenario 6E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 6E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_6E_300.csv", replace - - - - -**** ---------------------------------------------------------------------------------------------------------------------------------- **** - - - - -**** Scenarios with : DIF size 0.5 **** - -** Scenario 7: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 7A : H_0 is TRUE / DIF on treatment - -di "Scenario 7A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7A_300.csv", replace - - - * Scenario 7B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 7B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7B_300.csv", replace - -* Scenario 7C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 7C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7C_300.csv", replace - - -* Scenario 7D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 7D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7D_300.csv", replace - -* Scenario 7E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 7E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_7E_300.csv", replace - - - - - - - - - - - - -** Scenario 8: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 8A : H_0 is TRUE / DIF on treatment - -di "Scenario 8A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8A_300.csv", replace - -* Scenario 8B : H_1 is TRUE / Effect size 0.2 / DIF on treatment - - di "Scenario 8B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8B_300.csv", replace - -* Scenario 8C : H_1 is TRUE / Effect size 0.2 / DIF on control - - di "Scenario 8C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8C_300.csv", replace - -* Scenario 8D : H_1 is TRUE / Effect size 0.4 / DIF on treatment - - di "Scenario 8D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8D_300.csv", replace - -* Scenario 8E : H_1 is TRUE / Effect size 0.4 / DIF on control - - di "Scenario 8E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_8E_300.csv", replace - - - - - - - - - - - - - - -************** Scenarios with : DIF on 2 items ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 9: J = 4 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 9A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 9A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9A_300.csv", replace - - - * Scenario 9B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 9B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9B_300.csv", replace - -* Scenario 9C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 9C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9C_300.csv", replace - - -* Scenario 9D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 9D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9D_300.csv", replace - -* Scenario 9E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 9E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) - } - if `difj'==3 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) - } - } - 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_9E_300.csv", replace - - -* Scenario 9F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 9F - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_9F_300.csv", replace - - -* Scenario 9G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 9G - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_9G_300.csv", replace - -* Scenario 9H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 9H - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.54 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.05 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.55 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.14) - } - 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_9H_300.csv", replace - - - - - - - - - -** Scenario 10: J = 4 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 10A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 10A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10A_300.csv", replace - - - * Scenario 10B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 10B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10B_300.csv", replace - -* Scenario 10C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 10C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10C_300.csv", replace - - -* Scenario 10D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 10D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10D_300.csv", replace - -* Scenario 10E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 10E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) - } - } - 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_10E_300.csv", replace - - -* Scenario 10F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 10F - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_10F_300.csv", replace - - -* Scenario 10G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 10G - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_10G_300.csv", replace - -* Scenario 10H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 10H - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) - } - 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_10H_300.csv", replace - - - - - - - - -**** Scenarios with : DIF size 0.5 **** - -** Scenario 11: J = 4 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 11A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 11A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11A_300.csv", replace - - - * Scenario 11B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 11B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11B_300.csv", replace - -* Scenario 11C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 11C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11C_300.csv", replace - - -* Scenario 11D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 11D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11D_300.csv", replace - -* Scenario 11E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 11E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) - } - if `difj'==3 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) - } - } - 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_11E_300.csv", replace - - -* Scenario 11F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 11F - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_11F_300.csv", replace - - -* Scenario 11G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 11G - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_11G_300.csv", replace - -* Scenario 11H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 11H - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difi'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difi'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difi'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.34 \ -0.25 \ 0.25 \ 0.84) - } - if `difj'==2 { - mat D= (-0.84 \ 0.25 \ 0.25 \ 0.84) - } - if `difj'==3 { - mat D= (-0.84 \ -0.25 \ 0.75 \ 0.84) - } - if `difj'==4 { - mat D= (-0.84 \ -0.25 \ 0.25 \ 1.34) - } - 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_11H_300.csv", replace - - - - - - - - - -** Scenario 12: J = 4 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 12A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 12A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12A_300.csv", replace - - - * Scenario 12B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 12B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12B_300.csv", replace - -* Scenario 12C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 12C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12C_300.csv", replace - - -* Scenario 12D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 12D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12D_300.csv", replace - -* Scenario 12E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 12E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - - if `difi'==1 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==2 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - } - if `difi'==3 { - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - if `difi'==4 { - qui local difj = runiformint(2,4) - qui local difj = runiformint(2,4) - if `difj'==2 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) - } - } - 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_12E_300.csv", replace - - -* Scenario 12F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 12F - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_12F_300.csv", replace - - -* Scenario 12G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 12G - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_12G_300.csv", replace - -* Scenario 12H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 12H - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - while `difi'==`difj' { - qui local difi = runiformint(1,4) - qui local difj = runiformint(1,4) - } - - if `difi'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difi'==3 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difi'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if `difj'==2 { - mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) - } - if { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) - } - if `difj'==4 { - mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) - } - 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_12H_300.csv", replace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*========================== -* Scenarios with : J=7 -*========================== - -************** Scenarios with : DIF on 2 items ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 13: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 13A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 13A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13A_300.csv", replace - - - * Scenario 13B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 13B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13B_300.csv", replace - -* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 13C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13C_300.csv", replace - - -* Scenario 13D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 13D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13D_300.csv", replace - -* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 13E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_13E_300.csv", replace - - -* Scenario 13F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 13F - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_13F_300.csv", replace - - -* Scenario 13G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 13G - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_13G_300.csv", replace - -* Scenario 13H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 13H - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_13H_300.csv", replace - - - - - - - - - -** Scenario 14: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 14A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 14A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14A_300.csv", replace - - - * Scenario 14B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 14B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14B_300.csv", replace - -* Scenario 14C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 14C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14C_300.csv", replace - - -* Scenario 14D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 14D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14D_300.csv", replace - -* Scenario 14E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 14E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.85,-0.85,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.45,1.45,2.45) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.45,1.45,2.45) - } - if `difj'==7 { - 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.03,0.97,1.97 \ 0.45,1.45,2.45) - } - } - 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_14E_300.csv", replace - - -* Scenario 14F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 14F - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.85,-0.85, 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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.45,1.45,2.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.85,-0.85, 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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.45,1.45,2.45) - } - 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_14F_300.csv", replace - - -* Scenario 14G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 14G - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.85,-0.85, 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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.45,1.45,2.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.85,-0.85, 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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.45,1.45,2.45) - } - 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_14G_300.csv", replace - -* Scenario 14H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 14H - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.85,-0.85, 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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.45,1.45,2.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.85,-0.85, 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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.37,-0.37,0.63 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.02,-0.02,0.98 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.7,0.3,1.3 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.38,0.62,1.62 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.03,0.97,1.97 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.45,1.45,2.45) - } - 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_14H_300.csv", replace - - - - - -**** Scenarios with : DIF size 0.5 **** - -** Scenario 15: J = 7 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 15A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 15A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15A_300.csv", replace - - - * Scenario 15B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 15B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15B_300.csv", replace - -* Scenario 15C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 15C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15C_300.csv", replace - - -* Scenario 15D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 15D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15D_300.csv", replace - -* Scenario 15E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 15E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - } - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==3 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.65) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.65) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) - } - } - 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_15E_300.csv", replace - - -* Scenario 15F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 15F - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - 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_15F_300.csv", replace - - -* Scenario 15G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 15G - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - 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_15G_300.csv", replace - -* Scenario 15H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 15H - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-0.65 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==2 { - mat D= (-1.15 \ -0.17 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==3 { - mat D= (-1.15 \ -0.67 \ 0.18 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.5 \ 0.32 \ 0.67 \ 1.15) - } - if `difj'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.82 \ 0.67 \ 1.15) - } - if `difj'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.15) - } - if `difj'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.65) - } - 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_15H_300.csv", replace - - - - - - - - - -** Scenario 16: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 16A : H_0 is TRUE / DIF on treatment x 2 - -di "Scenario 16A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16A_300.csv", replace - - - * Scenario 16B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 - - di "Scenario 16B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16B_300.csv", replace - -* Scenario 16C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 - - di "Scenario 16C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16C_300.csv", replace - - -* Scenario 16D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 - - di "Scenario 16D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16D_300.csv", replace - -* Scenario 16E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 - - di "Scenario 16E - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - } - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - } - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ 0.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - mat D= (-1.65,-0.65,0.35 \ -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.65,1.65,2.65) - } - if `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==6 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.65,1.65,2.65) - } - if `difj'==7 { - 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.17,1.17,2.17 \ 0.65,1.65,2.65) - } - } - 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_16E_300.csv", replace - - -* Scenario 16F : H_0 is TRUE / DIF on treatment + DIF on control (other item) - -di "Scenario 16F - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.65,1.65,2.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.65,1.65,2.65) - } - 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_16F_300.csv", replace - - -* Scenario 16G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) - - di "Scenario 16G - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.65,1.65,2.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.65,1.65,2.65) - } - 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_16G_300.csv", replace - -* Scenario 16H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) - - di "Scenario 16H - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - while `difi'==`difj' { - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difi'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difi'==7 { - 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.65,1.65,2.65) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - mat D= (-1.65,-0.65, 0.35 \ -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 `difj'==2 { - mat D= (-2.15,-1.15,-0.15 \ -1.17,-0.17,0.83 \ -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 `difj'==3 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -0.82,0.18,1.18 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==4 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -0.5,0.5,1.5 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==5 { - mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.18,0.82,1.82 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) - } - if `difj'==6 { - 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.17,1.17,2.17 \ 0.15,1.15,2.15) - } - if `difj'==7 { - 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.65,1.65,2.65) - } - 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_16H_300.csv", replace - - - -************** Scenarios with : DIF on 3 items ************** - -**** Scenarios with : DIF size 0.3 **** - -** Scenario 17: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 - -* Scenario 17A : H_0 is TRUE / DIF on treatment x3 -di "Scenario 17A - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17A_300.csv", replace - - -* Scenario 17B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x3 - -di "Scenario 17B - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17B_300.csv", replace - - - - - - - - - - - -* Scenario 17C : H_1 is TRUE / Effect size 0.2 / DIF on control x3 - - di "Scenario 17C - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17C_300.csv", replace - - - - - - - -* Scenario 17D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x3 - - di "Scenario 17D - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - 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 - - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_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 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - - if `difi'==1 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==2 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==3 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==4 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==5 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==6 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - - - - if `difi'==7 { - qui local difj = runiformint(2,7) - if `difj'==2 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==3 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==4 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==5 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==6 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - qui local difk = runiformint(3,7) - if `difk'==3 { - D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==4 { - D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==5 { - D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==6 { - D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.45) - } - if `difk'==7 { - D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.45) - } - } - } - 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_17E_300.csv", replace - - - - - - -* Scenario 17F : H_0 is TRUE / DIF on treatment x2 + DIF on control (other item) - -di "Scenario 17F - N=300" - -forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_17F_300.csv", replace - - - - - - - * Scenario 17G : H_0 is TRUE / DIF on treatment + DIF on control x2 (other item) - - di "Scenario 17G - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_17G_300.csv", replace - - - - - - - - -* Scenario 17H : H_0 is TRUE / DIF on treatment x2 + DIF on control (other item) - - di "Scenario 17H - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_17H_300.csv", replace - - - - - - -* Scenario 17I : H_0 is TRUE / DIF on treatment + DIF on control x2 (other item) - - di "Scenario 17I - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_17I_300.csv", replace - - - - - - - - -* Scenario 17J : H_0 is TRUE / DIF on treatment x2 + DIF on control (other item) - - di "Scenario 17J - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - 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_17J_300.csv", replace - - - - - - -* Scenario 17K : H_0 is TRUE / DIF on treatment + DIF on control x2 (other item) - - di "Scenario 17K - N=300" - - forvalues replication = 1/1000 { - if mod(`replication',10)==0 { - di "replication = `replication'" - } - qui local difi = runiformint(1,7) - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - while `difi'==`difj' | `difk'==`difj' | `difi'==`difk' { - qui local difj = runiformint(1,7) - qui local difk = runiformint(1,7) - } - - if `difj'==1 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==2 { - if `difk'==2 { - mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - - if `difj'==3 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==4 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - } - if `difj'==5 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - } - if `difj'==6 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - if `difj'==7 { - if `difk'==2 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==3 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==4 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==5 { - mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) - } - if `difk'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) - } - if `difk'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) - } - } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear - qui gen TT = 0 - tempfile grp0 - qui save `grp0',replace - - - - - if `difi'==1 { - mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==2 { - mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==3 { - mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==4 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) - } - if `difi'==5 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) - } - if `difi'==6 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) - } - if `difi'==7 { - mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) - } - 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_17K_300.csv", replace - - - - - - - - -** Scenario 18: J = 7 items / M = 4 modalities / DIF SIZE = 0.3 - -* Scenario 18A : H_0 is TRUE / DIF on treatment x3 - -* Scenario 18B : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x3 - -* Scenario 18C : H_1 is TRUE / Effect Size 0.2 / DIF on control x3 - -* Scenario 18D : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x3 - -* Scenario 18E : H_1 is TRUE / Effect Size 0.4 / DIF on control x3 - -* Scenario 18F : H_0 is TRUE / DIF on treatment x2 + DIF on control x1 - -* Scenario 18G : H_0 is TRUE / DIF on treatment x1 + DIF on control x2 - -* Scenario 18H : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x2 + DIF on control x1 - -* Scenario 18I : H_1 is TRUE / Effect Size 0.2 / DIF on control x1 + DIF on control x2 - -* Scenario 18J : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x2 + DIF on control x1 - -* Scenario 18K : H_1 is TRUE / Effect Size 0.4 / DIF on control x1 + DIF on control x2 - - - - - - - - - - - - - - - - - - - - -**** Scenarios with : DIF size 0.5 **** - - - -** Scenario 19: J = 7 items / M = 2 modalities / DIF SIZE = 0.5 - -* Scenario 19A : H_0 is TRUE / DIF on treatment x3 - -* Scenario 19B : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x3 - -* Scenario 19C : H_1 is TRUE / Effect Size 0.2 / DIF on control x3 - -* Scenario 19D : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x3 - -* Scenario 19E : H_1 is TRUE / Effect Size 0.4 / DIF on control x3 - -* Scenario 19F : H_0 is TRUE / DIF on treatment x2 + DIF on control x1 - -* Scenario 19G : H_0 is TRUE / DIF on treatment x1 + DIF on control x2 - -* Scenario 19H : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x2 + DIF on control x1 - -* Scenario 19I : H_1 is TRUE / Effect Size 0.2 / DIF on control x1 + DIF on control x2 - -* Scenario 19J : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x2 + DIF on control x1 - -* Scenario 19K : H_1 is TRUE / Effect Size 0.4 / DIF on control x1 + DIF on control x2 - - - - - - - - - - -** Scenario 20: J = 7 items / M = 4 modalities / DIF SIZE = 0.5 - -* Scenario 20A : H_0 is TRUE / DIF on treatment x3 - -* Scenario 20B : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x3 - -* Scenario 20C : H_1 is TRUE / Effect Size 0.2 / DIF on control x3 - -* Scenario 20D : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x3 - -* Scenario 20E : H_1 is TRUE / Effect Size 0.4 / DIF on control x3 - -* Scenario 20F : H_0 is TRUE / DIF on treatment x2 + DIF on control x1 - -* Scenario 20G : H_0 is TRUE / DIF on treatment x1 + DIF on control x2 - -* Scenario 20H : H_1 is TRUE / Effect Size 0.2 / DIF on treatment x2 + DIF on control x1 - -* Scenario 20I : H_1 is TRUE / Effect Size 0.2 / DIF on control x1 + DIF on control x2 - -* Scenario 20J : H_1 is TRUE / Effect Size 0.4 / DIF on treatment x2 + DIF on control x1 - -* Scenario 20K : H_1 is TRUE / Effect Size 0.4 / DIF on control x1 + DIF on control x2