diff --git "a/Data\\scenario_1A.csv" "b/Data\\scenario_1A.csv" deleted file mode 100644 index a7d066d..0000000 --- "a/Data\\scenario_1A.csv" +++ /dev/null @@ -1,201 +0,0 @@ -id,lt1,item1,item2,item3,item4,TT,replication -1,.17644101,0,0,0,1,0,1 -2,1.1119704,0,1,1,1,0,1 -3,-.46370447,0,1,0,1,0,1 -4,-1.0415101,1,0,1,0,0,1 -5,-1.2738965,1,0,0,0,0,1 -6,-.085420959,1,1,0,1,0,1 -7,1.1056501,1,1,1,1,0,1 -8,-.32086244,1,0,1,0,0,1 -9,.54192197,1,0,0,0,0,1 -10,.49705315,1,1,0,1,0,1 -11,-.64607531,1,1,0,1,0,1 -12,.51508766,0,1,1,0,0,1 -13,.2836611,0,0,0,1,0,1 -14,-.63813239,1,1,1,0,0,1 -15,1.4577918,1,1,1,1,0,1 -16,-.9888711,1,0,1,0,0,1 -17,-1.8077854,1,0,0,0,0,1 -18,-.36925948,1,0,0,0,0,1 -19,.17932144,1,0,0,0,0,1 -20,-.63588434,0,1,0,1,0,1 -21,.86244547,0,0,0,0,0,1 -22,-.44217664,1,0,0,0,0,1 -23,-.38870588,1,1,1,0,0,1 -24,.95358348,1,1,0,0,0,1 -25,-.36753294,1,0,1,0,0,1 -26,-.63655686,0,0,0,0,0,1 -27,-.012073237,1,1,1,0,0,1 -28,-.13124834,1,0,1,0,0,1 -29,-.14458376,1,0,1,0,0,1 -30,-.25078735,1,1,0,0,0,1 -31,-.16138455,1,1,1,0,0,1 -32,.75585234,1,0,1,1,0,1 -33,-.60850286,1,0,1,0,0,1 -34,.79716212,1,0,1,0,0,1 -35,.45342034,1,1,1,0,0,1 -36,-2.1057169,0,0,0,0,0,1 -37,.79157275,1,0,0,1,0,1 -38,-.66571254,0,1,0,0,0,1 -39,-.097855851,1,1,0,1,0,1 -40,1.0418533,1,0,1,1,0,1 -41,-.46935579,0,0,0,0,0,1 -42,.63163638,1,1,0,0,0,1 -43,.085910544,0,1,1,1,0,1 -44,.83931607,1,0,0,0,0,1 -45,.50145197,1,1,1,0,0,1 -46,2.5159037,0,1,1,1,0,1 -47,-.29928276,1,1,0,0,0,1 -48,-.52162999,1,1,0,1,0,1 -49,1.7009553,1,1,1,1,0,1 -50,-.44088203,1,0,1,0,0,1 -51,1.5880907,1,1,0,0,0,1 -52,-.47029325,0,0,0,0,0,1 -53,1.2277231,1,1,0,1,0,1 -54,.42639166,1,0,1,1,0,1 -55,-.95310265,0,0,0,0,0,1 -56,.64398259,1,0,1,1,0,1 -57,.18478298,1,1,0,1,0,1 -58,.82810265,1,0,1,1,0,1 -59,-.33021048,1,0,0,0,0,1 -60,-3.170429,0,0,0,0,0,1 -61,-1.1574296,0,1,1,0,0,1 -62,1.8837459,1,1,0,0,0,1 -63,-1.2181894,0,0,0,0,0,1 -64,1.2980061,1,1,1,1,0,1 -65,-.32206535,1,1,0,0,0,1 -66,-.42526674,0,0,0,0,0,1 -67,1.3604238,0,1,0,1,0,1 -68,-1.6900293,0,0,0,0,0,1 -69,.46790454,0,0,1,1,0,1 -70,.46692941,0,0,0,0,0,1 -71,-1.4733744,1,0,0,0,0,1 -72,-.20302044,0,1,1,1,0,1 -73,-.48481002,0,0,0,0,0,1 -74,.18501657,0,0,1,0,0,1 -75,-1.5757569,1,0,0,0,0,1 -76,.225288,0,0,0,0,0,1 -77,.40944499,0,1,1,1,0,1 -78,.03514893,1,1,0,1,0,1 -79,-2.0809295,0,0,1,0,0,1 -80,.89514649,1,1,1,0,0,1 -81,-1.3915017,1,0,0,1,0,1 -82,.11379968,1,1,0,0,0,1 -83,1.5646211,1,1,1,1,0,1 -84,-.31079024,1,0,1,0,0,1 -85,1.2880181,1,1,1,1,0,1 -86,-.16200012,1,0,1,0,0,1 -87,-.26236823,0,1,1,0,0,1 -88,-.17450906,1,1,0,0,0,1 -89,-1.8440282,0,0,1,0,0,1 -90,-.13284066,0,1,0,0,0,1 -91,1.5515995,1,1,1,1,0,1 -92,-.78718334,1,0,0,0,0,1 -93,-.28649214,1,0,1,1,0,1 -94,.65451664,1,1,0,0,0,1 -95,.26079011,0,0,0,1,0,1 -96,1.4207528,1,1,1,0,0,1 -97,-.36326984,0,1,0,0,0,1 -98,-.0092543131,1,1,0,1,0,1 -99,.73671579,0,1,1,1,0,1 -100,.078362353,1,0,0,1,0,1 -101,-.24513553,1,1,0,0,1,1 -102,-.85109341,1,1,1,0,1,1 -103,-2.2168906,1,0,0,0,1,1 -104,-.65738457,0,1,0,0,1,1 -105,.00074740726,1,0,0,1,1,1 -106,1.204085,1,1,1,1,1,1 -107,.74587023,1,1,1,0,1,1 -108,1.8170407,1,1,1,0,1,1 -109,-.35072035,1,1,1,0,1,1 -110,-.14632735,1,1,0,0,1,1 -111,1.0549366,1,1,1,1,1,1 -112,-.011479022,0,0,1,0,1,1 -113,.62853611,1,0,1,1,1,1 -114,-.33840579,1,0,1,0,1,1 -115,-.72323412,1,0,0,1,1,1 -116,2.2091029,0,1,0,0,1,1 -117,.21428454,1,0,1,0,1,1 -118,.66688836,1,1,0,0,1,1 -119,-.73199588,1,1,1,0,1,1 -120,-.30729398,1,1,0,1,1,1 -121,.37092265,0,1,1,1,1,1 -122,.6029672,1,1,1,1,1,1 -123,.46125323,1,0,0,1,1,1 -124,-1.2180696,0,0,0,0,1,1 -125,-.51291251,1,1,1,0,1,1 -126,-.17254806,1,0,0,0,1,1 -127,.46708295,1,1,0,0,1,1 -128,-1.153928,1,1,0,0,1,1 -129,1.4594103,1,0,0,0,1,1 -130,-.45216542,1,0,0,0,1,1 -131,.090173036,1,1,0,0,1,1 -132,-.25163296,1,0,0,0,1,1 -133,.99079025,1,0,1,0,1,1 -134,1.9550312,1,1,1,1,1,1 -135,-.74238241,1,0,0,0,1,1 -136,2.4380329,1,1,1,1,1,1 -137,-2.5176644,0,0,0,0,1,1 -138,-1.2309995,1,0,0,0,1,1 -139,-.90618628,1,0,1,0,1,1 -140,-1.6482364,0,0,0,0,1,1 -141,-.66502756,1,0,0,0,1,1 -142,1.2219602,1,0,1,1,1,1 -143,.51810169,0,1,1,1,1,1 -144,.33138105,1,0,1,1,1,1 -145,.92467684,1,1,1,0,1,1 -146,-.47461674,0,0,1,1,1,1 -147,1.2050171,1,1,0,0,1,1 -148,1.5156882,1,1,0,0,1,1 -149,1.5499333,1,1,1,1,1,1 -150,-.063660748,1,0,1,1,1,1 -151,.27926692,0,0,1,1,1,1 -152,1.800284,1,1,1,1,1,1 -153,-2.4724929,0,0,0,0,1,1 -154,1.4980674,1,1,1,1,1,1 -155,1.0834401,1,0,1,0,1,1 -156,-.73209035,0,1,0,0,1,1 -157,.10514933,1,1,1,1,1,1 -158,1.4848051,1,1,1,0,1,1 -159,.48073712,0,1,0,1,1,1 -160,-1.1459501,1,1,1,0,1,1 -161,1.3261594,1,1,0,1,1,1 -162,.45268533,0,1,0,1,1,1 -163,-2.1466103,0,0,0,1,1,1 -164,.036299877,1,0,1,1,1,1 -165,1.132494,1,1,0,1,1,1 -166,-.74459684,1,1,0,0,1,1 -167,-1.3133749,0,0,1,0,1,1 -168,.24529886,0,0,0,0,1,1 -169,-.047662795,1,1,0,0,1,1 -170,1.426119,1,1,1,1,1,1 -171,-1.6673079,0,0,0,0,1,1 -172,-.47215554,0,0,1,0,1,1 -173,-1.1029931,0,1,0,0,1,1 -174,.02064253,0,1,0,1,1,1 -175,-.7602495,1,1,0,0,1,1 -176,-1.225958,1,0,0,0,1,1 -177,.062465422,1,1,1,0,1,1 -178,-1.7623961,0,0,0,0,1,1 -179,-.12828347,1,0,1,0,1,1 -180,1.4514505,1,1,1,1,1,1 -181,-.80989766,1,0,1,0,1,1 -182,.18102278,1,1,1,1,1,1 -183,-.89957333,1,1,0,1,1,1 -184,1.1199794,1,1,0,1,1,1 -185,-.45701504,1,0,1,1,1,1 -186,.75216359,1,1,0,0,1,1 -187,-1.0642035,1,1,1,0,1,1 -188,-.297575,1,1,1,1,1,1 -189,1.432634,1,1,1,1,1,1 -190,.59969848,1,1,1,0,1,1 -191,.38591364,0,0,0,1,1,1 -192,-.17246659,0,1,0,0,1,1 -193,.024799852,1,1,1,0,1,1 -194,-.86773324,1,0,1,0,1,1 -195,-1.3454363,0,0,0,0,1,1 -196,.60606623,1,1,0,1,1,1 -197,1.3981689,1,1,1,1,1,1 -198,-.22852357,1,1,0,0,1,1 -199,-1.6954113,1,0,0,0,1,1 -200,-.48686084,0,1,1,0,1,1 diff --git a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline.do b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline.do index 2a91f8b..18b8780 100644 --- a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline.do +++ b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline.do @@ -32,8 +32,13 @@ local Nn = 100 * Scenario 1A : H_0 is TRUE +di "SCENARIO 1A - N=100" + forvalues replication = 1/1000 { - di "replication = `replication'" + if mod(`replication',10)==0 { + di "replication = `replication'" + } + di "replication = `replication'" mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -67,8 +72,12 @@ forvalues replication = 1/1000 { * Scenario 1B : H_0 is FALSE / Effect size = 0.2 - forvalues replication = 1/1000 { - di "replication = `replication'" + di "SCENARIO 1B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -101,8 +110,12 @@ forvalues replication = 1/1000 { * Scenario 1C : H_0 is FALSE / Effect size = 0.4 - forvalues replication = 1/1000 { - di "replication = `replication'" +di "SCENARIO 1C - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -140,9 +153,12 @@ forvalues replication = 1/1000 { ** Scenario 2: J = 4 items / M = 4 modalities / N=100 per group / TT=treatment variable * Scenario 2A : H_0 is TRUE + di "SCENARIO 2A - N=100" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -175,9 +191,12 @@ forvalues replication = 1/1000 { * Scenario 2B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 2B - N=100" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -209,9 +228,12 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_2B_100.csv", replace * Scenario 2C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 2C - N=100" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -249,9 +271,12 @@ forvalues replication = 1/1000 { ** Scenario 3: J = 7 items / M = 2 modalities / N=100 per group / TT=treatment variable * Scenario 3A : H_0 is TRUE +di "SCENARIO 3A - N=100" forvalues replication = 1/1000 { - di "replication = `replication'" + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -284,9 +309,12 @@ forvalues replication = 1/1000 { * Scenario 3B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 3B - N=100" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -318,9 +346,12 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_3B_100.csv", replace * Scenario 3C : H_0 is FALSE / Effect size = 0.4 +di "SCENARIO 3C - N=100" - forvalues replication = 1/1000 { - di "replication = `replication'" +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -358,9 +389,12 @@ forvalues replication = 1/1000 { ** Scenario 4: J = 7 items / M = 4 modalities / N=100 per group / TT=treatment variable * Scenario 4A : H_0 is TRUE + di "SCENARIO 4A - N=100" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -393,9 +427,12 @@ forvalues replication = 1/1000 { * Scenario 4B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 4B - N=100" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -427,9 +464,12 @@ forvalues replication = 1/1000 { export delimited using "`path'/scenario_4B_100.csv", replace * Scenario 4C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 4C - N=100" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -498,9 +538,12 @@ local Nn = 200 ** Scenario 1: J = 4 items / M = 2 modalities / N=100 per group / TT=treatment variable * Scenario 1A : H_0 is TRUE + di "SCENARIO 1A - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -533,9 +576,12 @@ local Nn = 200 * Scenario 1B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 1B - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -567,9 +613,12 @@ local Nn = 200 export delimited using "`path'/scenario_1B_200.csv", replace * Scenario 1C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 1C - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -607,9 +656,12 @@ local Nn = 200 ** Scenario 2: J = 4 items / M = 4 modalities / N=100 per group / TT=treatment variable * Scenario 2A : H_0 is TRUE + di "SCENARIO 2A - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -642,9 +694,12 @@ local Nn = 200 * Scenario 2B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 2B - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -676,9 +731,12 @@ local Nn = 200 export delimited using "`path'/scenario_2B_200.csv", replace * Scenario 2C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 2C - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -716,9 +774,12 @@ local Nn = 200 ** Scenario 3: J = 7 items / M = 2 modalities / N=100 per group / TT=treatment variable * Scenario 3A : H_0 is TRUE + di "SCENARIO 3A - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -751,9 +812,12 @@ local Nn = 200 * Scenario 3B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 3B - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -785,9 +849,12 @@ local Nn = 200 export delimited using "`path'/scenario_3B_200.csv", replace * Scenario 3C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 3C - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -825,9 +892,12 @@ local Nn = 200 ** Scenario 4: J = 7 items / M = 4 modalities / N=100 per group / TT=treatment variable * Scenario 4A : H_0 is TRUE + di "SCENARIO 4A - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -860,9 +930,12 @@ local Nn = 200 * Scenario 4B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 4B - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -894,9 +967,12 @@ local Nn = 200 export delimited using "`path'/scenario_4B_200.csv", replace * Scenario 4C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 4C - N=200" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -965,9 +1041,12 @@ local Nn = 300 ** Scenario 1: J = 4 items / M = 2 modalities / N=100 per group / TT=treatment variable * Scenario 1A : H_0 is TRUE + di "SCENARIO 1A - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -1000,9 +1079,12 @@ local Nn = 300 * Scenario 1B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 1B - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -1034,9 +1116,12 @@ local Nn = 300 export delimited using "`path'/scenario_1B_300.csv", replace * Scenario 1C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 1C - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -1074,9 +1159,12 @@ local Nn = 300 ** Scenario 2: J = 4 items / M = 4 modalities / N=100 per group / TT=treatment variable * Scenario 2A : H_0 is TRUE + di "SCENARIO 2A - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -1109,9 +1197,12 @@ local Nn = 300 * Scenario 2B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 2B - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -1143,9 +1234,12 @@ local Nn = 300 export delimited using "`path'/scenario_2B_300.csv", replace * Scenario 2C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 2C - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear qui gen TT = 0 @@ -1183,9 +1277,12 @@ local Nn = 300 ** Scenario 3: J = 7 items / M = 2 modalities / N=100 per group / TT=treatment variable * Scenario 3A : H_0 is TRUE + di "SCENARIO 3A - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -1218,9 +1315,12 @@ local Nn = 300 * Scenario 3B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 3B - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -1252,9 +1352,12 @@ local Nn = 300 export delimited using "`path'/scenario_3B_300.csv", replace * Scenario 3C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 3C - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -1292,9 +1395,12 @@ local Nn = 300 ** Scenario 4: J = 7 items / M = 4 modalities / N=100 per group / TT=treatment variable * Scenario 4A : H_0 is TRUE + di "SCENARIO 4A - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -1327,9 +1433,12 @@ local Nn = 300 * Scenario 4B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 4B - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 @@ -1361,9 +1470,12 @@ local Nn = 300 export delimited using "`path'/scenario_4B_300.csv", replace * Scenario 4C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 4C - N=300" - forvalues replication = 1/1000 { - di "replication = `replication'" + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear qui gen TT = 0 diff --git a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_100.do b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_100.do new file mode 100644 index 0000000..6ccb475 --- /dev/null +++ b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_100.do @@ -0,0 +1,501 @@ +*================================================================================================================================================= +* Date : 2024-01-04 +* Stata version : Stata 18 SE +* +* This program creates dataset without DIF for a randomized controlled trial scenario +* +* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) +* + * outputs : scenario_1,scenario_2,scenario_3,scenario_4, for N=100/200/300 +* +* +* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' +* +* +*================================================================================================================================================ + +* Load simirt.ado +adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" + +* Set data output folder path +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF" + + + +* Scenarios with : n = 100 +*========================== + +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N100" +local Nn = 100 + +** Scenario 1: J = 4 items / M = 2 modalities / N=100 per group / TT=treatment variable + +* Scenario 1A : H_0 is TRUE + +di "SCENARIO 1A - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + di "replication = `replication'" + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_1A_100.csv", replace + + + * Scenario 1B : H_0 is FALSE / Effect size = 0.2 + + di "SCENARIO 1B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_1B_100.csv", replace + +* Scenario 1C : H_0 is FALSE / Effect size = 0.4 + +di "SCENARIO 1C - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_1C_100.csv", replace + + +**------------------------------------------------------------------------------------** + + +** Scenario 2: J = 4 items / M = 4 modalities / N=100 per group / TT=treatment variable + + * Scenario 2A : H_0 is TRUE + di "SCENARIO 2A - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_2A_100.csv", replace + + + * Scenario 2B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 2B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_2B_100.csv", replace + + * Scenario 2C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 2C - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_2C_100.csv", replace + + +**------------------------------------------------------------------------------------** + + +** Scenario 3: J = 7 items / M = 2 modalities / N=100 per group / TT=treatment variable + +* Scenario 3A : H_0 is TRUE +di "SCENARIO 3A - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_3A_100.csv", replace + + + * Scenario 3B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 3B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_3B_100.csv", replace + +* Scenario 3C : H_0 is FALSE / Effect size = 0.4 +di "SCENARIO 3C - N=100" + +forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_3C_100.csv", replace + + +**------------------------------------------------------------------------------------** + + +** Scenario 4: J = 7 items / M = 4 modalities / N=100 per group / TT=treatment variable + + * Scenario 4A : H_0 is TRUE + di "SCENARIO 4A - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_4A_100.csv", replace + + + * Scenario 4B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 4B - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_4B_100.csv", replace + + * Scenario 4C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 4C - N=100" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_4C_100.csv", replace diff --git a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_200.do b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_200.do new file mode 100644 index 0000000..00f0f78 --- /dev/null +++ b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_200.do @@ -0,0 +1,494 @@ +*================================================================================================================================================= +* Date : 2024-01-04 +* Stata version : Stata 18 SE +* +* This program creates dataset without DIF for a randomized controlled trial scenario +* +* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) +* + * outputs : scenario_1,scenario_2,scenario_3,scenario_4, for N=100/200/300 +* +* +* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' +* +* +*================================================================================================================================================ + +* Load simirt.ado +adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" + +* Set data output folder path +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF" + +*========================== + +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N200" +local Nn = 200 + +** Scenario 1: J = 4 items / M = 2 modalities / N=100 per group / TT=treatment variable + + * Scenario 1A : H_0 is TRUE + di "SCENARIO 1A - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_1A_200.csv", replace + + + * Scenario 1B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 1B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_1B_200.csv", replace + + * Scenario 1C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 1C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_1C_200.csv", replace + + +**------------------------------------------------------------------------------------** + + +** Scenario 2: J = 4 items / M = 4 modalities / N=100 per group / TT=treatment variable + + * Scenario 2A : H_0 is TRUE + di "SCENARIO 2A - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_2A_200.csv", replace + + + * Scenario 2B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 2B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_2B_200.csv", replace + + * Scenario 2C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 2C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_2C_200.csv", replace + + +**------------------------------------------------------------------------------------** + + +** Scenario 3: J = 7 items / M = 2 modalities / N=100 per group / TT=treatment variable + + * Scenario 3A : H_0 is TRUE + di "SCENARIO 3A - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_3A_200.csv", replace + + + * Scenario 3B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 3B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_3B_200.csv", replace + + * Scenario 3C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 3C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_3C_200.csv", replace + + +**------------------------------------------------------------------------------------** + + +** Scenario 4: J = 7 items / M = 4 modalities / N=100 per group / TT=treatment variable + + * Scenario 4A : H_0 is TRUE + di "SCENARIO 4A - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_4A_200.csv", replace + + + * Scenario 4B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 4B - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_4B_200.csv", replace + + * Scenario 4C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 4C - N=200" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_4C_200.csv", replace diff --git a/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_300.do b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_300.do new file mode 100644 index 0000000..3cab9dd --- /dev/null +++ b/Scripts/Scenarios/NoDIF/scenarios_noDIF_baseline_300.do @@ -0,0 +1,495 @@ +*================================================================================================================================================= +* Date : 2024-01-04 +* Stata version : Stata 18 SE +* +* This program creates dataset without DIF for a randomized controlled trial scenario +* +* ado-files needed : - simirt (version 4.3 August 29, 2019, available on OSF) +* + * outputs : scenario_1,scenario_2,scenario_3,scenario_4, for N=100/200/300 +* +* +* Warning : To obtain reproduce the data obtained in the .csv files in this repository, use 'simirt_setseed.ado' instead of 'simirt.ado' +* +* +*================================================================================================================================================ + +* Load simirt.ado +adopath+"/home/corentin/Documents/These/Recherche/Simulations/Modules/" + +* Set data output folder path +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF" + +* Scenarios with : n = 300 +*========================== + +local path = "/home/corentin/Documents/These/Recherche/Simulations/Data/NoDIF/N300" +local Nn = 300 + +** Scenario 1: J = 4 items / M = 2 modalities / N=100 per group / TT=treatment variable + + * Scenario 1A : H_0 is TRUE + di "SCENARIO 1A - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_1A_300.csv", replace + + + * Scenario 1B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 1B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_1B_300.csv", replace + + * Scenario 1C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 1C - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-0.84 \ -0.25 \ 0.25 \ 0.84) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_1C_300.csv", replace + + +**------------------------------------------------------------------------------------** + + +** Scenario 2: J = 4 items / M = 4 modalities / N=100 per group / TT=treatment variable + + * Scenario 2A : H_0 is TRUE + di "SCENARIO 2A - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_2A_300.csv", replace + + + * Scenario 2B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 2B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_2B_300.csv", replace + + * Scenario 2C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 2C - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(4) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.84,-0.84,0.16 \ -1.25,-0.25,0.75 \ -0.75,0.25,1.25 \ 0.16,0.84,1.84) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(4) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_2C_300.csv", replace + + +**------------------------------------------------------------------------------------** + + +** Scenario 3: J = 7 items / M = 2 modalities / N=100 per group / TT=treatment variable + + * Scenario 3A : H_0 is TRUE + di "SCENARIO 3A - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_3A_300.csv", replace + + + * Scenario 3B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 3B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_3B_300.csv", replace + + * Scenario 3C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 3C - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-1.15 \ -0.67 \ -0.32 \ 0 \ 0.32 \ 0.67 \ 1.15) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_3C_300.csv", replace + + +**------------------------------------------------------------------------------------** + + +** Scenario 4: J = 7 items / M = 4 modalities / N=100 per group / TT=treatment variable + + * Scenario 4A : H_0 is TRUE + di "SCENARIO 4A - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_4A_300.csv", replace + + + * Scenario 4B : H_0 is FALSE / Effect size = 0.2 + di "SCENARIO 4B - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0.2) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_4B_300.csv", replace + + * Scenario 4C : H_0 is FALSE / Effect size = 0.4 + di "SCENARIO 4C - N=300" + + forvalues replication = 1/1000 { + if mod(`replication',10)==0 { + di "replication = `replication'" + } + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0) cov(1) dim(7) pcm(D) clear + qui gen TT = 0 + tempfile grp0 + qui save `grp0',replace + + mat D= (-2.15,-1.15,-0.15 \ -1.67,-0.67,0.33 \ -1.32,-0.32,0.68 \ -1,0,1 \ -0.68,0.32,1.32 \ -0.33,0.67,1.67 \ 0.15,1.15,2.15) + qui simirt, nbobs(Nn) mu(0.4) cov(1) dim(7) pcm(D) clear + qui gen TT = 1 + tempfile grp1 + qui save `grp1',replace + + clear + use `grp0' + qui append using `grp1' + drop id + qui gen id = _n + order(id) + qui gen replication = `replication' + if `replication'==1{ + tempfile data + qui save `data' + } + else{ + qui append using `data' + qui save `data',replace + } + } + export delimited using "`path'/scenario_4C_300.csv", replace