{smcl}
{com}{sf}{ul off}{txt}
{com}. 
. **** REPLICATION OF FIGURE B4 ****
. 
. clear all
{res}{txt}
{com}. set mem 2g
{txt}{bf:set memory} ignored.
{p 4 4 2}
Memory no longer
needs to be set in modern Statas;
memory adjustments are performed on the fly
automatically.
{p_end}

{com}. set more off
{txt}
{com}. 
. /*      
>         OUTLINE
>         1. DESCRIPTIVE GRAPHS
> */
. 
. *********************************
. ***** 1. DESCRIPTIVE GRAPHS *****
. *********************************
. 
. // Import candidate data
. 
. use $data\EEREV-D-21-00004_Data_Parties.dta, clear
{txt}
{com}. 
. // Anti-elite CHES and Negative mentions
. 
. preserve
{txt}
{com}. 
. drop if ael==.
{txt}(163 observations deleted)

{com}. reg ael neg, cluster(party)

{txt}Linear regression                               Number of obs     = {res}        17
                                                {txt}F(1, 16)          =  {res}    29.66
                                                {txt}Prob > F          = {res}    0.0001
                                                {txt}R-squared         = {res}    0.6491
                                                {txt}Root MSE          =    {res} 1.4593

{txt}{ralign 78:(Std. err. adjusted for {res:17} clusters in party_annee)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}         ael{col 14}{c |} Coefficient{col 26}  std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}neg {c |}{col 14}{res}{space 2} .7473684{col 26}{space 2} .1372347{col 37}{space 1}    5.45{col 46}{space 3}0.000{col 54}{space 4} .4564438{col 67}{space 3} 1.038293
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 3.218646{col 26}{space 2} .5391365{col 37}{space 1}    5.97{col 46}{space 3}0.000{col 54}{space 4} 2.075727{col 67}{space 3} 4.361564
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. matrix b=e(b)
{txt}
{com}. scalar b1_neg=b[1,1]
{txt}
{com}. scalar cons_neg=b[1,2]
{txt}
{com}. 
. twoway ///
>         (scatter ael neg, mlabel(party_annee) mlabsize(vsmall) mlabcolor(navy)) /// 
>         (lfit ael neg, lp(dash) lcolor(maroon) range(-.8 8.8)), ///
>         ytitle("Antielite salience index (CHES)", margin(vsmall)) ylabel(0(5)10, angle(0) format(%5.0f)) xlabel(0(4)8, format(%5.0f)) yscale(r(-1 11)) xscale(r(-.8 8.8)) /// 
>         xtitle("Share of negative quasi-sentences (CMP)", margin(small)) ///
>         legend(off) graphregion(color(white)) name(ael, replace)
{res}{txt}
{com}. 
. restore
{txt}
{com}. 
. // LR CHES and Negative mentions
. 
. preserve
{txt}
{com}. 
. drop if lrg==.
{txt}(145 observations deleted)

{com}. 
. g lrg2=lrg*lrg
{txt}
{com}. reg neg lrg lrg2, cluster(party)

{txt}Linear regression                               Number of obs     = {res}        35
                                                {txt}F(2, 34)          =  {res}    10.16
                                                {txt}Prob > F          = {res}    0.0003
                                                {txt}R-squared         = {res}    0.6072
                                                {txt}Root MSE          =    {res}  2.305

{txt}{ralign 78:(Std. err. adjusted for {res:35} clusters in party_annee)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}         neg{col 14}{c |} Coefficient{col 26}  std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}lrg {c |}{col 14}{res}{space 2}-3.475344{col 26}{space 2} .7912761{col 37}{space 1}   -4.39{col 46}{space 3}0.000{col 54}{space 4}-5.083411{col 67}{space 3}-1.867278
{txt}{space 8}lrg2 {c |}{col 14}{res}{space 2}  .360942{col 26}{space 2} .0800623{col 37}{space 1}    4.51{col 46}{space 3}0.000{col 54}{space 4} .1982359{col 67}{space 3} .5236481
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 8.662879{col 26}{space 2} 1.807281{col 37}{space 1}    4.79{col 46}{space 3}0.000{col 54}{space 4} 4.990042{col 67}{space 3} 12.33572
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. matrix b=e(b)
{txt}
{com}. scalar b1_neg=b[1,1]
{txt}
{com}. scalar b2_neg=b[1,2]
{txt}
{com}. scalar cons_neg=b[1,3]
{txt}
{com}. 
. twoway ///
>         (scatter neg lrg, mlabel(party_annee) mlabsize(vsmall) mlabcolor(navy)) ///     
>         (function y=cons_neg+b1_neg*x+b2_neg*x^2, lp(dash) lcolor(maroon) range(-1 11)), ///
>         ytitle("Share of negative quasi-sentences (CMP)", margin(vsmall)) ylabel(0(10)20, angle(0) format(%5.0f)) xlabel(0(5)10, format(%5.0f)) yscale(r(-2 22)) xscale(r(-1 11)) /// 
>         xtitle("Left-Right Index (CHES)", margin(small)) ///
>         legend(off) graphregion(color(white)) name(lrgen, replace)
{res}{txt}
{com}. 
. restore
{txt}
{com}. 
. // Combine graphs
. 
. graph combine ael lrgen ///
>         , c(2) graphregion(color(white)) imargin(vsmall)
{res}{txt}
{com}. graph export "$results\\$program.png", replace width(7200) height(3000)
{txt}{p 0 4 2}
file {bf}
D:\Dropbox\SVLACHOS\Research\Malgre_nous\Replication_files\Results\EEREV-D-21-00004_FigureB4.png{rm}
saved as
PNG
format
{p_end}

{com}. 
. cap log close
{smcl}
{com}{sf}{ul off}