From 87599e629deb5c4aa621883d590588ac6380b874 Mon Sep 17 00:00:00 2001 From: corentinchoisy Date: Tue, 9 Jan 2024 16:59:37 +0100 Subject: [PATCH] Added scenario 17 --- .../DIF/scenarios_DIF_baseline_100.do | 5712 +++++++++- .../DIF/scenarios_DIF_baseline_200.do | 9307 +++++++++++++++- .../DIF/scenarios_DIF_baseline_300.do | 9309 ++++++++++++++++- 3 files changed, 24223 insertions(+), 105 deletions(-) diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do index ca27769..8037e6a 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do @@ -3871,7 +3871,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4025,7 +4025,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4061,7 +4061,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4215,7 +4215,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4248,7 +4248,6 @@ forvalues replication = 1/1000 { di "replication = `replication'" } qui local difi = runiformint(1,7) - if `difi'==1 { qui local difj = runiformint(2,7) if `difj'==2 { @@ -4397,14 +4396,14 @@ forvalues replication = 1/1000 { 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 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4440,7 +4439,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4594,7 +4593,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4776,14 +4775,14 @@ forvalues replication = 1/1000 { 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 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4844,7 +4843,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4871,7 +4870,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4932,7 +4931,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4959,7 +4958,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5019,7 +5018,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -5046,7 +5045,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5091,7 +5090,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -5245,7 +5244,7 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5281,7 +5280,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -5435,7 +5434,7 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5617,14 +5616,14 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5660,7 +5659,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -5814,7 +5813,7 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5996,14 +5995,14 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -6064,7 +6063,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -6091,7 +6090,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -6152,7 +6151,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -6179,7 +6178,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -6239,7 +6238,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -6266,7 +6265,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -6309,7 +6308,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -6463,7 +6462,7 @@ forvalues replication = 1/1000 { mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) } } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -6499,7 +6498,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -6653,7 +6652,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -6835,14 +6834,14 @@ forvalues replication = 1/1000 { mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) } } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -6878,7 +6877,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -7032,7 +7031,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -7214,14 +7213,14 @@ forvalues replication = 1/1000 { mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 1.17 \ 1.65) } } - qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -7282,7 +7281,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -7309,7 +7308,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -7370,7 +7369,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -7397,7 +7396,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -7457,7 +7456,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -7484,7 +7483,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -7529,7 +7528,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -7684,7 +7683,7 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -7720,7 +7719,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -7875,7 +7874,7 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -8058,14 +8057,14 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -8101,7 +8100,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -8256,7 +8255,7 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -8439,14 +8438,14 @@ forvalues replication = 1/1000 { mat D= (-2.15,-1.15,-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(4) pcm(D) clear + 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -8507,7 +8506,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -8534,7 +8533,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -8595,7 +8594,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -8622,7 +8621,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -8682,7 +8681,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -8709,7 +8708,7 @@ forvalues replication = 1/1000 { 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -8735,15 +8734,5581 @@ forvalues replication = 1/1000 { +************** 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 @@ -8754,19 +14319,26 @@ forvalues replication = 1/1000 { +** 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 -set obs 7 -gen idif=_n -sample 3,count -levelsof idif -local difi = r(levels) +* 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 index e76aba0..96edff3 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_200.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_200.do @@ -3871,7 +3871,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4025,7 +4025,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4061,7 +4061,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4215,7 +4215,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4248,7 +4248,6 @@ forvalues replication = 1/1000 { di "replication = `replication'" } qui local difi = runiformint(1,7) - if `difi'==1 { qui local difj = runiformint(2,7) if `difj'==2 { @@ -4397,14 +4396,14 @@ forvalues replication = 1/1000 { 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 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4440,7 +4439,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4594,7 +4593,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4776,14 +4775,14 @@ forvalues replication = 1/1000 { 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 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4844,7 +4843,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4871,7 +4870,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4932,7 +4931,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4959,7 +4958,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5019,7 +5018,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -5046,7 +5045,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5069,3 +5068,9277 @@ forvalues replication = 1/1000 { } } 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 index 49a16d5..f8f5c54 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_300.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_300.do @@ -20,7 +20,7 @@ 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 +local Nn = 300 @@ -3871,7 +3871,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4025,7 +4025,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4061,7 +4061,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4215,7 +4215,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4248,7 +4248,6 @@ forvalues replication = 1/1000 { di "replication = `replication'" } qui local difi = runiformint(1,7) - if `difi'==1 { qui local difj = runiformint(2,7) if `difj'==2 { @@ -4397,14 +4396,14 @@ forvalues replication = 1/1000 { 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 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4440,7 +4439,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4594,7 +4593,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4776,14 +4775,14 @@ forvalues replication = 1/1000 { 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 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(4) pcm(D) clear + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4844,7 +4843,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4871,7 +4870,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -4932,7 +4931,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -4959,7 +4958,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.2) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5019,7 +5018,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 tempfile grp0 qui save `grp0',replace @@ -5046,7 +5045,7 @@ forvalues replication = 1/1000 { 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 simirt, nbobs(`Nn') mu(0.4) cov(1) dim(7) pcm(D) clear qui gen TT = 1 tempfile grp1 qui save `grp1',replace @@ -5069,3 +5068,9277 @@ forvalues replication = 1/1000 { } } 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