#delimit; log using glasweb.log, t replace; /* Note: this is 1 of 5 imputed datasets used in the published paper, so replication will not be exact */ use glasweb.dta; /* Table 2, Model 1 */ ologit PerEcExp FavOutcome RejectEI REI_FavOut East East_FavOut East_REI social_class East_SocClass female education income age union; /* Table 2, Model 2 */ ologit PerEcExp FavOutcome RejectEI REI_FavOut East East_FavOut East_REI social_class East_SocClass female education income age union PerEcNow; /* Table 3 probabilities */ estsimp ologit PerEcExp FavOutcome RejectEI REI_FavOut East East_FavOut East_REI social_class East_SocClass female education income age union; /* FavOut = 0, REI = 0 */ setx FavOutcome 0 RejectEI 0 REI_FavOut 0 East 0 East_FavOut 0 East_REI 0 social_class mean East_SocClass 0 female 0 education mean income mean age 50 union 0; simqi, prval(-1 0 1) genpr(Plow_00 Pmid_00 Phigh_00); replace Plow_00 = Plow_00 * 100; replace Pmid_00 = Pmid_00 * 100; replace Phigh_00 = Phigh_00 * 100; /* FavOut = 1, REI = 0 */ setx FavOutcome 1 RejectEI 0 REI_FavOut 0 East 0 East_FavOut 0 East_REI 0 social_class mean East_SocClass 0 female 0 education mean income mean age 50 union 0; simqi, prval(-1 0 1) genpr(Plow_10 Pmid_10 Phigh_10); replace Plow_10 = Plow_10 * 100; replace Pmid_10 = Pmid_10 * 100; replace Phigh_10 = Phigh_10 * 100; /* FavOut = 0, REI = 1 */ setx FavOutcome 0 RejectEI 1 REI_FavOut 0 East 0 East_FavOut 0 East_REI 0 social_class mean East_SocClass 0 female 0 education mean income mean age 50 union 0; simqi, prval(-1 0 1) genpr(Plow_01 Pmid_01 Phigh_01); replace Plow_01 = Plow_01 * 100; replace Pmid_01 = Pmid_01 * 100; replace Phigh_01 = Phigh_01 * 100; /* FavOut = 1, REI = 1 */ setx FavOutcome 1 RejectEI 1 REI_FavOut 1 East 0 East_FavOut 0 East_REI 0 social_class mean East_SocClass 0 female 0 education mean income mean age 50 union 0; simqi, prval(-1 0 1) genpr(Plow_11 Pmid_11 Phigh_11); replace Plow_11 = Plow_11* 100; replace Pmid_11 = Pmid_11* 100; replace Phigh_11 = Phigh_11* 100; generate D0_S10_low = Plow_00 - Plow_01; generate D0_S10_mid = Pmid_00 - Pmid_01; generate D0_S10_high = Phigh_00 - Phigh_01; generate D1_S10_low = Plow_10 - Plow_11; generate D1_S10_mid = Pmid_10 - Pmid_11; generate D1_S10_high = Phigh_10 - Phigh_11; generate D0_I01_low = Plow_00 - Plow_10; generate D0_I01_mid = Pmid_00 - Pmid_10; generate D0_I01_high = Phigh_00 - Phigh_10; generate D1_I01_low = Plow_01 - Plow_11; generate D1_I01_mid = Pmid_01 - Pmid_11; generate D1_I01_high = Phigh_01 - Phigh_11; generate DD_low = D0_S10_low - D1_S10_low; generate DD_mid = D0_S10_mid - D1_S10_mid; generate DD_high = D0_S10_high - D1_S10_high; summarize Plow_00 Pmid_00 Phigh_00; summarize Plow_10 Pmid_10 Phigh_10; summarize Plow_01 Pmid_01 Phigh_01; summarize Plow_11 Pmid_11 Phigh_11; summarize D0_S10_low D0_S10_mid D0_S10_high; summarize D1_S10_low D1_S10_mid D1_S10_high; summarize D0_I01_low D0_I01_mid D0_I01_high; summarize D1_I01_low D1_I01_mid D1_I01_high; summarize DD_low DD_mid DD_high;