diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do index c40bdd3..efeba20 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_100.do @@ -1181,7 +1181,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1193,7 +1193,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1205,7 +1205,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1217,7 +1217,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1271,7 +1271,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1283,7 +1283,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1295,7 +1295,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1307,7 +1307,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1353,7 +1353,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1365,7 +1365,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1377,7 +1377,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1389,7 +1389,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1450,7 +1450,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1462,7 +1462,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1474,7 +1474,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1486,7 +1486,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1532,7 +1532,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1544,7 +1544,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1556,7 +1556,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1568,7 +1568,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1847,7 +1847,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1859,7 +1859,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1871,7 +1871,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -1884,7 +1884,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -1938,7 +1938,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1950,7 +1950,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1962,7 +1962,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -1975,7 +1975,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2021,7 +2021,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2033,7 +2033,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2045,7 +2045,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2058,7 +2058,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2119,7 +2119,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2131,7 +2131,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2143,7 +2143,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2156,7 +2156,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2202,7 +2202,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2214,7 +2214,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2226,7 +2226,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2239,7 +2239,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2519,7 +2519,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2531,7 +2531,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2543,7 +2543,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2555,7 +2555,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2609,7 +2609,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2621,7 +2621,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2633,7 +2633,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2645,7 +2645,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2691,7 +2691,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2703,7 +2703,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2715,7 +2715,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2727,7 +2727,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2788,7 +2788,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2800,7 +2800,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2812,7 +2812,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2824,7 +2824,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2870,7 +2870,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2882,7 +2882,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2894,7 +2894,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2906,7 +2906,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -3185,7 +3185,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3197,7 +3197,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3209,7 +3209,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3222,7 +3222,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3276,7 +3276,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3288,7 +3288,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3300,7 +3300,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3313,7 +3313,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3359,7 +3359,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3371,7 +3371,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3383,7 +3383,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3396,7 +3396,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3457,7 +3457,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3469,7 +3469,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3481,7 +3481,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3494,7 +3494,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3540,7 +3540,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3552,7 +3552,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3564,7 +3564,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3577,7 +3577,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3791,7 +3791,7 @@ forvalues replication = 1/1000 { if `difj'==2 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) } - if `difj'==3 { + if { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } if `difj'==4 { @@ -3857,3 +3857,1215 @@ forvalues replication = 1/1000 { ************** Scenarios with : DIF on 2 items ************** **** Scenarios with : DIF size 0.3 **** + +** Scenario 13: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 13A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 13A - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13A_100.csv", replace + + + * Scenario 13B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 13B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13B_100.csv", replace + +* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 13C - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13C_100.csv", replace + + +* Scenario 13D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 13D - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13D_100.csv", replace + +* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 13E - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13E_100.csv", replace + + +* Scenario 13F : H_0 is TRUE / DIF on treatment + DIF on control (other item) + +di "Scenario 13F - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + while `difi'==`difj' { + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + } + + if `difi'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difi'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difi'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difj'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13F_100.csv", replace + + +* Scenario 13G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) + + di "Scenario 13G - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + while `difi'==`difj' { + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + } + + if `difi'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difi'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difi'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difj'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13G_100.csv", replace + +* Scenario 13H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) + + di "Scenario 13H - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + while `difi'==`difj' { + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + } + + if `difi'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difi'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difi'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difj'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13H_100.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_200.do b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_200.do index cdb640a..e76aba0 100644 --- a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_200.do +++ b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_200.do @@ -1181,7 +1181,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1193,7 +1193,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1205,7 +1205,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1217,7 +1217,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1271,7 +1271,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1283,7 +1283,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1295,7 +1295,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1307,7 +1307,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1353,7 +1353,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1365,7 +1365,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1377,7 +1377,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1389,7 +1389,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1450,7 +1450,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1462,7 +1462,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1474,7 +1474,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1486,7 +1486,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1532,7 +1532,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1544,7 +1544,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1556,7 +1556,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1568,7 +1568,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1847,7 +1847,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1859,7 +1859,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1871,7 +1871,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -1884,7 +1884,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -1938,7 +1938,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1950,7 +1950,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1962,7 +1962,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -1975,7 +1975,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2021,7 +2021,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2033,7 +2033,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2045,7 +2045,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2058,7 +2058,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2119,7 +2119,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2131,7 +2131,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2143,7 +2143,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2156,7 +2156,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2202,7 +2202,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2214,7 +2214,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2226,7 +2226,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2239,7 +2239,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2519,7 +2519,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2531,7 +2531,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2543,7 +2543,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2555,7 +2555,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2609,7 +2609,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2621,7 +2621,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2633,7 +2633,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2645,7 +2645,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2691,7 +2691,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2703,7 +2703,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2715,7 +2715,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2727,7 +2727,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2788,7 +2788,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2800,7 +2800,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2812,7 +2812,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2824,7 +2824,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2870,7 +2870,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2882,7 +2882,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2894,7 +2894,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2906,7 +2906,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -3185,7 +3185,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3197,7 +3197,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3209,7 +3209,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3222,7 +3222,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3276,7 +3276,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3288,7 +3288,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3300,7 +3300,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3313,7 +3313,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3359,7 +3359,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3371,7 +3371,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3383,7 +3383,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3396,7 +3396,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3457,7 +3457,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3469,7 +3469,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3481,7 +3481,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3494,7 +3494,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3540,7 +3540,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3552,7 +3552,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3564,7 +3564,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3577,7 +3577,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3791,7 +3791,7 @@ forvalues replication = 1/1000 { if `difj'==2 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) } - if `difj'==3 { + if { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } if `difj'==4 { @@ -3857,3 +3857,1215 @@ forvalues replication = 1/1000 { ************** Scenarios with : DIF on 2 items ************** **** Scenarios with : DIF size 0.3 **** + +** Scenario 13: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 13A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 13A - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13A_200.csv", replace + + + * Scenario 13B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 13B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13B_200.csv", replace + +* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 13C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13C_200.csv", replace + + +* Scenario 13D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 13D - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13D_200.csv", replace + +* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 13E - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13E_200.csv", replace + + +* Scenario 13F : H_0 is TRUE / DIF on treatment + DIF on control (other item) + +di "Scenario 13F - N=200" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + while `difi'==`difj' { + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + } + + if `difi'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difi'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difi'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difj'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13F_200.csv", replace + + +* Scenario 13G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) + + di "Scenario 13G - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + while `difi'==`difj' { + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + } + + if `difi'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difi'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difi'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difj'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13G_200.csv", replace + +* Scenario 13H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) + + di "Scenario 13H - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + while `difi'==`difj' { + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + } + + if `difi'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difi'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difi'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difj'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13H_200.csv", replace diff --git a/Scripts/Scenarios/DIF/scenarios_DIF_baseline_300.do b/Scripts/Scenarios/DIF/scenarios_DIF_baseline_300.do index d1ce189..49a16d5 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 = 300 +local Nn = 100 @@ -1181,7 +1181,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1193,7 +1193,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1205,7 +1205,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1217,7 +1217,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1271,7 +1271,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1283,7 +1283,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1295,7 +1295,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1307,7 +1307,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1353,7 +1353,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1365,7 +1365,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1377,7 +1377,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1389,7 +1389,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1450,7 +1450,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1462,7 +1462,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1474,7 +1474,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1486,7 +1486,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1532,7 +1532,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.54 \ -0.25 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.54 \ -0.25 \ 0.25 \ 1.14) } } @@ -1544,7 +1544,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } } @@ -1556,7 +1556,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.55 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1568,7 +1568,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.05 \ 0.25 \ 1.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.55 \ 1.14) } } @@ -1847,7 +1847,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1859,7 +1859,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1871,7 +1871,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -1884,7 +1884,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -1938,7 +1938,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1950,7 +1950,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -1962,7 +1962,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -1975,7 +1975,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2021,7 +2021,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2033,7 +2033,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2045,7 +2045,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2058,7 +2058,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2119,7 +2119,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2131,7 +2131,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2143,7 +2143,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2156,7 +2156,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2202,7 +2202,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.54,-0.54,0.46 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2214,7 +2214,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } } @@ -2226,7 +2226,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.45,0.55,1.55\ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2239,7 +2239,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.95,0.05,1.05 \ -0.75,0.25,1.25 \ 0.46,1.14,2.14) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.45,0.55,1.55\ 0.46,1.14,2.14) } } @@ -2519,7 +2519,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2531,7 +2531,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2543,7 +2543,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2555,7 +2555,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2609,7 +2609,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2621,7 +2621,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2633,7 +2633,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2645,7 +2645,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2691,7 +2691,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2703,7 +2703,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2715,7 +2715,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2727,7 +2727,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2788,7 +2788,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2800,7 +2800,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2812,7 +2812,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2824,7 +2824,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2870,7 +2870,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.34 \ -0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.34 \ -0.25 \ 0.25 \ 1.34) } } @@ -2882,7 +2882,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } } @@ -2894,7 +2894,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.75 \ 0.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -2906,7 +2906,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-0.84 \ 0.25 \ 0.25 \ 1.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-0.84 \ -0.25 \ 0.75 \ 1.34) } } @@ -3185,7 +3185,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3197,7 +3197,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3209,7 +3209,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3222,7 +3222,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3276,7 +3276,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3288,7 +3288,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3300,7 +3300,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3313,7 +3313,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3359,7 +3359,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3371,7 +3371,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3383,7 +3383,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3396,7 +3396,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3457,7 +3457,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3469,7 +3469,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3481,7 +3481,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3494,7 +3494,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3540,7 +3540,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.34,-0.34,0.66 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3552,7 +3552,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } } @@ -3564,7 +3564,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3577,7 +3577,7 @@ forvalues replication = 1/1000 { if `difj'==3 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.66,1.34,2.34) } - if `difj'==3 { + if `difj'==4 { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.66,1.34,2.34) } } @@ -3791,7 +3791,7 @@ forvalues replication = 1/1000 { if `difj'==2 { mat D= (-1.84,-0.84,0.16 \ -0.75,0.25,1.25 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) } - if `difj'==3 { + if { mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.25,0.75,1.75 \ 0.16,0.84,1.84) } if `difj'==4 { @@ -3857,3 +3857,1215 @@ forvalues replication = 1/1000 { ************** Scenarios with : DIF on 2 items ************** **** Scenarios with : DIF size 0.3 **** + +** Scenario 13: J = 7 items / M = 2 modalities / DIF SIZE = 0.3 + +* Scenario 13A : H_0 is TRUE / DIF on treatment x 2 + +di "Scenario 13A - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13A_300.csv", replace + + + * Scenario 13B : H_1 is TRUE / Effect size 0.2 / DIF on treatment x2 + + di "Scenario 13B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13B_300.csv", replace + +* Scenario 13C : H_1 is TRUE / Effect size 0.2 / DIF on control x2 + + di "Scenario 13C - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13C_300.csv", replace + + +* Scenario 13D : H_1 is TRUE / Effect size 0.4 / DIF on treatment x2 + + di "Scenario 13D - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13D_300.csv", replace + +* Scenario 13E : H_1 is TRUE / Effect size 0.4 / DIF on control x2 + + di "Scenario 13E - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + + if `difi'==1 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==2 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + + if `difi'==3 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==4 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + } + if `difi'==5 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + } + if `difi'==6 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + if `difi'==7 { + qui local difj = runiformint(2,7) + if `difj'==2 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==3 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \-0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.45) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.45) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.45) + } + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13E_300.csv", replace + + +* Scenario 13F : H_0 is TRUE / DIF on treatment + DIF on control (other item) + +di "Scenario 13F - N=300" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + while `difi'==`difj' { + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + } + + if `difi'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difi'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difi'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difj'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13F_300.csv", replace + + +* Scenario 13G : H_1 is TRUE / Effect size 0.2 / DIF on treatment + DIF on control (other item) + + di "Scenario 13G - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + while `difi'==`difj' { + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + } + + if `difi'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difi'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difi'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difj'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13G_300.csv", replace + +* Scenario 13H : H_1 is TRUE / Effect size 0.4 / DIF on treatment + DIF on control (other item) + + di "Scenario 13H - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + while `difi'==`difj' { + qui local difi = runiformint(1,7) + qui local difj = runiformint(1,7) + } + + if `difi'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difi'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difi'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difi'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + + if `difj'==1 { + mat D= (-0.85 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==2 { + mat D= (-1.15 \ -0.37 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==3 { + mat D= (-1.15 \ -0.67 \ -0.02 \ 0 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==4 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0.3 \ 0.32 \ 0.67 \ 1.15) + } + if `difj'==5 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.62 \ 0.67 \ 1.15) + } + if `difj'==6 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.97 \ 1.15) + } + if `difj'==7 { + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.45) + } + qui simirt, nbobs(`Nn') mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_13H_300.csv", replace