**** DATA ANALYSIS for jpsa19 paper *********** **** Yoshitaka Nishizawa 190909 *********** ssc install ciplot ssc install coefplot, replace ssc install full_palette ssc install combomarginsplot log using "*************", text replace use "190820 HS19 dataset v3 FINAL.dta", clear /* The data set currently being prepared for the general public */ numlabel, add **** 1. recodeing mediator variables ** gen offended=q10_1m gen harmDign=q10_2m gen unfairAc=q10_3m gen makeSocW=q10_4m recode offended harmDign (1=1)(2=.75)(3=.5)(4=.25)(5=0)(6=.) recode unfairAc makeSocW (1=0)(2=.25)(3=.5)(4=.75)(5=1)(6=.) *tab q10_1m offended *** 2. considering moderator varialbes ***** ** Free Speech Important ** *tab q7_3 gen freeSpeech=q7_3 recode freeSpeech (1=0)(2=.33)(3=.67)(4=1)(5=.) *tab q7_3 freeSpeech ** Ideology ** *tab q18_1 gen ideology=q18_1 ** Gender ** *tab f1_sex gen female=. replace female=0 if f1_sex==1 replace female=1 if f1_sex==2 *tab female f1_sex ** Age ** *tab f2_age gen age=f2_age *tab age gen age5=age recode age5 (20/29=2)(30/39=3)(40/49=4)(50/59=5)(60/69=6) *** 3. screening panel samples *** keep if panel_type==3 | panel_type==4 ********************************************************* *** Table 1: Basic Statistics for Key Veriables ********** ** Target panel ** tab exp_D sort exp_D by exp_D: summarize q11m ** Gender panel ** tab female sort female by female: summarize q11m ** Age groups panel ** tab age5 sort age5 by age5: summarize q11m ** Ideology panel ** tab ideology sort ideology by ideology: summarize q11m ** Freespeech panel ** tab freeSpeech sort freeSpeech by freeSpeech: summarize q11m ** Figure 1: Support for Regulating HS by Target Groups *** ciplot q11m, by(exp_D) ylabel(3(.25)4) graphregion(color(white)) graph export fig01.pdf, replace *** Table 2, Figures 4 & 5: Support for Regulating HS-Reguression, Offensiveness **** ** For Zainichi ** reg q11m i.exp_grp offended ideology freeSpeech female age if exp_K==1 coefplot, drop(_cons) xline(0, lpattern(dash) lwidth(thin)) graphregion(color(white)) /// note("Base category: K-Control") title("Group: Zainichi") /// name(model_Ko, replace) margins, at(offended=(0(.01)1)) atmeans saving(Ko, replace) marginsplot, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) graphregion(color(white)) ** For Challenged **** reg q11m i.exp_grp offended ideology freeSpeech female age if exp_D==1 coefplot, drop(_cons) xline(0, lpattern(dash) lwidth(thin)) graphregion(color(white)) /// note("Base category: D-Control") title("Group: Challenged") /// name(model_Do, replace) margins, at(offended=(0(.01)1)) atmeans saving(Do, replace) marginsplot, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) graphregion(color(white)) ** Combining above 2 coeffplots, and export **** graph combine model_Ko model_Do, col(1) xcommon imargin(small) title("") /// graphregion(color(white)) graph export fig04.pdf, replace ** Combining above 2 marginplots, and export **** combomarginsplot Ko Do, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) /// legend(order (1 "Against Zainichi" 2 "Against Challenged")) title("") graphregion(color(white)) graph export fig05.pdf, replace *** Table 3, Figures 6 & 7: Support for Regulating HS-Reguression, Harm Dignity **** ** For Zainichi ** reg q11m i.exp_grp harmDign ideology freeSpeech female age if exp_K==1 coefplot, drop(_cons) xline(0, lpattern(dash) lwidth(thin)) graphregion(color(white)) /// note("Base category: K-Control") title("Group: Zainichi") /// name(model_Kh, replace) margins, at(harmDign=(0(.01)1)) atmeans saving(Kh, replace) marginsplot, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) graphregion(color(white)) ** For Challenged **** reg q11m i.exp_grp harmDign ideology freeSpeech female age if exp_D==1 coefplot, drop(_cons) xline(0, lpattern(dash) lwidth(thin)) graphregion(color(white)) /// note("Base category: D-Control") title("Group: Challenged") /// name(model_Dh, replace) margins, at(harmDign=(0(.01)1)) atmeans saving(Dh, replace) marginsplot, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) graphregion(color(white)) ** Combining above 2 coeffplots, and export **** graph combine model_Kh model_Dh, col(1) xcommon imargin(small) title("") /// graphregion(color(white)) graph export fig06.pdf, replace ** Combining above 2 marginplots, and export **** combomarginsplot Kh Dh, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) /// legend(order (1 "Against Zainichi" 2 "Against Challenged")) title("") graphregion(color(white)) graph export fig07.pdf, replace *** Table 4, Figures 8 & 9: Support for Regulating HS-Reguression, Unfairness **** ** For Zainichi ** reg q11m i.exp_grp unfairAc ideology freeSpeech female age if exp_K==1 coefplot, drop(_cons) xline(0, lpattern(dash) lwidth(thin)) graphregion(color(white)) /// note("Base category: K-Control") title("Group: Zainichi") /// name(model_Ku, replace) margins, at(unfairAc=(0(.01)1)) atmeans saving(Ku, replace) marginsplot, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) graphregion(color(white)) ** For Challenged **** reg q11m i.exp_grp unfairAc ideology freeSpeech female age if exp_D==1 coefplot, drop(_cons) xline(0, lpattern(dash) lwidth(thin)) graphregion(color(white)) /// note("Base category: D-Control") title("Group: Challenged") /// name(model_Du, replace) margins, at(unfairAc=(0(.01)1)) atmeans saving(Du, replace) marginsplot, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) graphregion(color(white)) ** Combining above 2 coeffplots, and export **** graph combine model_Ku model_Du, col(1) xcommon imargin(small) title("") /// graphregion(color(white)) graph export fig08.pdf, replace ** Combining above 2 marginplots, and export **** combomarginsplot Ku Du, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) /// legend(order (1 "Against Zainichi" 2 "Against Challenged")) title("") graphregion(color(white)) graph export fig09.pdf, replace *** Table 5, Figures 10 & 11: Support for Regulating HS-Reguression, Makes Society Worse **** ** For Zainichi ** reg q11m i.exp_grp makeSocW ideology freeSpeech female age if exp_K==1 coefplot, drop(_cons) xline(0, lpattern(dash) lwidth(thin)) graphregion(color(white)) /// note("Base category: K-Control") title("Group: Zainichi") /// name(model_Km, replace) margins, at(makeSocW=(0(.01)1)) atmeans saving(Km, replace) marginsplot, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) graphregion(color(white)) ** For Challenged **** reg q11m i.exp_grp makeSocW ideology freeSpeech female age if exp_D==1 coefplot, drop(_cons) xline(0, lpattern(dash) lwidth(thin)) graphregion(color(white)) /// note("Base category: D-Control") title("Group: Challenged") /// name(model_Dm, replace) margins, at(makeSocW=(0(.01)1)) atmeans saving(Dm, replace) marginsplot, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) graphregion(color(white)) ** Combining above 2 coeffplots, and export **** graph combine model_Km model_Dm, col(1) xcommon imargin(small) title("") /// graphregion(color(white)) graph export fig10.pdf, replace ** Combining above 2 marginplots, and export **** combomarginsplot Km Dm, xlabel(0(.25)1) recast(line) recastci(rarea) /// yscale(range(0 6)) ylabel(0(1)6, grid) /// legend(order (1 "Against Zainichi" 2 "Against Challenged")) title("") /// graphregion(color(white)) graph export fig11.pdf, replace ********************************************************* *** Extra: Checking against BIDR-J ***************************** *** BIDR-J as a moderator variable *** *** Last update: September 4, 2019 *** *** by Go Murakami *** /* This do file creates and examines BIDR-J as a moderator variable */ /* Recode */ *tab1 q4_*, m recode q4_* (8=.), gen(q4_bidr1 q4_bidr2 q4_bidr3 q4_bidr4 q4_bidr5 /// q4_bidr6 q4_bidr7 q4_bidr8 q4_bidr9 q4_bidr10 q4_bidr11 q4_bidr12) recode q4_bidr1 q4_bidr2 q4_bidr3 q4_bidr5 q4_bidr6 q4_bidr8 q4_bidr10 q4_bidr12 /// (1=7) (2=6) (3=5) (4=4) (5=3) (6=2) (7=1) /* Note 1: In Tani (2008: 21) and the original Paulhus (1991: 40-41), the following questions are set as reversed items: #1, 2, 3, 5, 6, 8, 10, and 12. See that the answer options are, "1. Not true at all" to "7. Very true." For example, the response to the first item (q4_bidr1), "There have been occasions when I have taken advantage of someone." needs to be reversed, so that the positive points mean more biased towards giving socially desirable (impression management) response. */ /* Confirmatory factor analysis and latent score */ sem(BIDR11 -> q4_bidr1-q4_bidr11) sem, stand estat gof, stats(all) predict BIDR11_l, latent(BIDR11) alpha q4_bidr1-q4_bidr11, item notes BIDR11_l: RMSEA=.08, CFI=.826, alpha=.742 label variable BIDR11_l "q4: Latent BIDR (factor score) using 11 items" *** *** *** Code by Go Murakami ends here *** *** *** *** Regression analysis ** ** offended ************************************************************* ** For Zainichi **** reg q11m i.exp_grp offended ideology freeSpeech female age BIDR11_l if exp_K==1 **** For Challenged **** reg q11m i.exp_grp offended ideology freeSpeech female age BIDR11_l if exp_D==1 ** harmDign ************************************************************* ** For Zainichi **** reg q11m i.exp_grp harmDign ideology freeSpeech female age BIDR11_l if exp_K==1 ** For Challenged **** reg q11m i.exp_grp harmDign ideology freeSpeech female age BIDR11_l if exp_D==1 ** unfairAc ************************************************************* ** For Zainichi **** reg q11m i.exp_grp unfairAc ideology freeSpeech female age BIDR11_l if exp_K==1 ** For Challenged **** reg q11m i.exp_grp unfairAc ideology freeSpeech female age BIDR11_l if exp_D==1 ** makeSocW ************************************************************* ** For Zainichi **** reg q11m i.exp_grp makeSocW ideology freeSpeech female age BIDR11_l if exp_K==1 ** For Challenged **** reg q11m i.exp_grp makeSocW ideology freeSpeech female age BIDR11_l if exp_D==1 log close *** end of file ************************************************