Hello,
We are studying the peer effects of the share of girls in classrooms on mathematics test scores. In our model, we use school fixed effects and compare classrooms within schools, to control for e.g. socioeconomic variation between schools. Furthermore, we allow for heterogeneous effects by including interactions between the outcome variable (the test scores) and demographic groups (specifically: girl * girlshare; immigrant * girlshare; girl * immigrant * girlshare).
In our main model, we include school fixed effects, but do not include fixed effects/dummies for the interactions between schools and the heterogeneous effect interactions mentioned. Instead, we aim to include them in a robustness check and test for the significance of these added school-by-demography-by-score variables. How do we do this, and which interactions should we include? (As you see in the code, some interactions are component parts of other interactions.) Preferably, we would also then like to test the significance of individual interaction terms rather than only the whole set of added interactions.
We are studying the peer effects of the share of girls in classrooms on mathematics test scores. In our model, we use school fixed effects and compare classrooms within schools, to control for e.g. socioeconomic variation between schools. Furthermore, we allow for heterogeneous effects by including interactions between the outcome variable (the test scores) and demographic groups (specifically: girl * girlshare; immigrant * girlshare; girl * immigrant * girlshare).
In our main model, we include school fixed effects, but do not include fixed effects/dummies for the interactions between schools and the heterogeneous effect interactions mentioned. Instead, we aim to include them in a robustness check and test for the significance of these added school-by-demography-by-score variables. How do we do this, and which interactions should we include? (As you see in the code, some interactions are component parts of other interactions.) Preferably, we would also then like to test the significance of individual interaction terms rather than only the whole set of added interactions.
Code:
clear input float mathscore double girlshare float(intGirlShare intNewShare intGirlNewShare) double SchoolID float newlyArr double girl -.16130325 .5714285714285714 .5714286 0 0 1 0 1 -1.8561664 .6190476190476191 0 .6190476 0 1 1 0 -.3401746 .6190476190476191 0 0 0 1 0 0 -1.4119294 .5714285714285714 .5714286 0 0 1 0 1 -.06797387 .5714285714285714 .5714286 0 0 1 0 1 1.1607436 .5714285714285714 .5714286 0 0 1 0 1 .01306791 .6190476190476191 0 0 0 1 0 0 .3450717 .5714285714285714 .5714286 0 0 1 0 1 -3.188828 .5714285714285714 .5714286 0 0 1 0 1 -1.4759908 .5714285714285714 .5714286 0 0 1 0 1 .6042861 .6190476190476191 0 0 0 1 0 0 .6891549 .5714285714285714 .5714286 0 0 1 0 1 .1693752 .6190476190476191 0 0 0 1 0 0 -.07945836 .5714285714285714 .5714286 0 0 1 0 1 -.17147087 .6190476190476191 0 .6190476 0 1 1 0 .9958695 .5714285714285714 .5714286 0 0 1 0 1 .9149415 .6190476190476191 0 0 0 1 0 0 -.6679537 .5714285714285714 .5714286 0 0 1 0 1 .5013217 .6190476190476191 0 0 0 1 0 0 .11758123 .6190476190476191 0 0 0 1 0 0 .8935187 .5714285714285714 .5714286 0 0 1 0 1 -.06591168 .5714285714285714 .5714286 0 0 1 0 1 -1.259523 .3684210526315789 0 0 0 1 0 0 -1.2864072 .3157894736842105 .3157895 0 0 1 0 1 .5957668 .3684210526315789 0 0 0 1 0 0 .2100161 .3684210526315789 0 0 0 1 0 0 -.5648643 .3157894736842105 .3157895 0 0 1 0 1 -.8529068 .3684210526315789 0 0 0 1 0 0 .3019897 .3684210526315789 0 0 0 1 0 0 -1.7281017 .3157894736842105 .3157895 0 0 1 0 1 -.8380347 .3157894736842105 .3157895 0 0 1 0 1 -.2162913 .5813953488372093 .5813953 0 0 2 0 1 -.2162913 .5813953488372093 .5813953 0 0 2 0 1 -1.0756866 .6046511627906976 0 0 0 2 0 0 -1.0756866 .6046511627906976 0 0 0 2 0 0 .727842 .6046511627906976 0 0 0 2 0 0 .727842 .6046511627906976 0 0 0 2 0 0 -.6058232 .5813953488372093 .5813953 0 0 2 0 1 -.6058232 .5813953488372093 .5813953 0 0 2 0 1 1.0331 .5813953488372093 .5813953 0 0 2 0 1 1.0331 .5813953488372093 .5813953 0 0 2 0 1 .51550436 .5813953488372093 .5813953 0 0 2 0 1 .51550436 .5813953488372093 .5813953 0 0 2 0 1 .14169058 .6046511627906976 0 0 0 2 0 0 .14169058 .6046511627906976 0 0 0 2 0 0 .22233284 .6046511627906976 0 0 0 2 0 0 .22233284 .6046511627906976 0 0 0 2 0 0 .8776796 .5813953488372093 .5813953 0 0 2 0 1 .8776796 .5813953488372093 .5813953 0 0 2 0 1 .7596178 .6046511627906976 0 0 0 2 0 0 .7596178 .6046511627906976 0 0 0 2 0 0 1.329355 .6046511627906976 0 0 0 2 0 0 1.329355 .6046511627906976 0 0 0 2 0 0 .24859844 .5813953488372093 .5813953 0 0 2 0 1 .24859844 .5813953488372093 .5813953 0 0 2 0 1 .28471455 .5813953488372093 .5813953 0 0 2 0 1 .28471455 .5813953488372093 .5813953 0 0 2 0 1 .6089274 .6046511627906976 0 0 0 2 0 0 .6089274 .6046511627906976 0 0 0 2 0 0 .8943321 .5813953488372093 .5813953 0 0 2 0 1 .8943321 .5813953488372093 .5813953 0 0 2 0 1 -.1875581 .6 .6 0 0 2 0 1 -1.0971143 .6 .6 0 0 2 0 1 1.954816 .65 0 0 0 2 0 0 -.4486425 .6 .6 0 0 2 0 1 .25757462 .6 .6 0 0 2 0 1 .3058077 .6 .6 0 0 2 0 1 .4133211 .6 .6 0 0 2 0 1 -.006400176 .65 0 0 0 2 0 0 .899845 .6 .6 0 0 2 0 1 1.1249338 .6 .6 0 0 2 0 1 1.2374424 .65 0 0 0 2 0 0 .7273457 .6 .6 0 0 2 0 1 .5862164 .65 0 0 0 2 0 0 end label values SchoolID IDSCHOOL label values newlyArr newlyArr label def newlyArr 0 "No", modify label def newlyArr 1 "Yes", modify label values girl girl label def girl 0 "Male", modify label def girl 1 "Female", modify quietly reg mathscore girlshare intGirlShare intNewShare intGirlNewShare SchoolID#girl#newlyArr SchoolID#girl#c.girlshare SchoolID#newlyArr#c.girlshare SchoolID#girl#newlyArr#c.girlshare, cluster(SchoolID) testparm SchoolID#girl#newlyArr SchoolID#girl#c.girlshare SchoolID#newlyArr#c.girlshare SchoolID#girl#newlyArr#c.girlshare
Comment