diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do index efeba20..0e69f03 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do @@ -5069,3 +5069,1223 @@ forvalues replication = 1/1000 { } } 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(4) 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(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen 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(4) 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(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen 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= (-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(4) 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(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen 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(4) 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(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen 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= (-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(4) 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(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen 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= (-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(4) 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(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen 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= (-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(4) 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(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen 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= (-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(4) 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(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen 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