{smcl}
{txt}{sf}{ul off}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}E:\data\EU_SUPPORT_EUP.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 1 Apr 2017, 13:09:12
{txt}
{com}. 
. *Table 1. Partisan support for European integration by states.
. 
. use EU_SUPPORT, clear
{txt}(EU SUPPORT)

{com}. ssc install latab
{txt}checking {hilite:latab} consistency and verifying not already installed...
all files already exist and are up to date.

{com}. latabstat i102pos_pc, statistics(n mean sd min max median) by(ecoden) f(%9.2f) tf(table1) caption(Partisan support for European integration by states)

{txt}\begin{c -(}table{c )-}[htbp]\centering
\caption{c -(}\label{c -(}{c )-} 
\textbf{c -(}Partisan support for European integration by states{c )-} {c )-}\begin{c -(}tabular{c )-} {c -(}@{c -(}{c )-} l r r r r r r @{c -(}{c )-}{c )-} \\ \hline
\textbf{c -(}        ecoden {c )-} & \textbf{c -(}         N{c )-} & \textbf{c -(}      mean{c )-} & \textbf{c -(}        sd{c )-} & \textbf{c -(}       min{c )-} & \textbf{c -(}       max{c )-} & \textbf{c -(}       p50{c )-} \\
\hline
       {res}Belgium  &     362.00 &       2.84 &       1.35 &      -0.32 &       5.53 &       3.04 \\
        France  &     183.00 &       1.39 &       1.66 &      -2.20 &       4.20 &       1.95 \\
       Germany  &     153.00 &       2.38 &       1.25 &       0.00 &       4.83 &       2.56 \\
         Italy  &     330.00 &       2.02 &       1.87 &      -2.56 &       5.94 &       1.95 \\
    Luxembourg  &     182.00 &       1.19 &       2.55 &      -3.66 &       5.07 &       1.67 \\
   Netherlands  &     224.00 &       2.13 &       1.89 &      -4.29 &       5.03 &       2.36 \\
       Denmark  &     290.00 &       0.01 &       1.72 &      -4.11 &       4.53 &       0.00 \\
       Ireland  &     185.00 &       0.82 &       1.80 &      -2.66 &       4.23 &       0.97 \\
United Kingdom  &     184.00 &       1.36 &       1.68 &      -4.20 &       4.81 &       1.10 \\
        Greece  &     121.00 &       0.80 &       2.71 &      -4.47 &       4.72 &       1.10 \\
      Portugal  &     153.00 &       1.03 &       2.21 &      -4.08 &       5.62 &       0.43 \\
         Spain  &     268.00 &       2.60 &       2.10 &      -3.56 &       5.96 &       2.94 \\
       Austria  &      83.00 &       1.81 &       2.10 &      -2.04 &       5.37 &       2.23 \\
       Finland  &     149.00 &       0.50 &       1.63 &      -4.86 &       3.43 &       0.00 \\
        Sweden  &     128.00 &       0.92 &       2.51 &      -3.14 &       4.17 &       1.95 \\
        Cyprus  &      36.00 &       3.52 &       0.71 &       2.55 &       4.47 &       3.54 \\
Czech Republic  &      43.00 &       2.13 &       1.61 &      -0.76 &       4.37 &       1.95 \\
       Estonia  &      52.00 &       2.91 &       0.68 &       1.95 &       4.14 &       2.64 \\
       Hungary  &      42.00 &       2.82 &       1.44 &      -1.01 &       4.99 &       2.94 \\
        Latvia  &      57.00 &       1.53 &       0.58 &       1.10 &       3.04 &       1.61 \\
     Lithuania  &      83.00 &       2.06 &       1.52 &      -0.90 &       5.44 &       1.95 \\
         Malta  &      18.00 &       1.34 &       2.28 &      -0.88 &       3.56 &       1.34 \\
        Poland  &      53.00 &       1.15 &       2.28 &      -3.22 &       4.78 &       1.10 \\
      Slovakia  &      59.00 &       3.13 &       1.57 &      -2.51 &       4.93 &       3.71 \\
      Slovenia  &      64.00 &       2.35 &       1.87 &      -1.95 &       4.65 &       2.71 \\
      Bulgaria  &      39.00 &       1.31 &       1.51 &      -1.61 &       3.22 &       1.10 \\
       Romania  &      29.00 &       2.34 &       0.92 &       1.10 &       4.34 &       2.71 \\
         Total  &    3570.00 &       1.68 &       2.04 &      -4.86 &       5.96 &       1.95 \\
{txt}\hline
\multicolumn{c -(}7{c )-}{c -(}@{c -(}{c )-}l{c )-}{c -(}\footnotesize{c -(}\emph{c -(}Source:{c )-} EU_SUPPORT.dta{c )-}{c )-}
\end{c -(}tabular{c )-}
\end{c -(}table{c )-}

{com}The table has been written to the file:table1.tex
{txt}
{com}. 
. *Figure 1. EU legislation 1979-2012.
. 
. use EU_LEGISLATION, clear
{txt}(EU LEGISLATION)

{com}. collapse (sum) all political bureaucratic parliamentary executive decentral central, by(year)
{txt}
{com}. line all political bureaucratic parliamentary executive decentral central year, xlabel(1979(1)2012)
{res}{txt}
{com}. graph save Graph figure1
{res}{txt}(file figure1.gph saved)

{com}. 
. *Table 2. Results of multilevel analyses.
. 
. use EU_SUPPORT, clear
{txt}(EU SUPPORT)

{com}. ssc install estout
{txt}checking {hilite:estout} consistency and verifying not already installed...
all files already exist and are up to date.

{com}. mixed i102pos_pc lr_pc_l_agg2 gov_agg_2 partysize EU_salience divisiveness, noconstant || ecoden: year, covariance(unstructured)
{res}
{txt}Performing EM optimization: 
{res}
{txt}Performing gradient-based optimization: 
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-6835.6826}  
{res}{txt}Iteration 1:{space 3}log likelihood = {res:-6835.6826}  
{res}
{txt}Computing standard errors:
{res}
{txt}Mixed-effects ML regression{col 49}Number of obs{col 67}={col 69}{res}     3,570
{txt}Group variable: {res}ecoden{col 49}{txt}Number of groups{col 67}={col 69}{res}        27

{txt}{col 49}Obs per group:
{col 63}min{col 67}={col 69}{res}        18
{txt}{col 63}avg{col 67}={col 69}{res}     132.2
{txt}{col 63}max{col 67}={col 69}{res}       362

{col 49}{txt}Wald chi2({res}5{txt}){col 67}={col 70}{res}  1009.03
{txt}Log likelihood = {res}-6835.6826{col 49}{txt}Prob > chi2{col 67}={col 73}{res}0.0000

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}  i102pos_pc{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
lr_pc_l_agg2 {c |}{col 14}{res}{space 2} -.646472{col 26}{space 2} .0498585{col 37}{space 1}  -12.97{col 46}{space 3}0.000{col 54}{space 4}-.7441929{col 67}{space 3}-.5487511
{txt}{space 3}gov_agg_2 {c |}{col 14}{res}{space 2} 1.109664{col 26}{space 2} .0885968{col 37}{space 1}   12.52{col 46}{space 3}0.000{col 54}{space 4} .9360178{col 67}{space 3} 1.283311
{txt}{space 3}partysize {c |}{col 14}{res}{space 2} .0274178{col 26}{space 2} .0021942{col 37}{space 1}   12.50{col 46}{space 3}0.000{col 54}{space 4} .0231171{col 67}{space 3} .0317184
{txt}{space 1}EU_salience {c |}{col 14}{res}{space 2} .0565265{col 26}{space 2} .0058496{col 37}{space 1}    9.66{col 46}{space 3}0.000{col 54}{space 4} .0450615{col 67}{space 3} .0679914
{txt}divisiveness {c |}{col 14}{res}{space 2}-.8228316{col 26}{space 2} .1073788{col 37}{space 1}   -7.66{col 46}{space 3}0.000{col 54}{space 4} -1.03329{col 67}{space 3}-.6123729
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{hline 29}{c TT}{hline 48}
{col 3}Random-effects Parameters{col 30}{c |}{col 34}Estimate{col 45}Std. Err.{col 59}[95% Conf. Interval]
{hline 29}{c +}{hline 48}
{res}ecoden{txt}: Unstructured{col 30}{c |}
{col 20}var(year){col 30}{c |}{res}{col 33} .0018218{col 44} .0008062{col 58} .0007652{col 70} .0043371
{txt}{col 19}var(_cons){col 30}{c |}{res}{col 33} 2.830713{col 44} 1.011938{col 58} 1.404766{col 70} 5.704109
{txt}{col 14}cov(year,_cons){col 30}{c |}{res}{col 33}-.0260672{col 44} .0219453{col 58}-.0690793{col 70} .0169448
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 2.575976{col 44} .0614239{col 58} 2.458357{col 70} 2.699222
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}chi2({res}3{txt}) = {res}1118.15{col 59}{txt}Prob > chi2 ={col 73}{res}0.0000

{txt}{p 0 6 4}Note: {help j_mixedlr##|_new:LR test is conservative} and provided only for reference.{p_end}

{com}. estimates store m1
{txt}
{com}. mixed i102pos_pc lr_pc_l_agg2 gov_agg_2 sec_share_agg2 ep_share_agg2 dir_share_agg2 lr_pc_l_agg2_sec_share_agg2 lr_pc_l_agg2_ep_share_agg2 lr_pc_l_agg2_dir_share_agg2 gov_agg_2_sec_share_agg2 gov_agg_2_ep_share_agg2 gov_agg_2_dir_share_agg2 partysize EU_salience divisiveness, noconstant || ecoden: year, covariance(unstructured)
{res}
{txt}Performing EM optimization: 
{res}
{txt}Performing gradient-based optimization: 
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-6796.1951}  
{res}{txt}Iteration 1:{space 3}log likelihood = {res:-6796.1951}  
{res}
{txt}Computing standard errors:
{res}
{txt}Mixed-effects ML regression{col 49}Number of obs{col 67}={col 69}{res}     3,570
{txt}Group variable: {res}ecoden{col 49}{txt}Number of groups{col 67}={col 69}{res}        27

{txt}{col 49}Obs per group:
{col 63}min{col 67}={col 69}{res}        18
{txt}{col 63}avg{col 67}={col 69}{res}     132.2
{txt}{col 63}max{col 67}={col 69}{res}       362

{col 49}{txt}Wald chi2({res}14{txt}){col 67}={col 70}{res}  1173.81
{txt}Log likelihood = {res}-6796.1951{col 49}{txt}Prob > chi2{col 67}={col 73}{res}0.0000

{txt}{hline 28}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                 i102pos_pc{col 29}{c |}      Coef.{col 41}   Std. Err.{col 53}      z{col 61}   P>|z|{col 69}     [95% Con{col 82}f. Interval]
{hline 28}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 15}lr_pc_l_agg2 {c |}{col 29}{res}{space 2}-.9889539{col 41}{space 2} .2093072{col 52}{space 1}   -4.72{col 61}{space 3}0.000{col 69}{space 4}-1.399188{col 82}{space 3}-.5787194
{txt}{space 18}gov_agg_2 {c |}{col 29}{res}{space 2} 2.667124{col 41}{space 2} .3816765{col 52}{space 1}    6.99{col 61}{space 3}0.000{col 69}{space 4} 1.919051{col 82}{space 3} 3.415196
{txt}{space 13}sec_share_agg2 {c |}{col 29}{res}{space 2} .0728606{col 41}{space 2} .0187429{col 52}{space 1}    3.89{col 61}{space 3}0.000{col 69}{space 4} .0361252{col 82}{space 3} .1095961
{txt}{space 14}ep_share_agg2 {c |}{col 29}{res}{space 2} .0775556{col 41}{space 2} .0678205{col 52}{space 1}    1.14{col 61}{space 3}0.253{col 69}{space 4}-.0553702{col 82}{space 3} .2104813
{txt}{space 13}dir_share_agg2 {c |}{col 29}{res}{space 2}-.1374657{col 41}{space 2} .1348779{col 52}{space 1}   -1.02{col 61}{space 3}0.308{col 69}{space 4}-.4018216{col 82}{space 3} .1268902
{txt}lr_pc_l_agg2_sec_share_agg2 {c |}{col 29}{res}{space 2}-.0240186{col 41}{space 2} .0140636{col 52}{space 1}   -1.71{col 61}{space 3}0.088{col 69}{space 4}-.0515828{col 82}{space 3} .0035456
{txt}{space 1}lr_pc_l_agg2_ep_share_agg2 {c |}{col 29}{res}{space 2} .0272835{col 41}{space 2} .0476364{col 52}{space 1}    0.57{col 61}{space 3}0.567{col 69}{space 4} -.066082{col 82}{space 3} .1206491
{txt}lr_pc_l_agg2_dir_share_agg2 {c |}{col 29}{res}{space 2} .2513988{col 41}{space 2} .1079595{col 52}{space 1}    2.33{col 61}{space 3}0.020{col 69}{space 4} .0398021{col 82}{space 3} .4629954
{txt}{space 3}gov_agg_2_sec_share_agg2 {c |}{col 29}{res}{space 2}-.0846726{col 41}{space 2}  .025175{col 52}{space 1}   -3.36{col 61}{space 3}0.001{col 69}{space 4}-.1340146{col 82}{space 3}-.0353306
{txt}{space 4}gov_agg_2_ep_share_agg2 {c |}{col 29}{res}{space 2}-.3785375{col 41}{space 2} .0842691{col 52}{space 1}   -4.49{col 61}{space 3}0.000{col 69}{space 4}-.5437018{col 82}{space 3}-.2133732
{txt}{space 3}gov_agg_2_dir_share_agg2 {c |}{col 29}{res}{space 2} .2704806{col 41}{space 2} .1974444{col 52}{space 1}    1.37{col 61}{space 3}0.171{col 69}{space 4}-.1165034{col 82}{space 3} .6574646
{txt}{space 18}partysize {c |}{col 29}{res}{space 2} .0240629{col 41}{space 2} .0022769{col 52}{space 1}   10.57{col 61}{space 3}0.000{col 69}{space 4} .0196002{col 82}{space 3} .0285256
{txt}{space 16}EU_salience {c |}{col 29}{res}{space 2} .0586185{col 41}{space 2}  .005872{col 52}{space 1}    9.98{col 61}{space 3}0.000{col 69}{space 4} .0471096{col 82}{space 3} .0701274
{txt}{space 15}divisiveness {c |}{col 29}{res}{space 2} -.802527{col 41}{space 2} .1070378{col 52}{space 1}   -7.50{col 61}{space 3}0.000{col 69}{space 4}-1.012317{col 82}{space 3}-.5927368
{txt}{hline 28}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{hline 29}{c TT}{hline 48}
{col 3}Random-effects Parameters{col 30}{c |}{col 34}Estimate{col 45}Std. Err.{col 59}[95% Conf. Interval]
{hline 29}{c +}{hline 48}
{res}ecoden{txt}: Unstructured{col 30}{c |}
{col 20}var(year){col 30}{c |}{res}{col 33} .0021241{col 44} .0009234{col 58}  .000906{col 70} .0049798
{txt}{col 19}var(_cons){col 30}{c |}{res}{col 33} 2.149295{col 44} .9200503{col 58} .9287983{col 70} 4.973596
{txt}{col 14}cov(year,_cons){col 30}{c |}{res}{col 33}-.0558059{col 44}  .027558{col 58}-.1098186{col 70}-.0017932
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33}  2.54225{col 44} .0607077{col 58} 2.426007{col 70} 2.664063
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}chi2({res}3{txt}) = {res}892.99{col 59}{txt}Prob > chi2 ={col 73}{res}0.0000

{txt}{p 0 6 4}Note: {help j_mixedlr##|_new:LR test is conservative} and provided only for reference.{p_end}

{com}. estimates store m2
{txt}
{com}. mixed i102pos_pc lr_pc_l_agg2 gov_agg_2 sec_share_agg2 ep_share_agg2 dir_share_agg2 lr_pc_l_agg2_sec_share_agg2 lr_pc_l_agg2_ep_share_agg2 lr_pc_l_agg2_dir_share_agg2 gov_agg_2_sec_share_agg2 gov_agg_2_ep_share_agg2 gov_agg_2_dir_share_agg2 eu_fam1 eu_fam2 eu_fam3 eu_fam4 eu_fam5 eu_fam6 eu_fam7 eu_fam8 eu_fam10 eb_sup w_va obb_gni_calc trade_exp partysize EU_salience divisiveness, noconstant || ecoden: year, covariance(unstructured)
{res}
{txt}Performing EM optimization: 
{res}
{txt}Performing gradient-based optimization: 
{res}
{txt}Iteration 0:{space 3}log likelihood = {res: -6519.169}  
{res}{txt}Iteration 1:{space 3}log likelihood = {res: -6519.169}  
{res}
{txt}Computing standard errors:
{res}
{txt}Mixed-effects ML regression{col 49}Number of obs{col 67}={col 69}{res}     3,570
{txt}Group variable: {res}ecoden{col 49}{txt}Number of groups{col 67}={col 69}{res}        27

{txt}{col 49}Obs per group:
{col 63}min{col 67}={col 69}{res}        18
{txt}{col 63}avg{col 67}={col 69}{res}     132.2
{txt}{col 63}max{col 67}={col 69}{res}       362

{col 49}{txt}Wald chi2({res}27{txt}){col 67}={col 70}{res}  2022.76
{txt}Log likelihood = {res} -6519.169{col 49}{txt}Prob > chi2{col 67}={col 73}{res}0.0000

{txt}{hline 28}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                 i102pos_pc{col 29}{c |}      Coef.{col 41}   Std. Err.{col 53}      z{col 61}   P>|z|{col 69}     [95% Con{col 82}f. Interval]
{hline 28}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 15}lr_pc_l_agg2 {c |}{col 29}{res}{space 2}-1.508394{col 41}{space 2}  .260792{col 52}{space 1}   -5.78{col 61}{space 3}0.000{col 69}{space 4}-2.019537{col 82}{space 3}-.9972513
{txt}{space 18}gov_agg_2 {c |}{col 29}{res}{space 2} 1.206351{col 41}{space 2} .3793353{col 52}{space 1}    3.18{col 61}{space 3}0.001{col 69}{space 4} .4628674{col 82}{space 3} 1.949835
{txt}{space 13}sec_share_agg2 {c |}{col 29}{res}{space 2} .0516224{col 41}{space 2} .0183852{col 52}{space 1}    2.81{col 61}{space 3}0.005{col 69}{space 4} .0155881{col 82}{space 3} .0876566
{txt}{space 14}ep_share_agg2 {c |}{col 29}{res}{space 2} .0151422{col 41}{space 2} .0644807{col 52}{space 1}    0.23{col 61}{space 3}0.814{col 69}{space 4}-.1112377{col 82}{space 3}  .141522
{txt}{space 13}dir_share_agg2 {c |}{col 29}{res}{space 2}-.4605472{col 41}{space 2} .1387088{col 52}{space 1}   -3.32{col 61}{space 3}0.001{col 69}{space 4}-.7324114{col 82}{space 3}-.1886831
{txt}lr_pc_l_agg2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.023457{col 41}{space 2} .0137164{col 52}{space 1}   -1.71{col 61}{space 3}0.087{col 69}{space 4}-.0503406{col 82}{space 3} .0034266
{txt}{space 1}lr_pc_l_agg2_ep_share_agg2 {c |}{col 29}{res}{space 2} .0963384{col 41}{space 2} .0456115{col 52}{space 1}    2.11{col 61}{space 3}0.035{col 69}{space 4} .0069415{col 82}{space 3} .1857352
{txt}lr_pc_l_agg2_dir_share_agg2 {c |}{col 29}{res}{space 2} .4430171{col 41}{space 2} .1053067{col 52}{space 1}    4.21{col 61}{space 3}0.000{col 69}{space 4} .2366198{col 82}{space 3} .6494144
{txt}{space 3}gov_agg_2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.066051{col 41}{space 2} .0235983{col 52}{space 1}   -2.80{col 61}{space 3}0.005{col 69}{space 4}-.1123027{col 82}{space 3}-.0197992
{txt}{space 4}gov_agg_2_ep_share_agg2 {c |}{col 29}{res}{space 2}-.2695186{col 41}{space 2} .0792444{col 52}{space 1}   -3.40{col 61}{space 3}0.001{col 69}{space 4}-.4248347{col 82}{space 3}-.1142024
{txt}{space 3}gov_agg_2_dir_share_agg2 {c |}{col 29}{res}{space 2} .3510607{col 41}{space 2} .1859854{col 52}{space 1}    1.89{col 61}{space 3}0.059{col 69}{space 4} -.013464{col 82}{space 3} .7155855
{txt}{space 20}eu_fam1 {c |}{col 29}{res}{space 2} .1286018{col 41}{space 2} .1427464{col 52}{space 1}    0.90{col 61}{space 3}0.368{col 69}{space 4} -.151176{col 82}{space 3} .4083796
{txt}{space 20}eu_fam2 {c |}{col 29}{res}{space 2}-.9260716{col 41}{space 2}  .143586{col 52}{space 1}   -6.45{col 61}{space 3}0.000{col 69}{space 4}-1.207495{col 82}{space 3}-.6446482
{txt}{space 20}eu_fam3 {c |}{col 29}{res}{space 2}  .605907{col 41}{space 2} .1316853{col 52}{space 1}    4.60{col 61}{space 3}0.000{col 69}{space 4} .3478085{col 82}{space 3} .8640054
{txt}{space 20}eu_fam4 {c |}{col 29}{res}{space 2} .6393463{col 41}{space 2}  .125027{col 52}{space 1}    5.11{col 61}{space 3}0.000{col 69}{space 4} .3942979{col 82}{space 3} .8843947
{txt}{space 20}eu_fam5 {c |}{col 29}{res}{space 2} .7374089{col 41}{space 2}  .130481{col 52}{space 1}    5.65{col 61}{space 3}0.000{col 69}{space 4} .4816708{col 82}{space 3}  .993147
{txt}{space 20}eu_fam6 {c |}{col 29}{res}{space 2}-.4294079{col 41}{space 2}  .159883{col 52}{space 1}   -2.69{col 61}{space 3}0.007{col 69}{space 4}-.7427727{col 82}{space 3} -.116043
{txt}{space 20}eu_fam7 {c |}{col 29}{res}{space 2}-1.427474{col 41}{space 2} .1681534{col 52}{space 1}   -8.49{col 61}{space 3}0.000{col 69}{space 4}-1.757049{col 82}{space 3}-1.097899
{txt}{space 20}eu_fam8 {c |}{col 29}{res}{space 2} 1.428286{col 41}{space 2} .5334326{col 52}{space 1}    2.68{col 61}{space 3}0.007{col 69}{space 4} .3827771{col 82}{space 3} 2.473794
{txt}{space 19}eu_fam10 {c |}{col 29}{res}{space 2} -2.28242{col 41}{space 2}  .283112{col 52}{space 1}   -8.06{col 61}{space 3}0.000{col 69}{space 4} -2.83731{col 82}{space 3}-1.727531
{txt}{space 21}eb_sup {c |}{col 29}{res}{space 2} -.005124{col 41}{space 2} .0026862{col 52}{space 1}   -1.91{col 61}{space 3}0.056{col 69}{space 4}-.0103888{col 82}{space 3} .0001408
{txt}{space 23}w_va {c |}{col 29}{res}{space 2}-.0031169{col 41}{space 2}  .271883{col 52}{space 1}   -0.01{col 61}{space 3}0.991{col 69}{space 4}-.5359977{col 82}{space 3}  .529764
{txt}{space 15}obb_gni_calc {c |}{col 29}{res}{space 2} .0325776{col 41}{space 2} .0360565{col 52}{space 1}    0.90{col 61}{space 3}0.366{col 69}{space 4}-.0380919{col 82}{space 3} .1032471
{txt}{space 18}trade_exp {c |}{col 29}{res}{space 2} .0330415{col 41}{space 2} .0053256{col 52}{space 1}    6.20{col 61}{space 3}0.000{col 69}{space 4} .0226035{col 82}{space 3} .0434795
{txt}{space 18}partysize {c |}{col 29}{res}{space 2} .0155846{col 41}{space 2} .0023693{col 52}{space 1}    6.58{col 61}{space 3}0.000{col 69}{space 4} .0109409{col 82}{space 3} .0202282
{txt}{space 16}EU_salience {c |}{col 29}{res}{space 2} .0501881{col 41}{space 2} .0055385{col 52}{space 1}    9.06{col 61}{space 3}0.000{col 69}{space 4} .0393329{col 82}{space 3} .0610433
{txt}{space 15}divisiveness {c |}{col 29}{res}{space 2}-.8712916{col 41}{space 2} .1005171{col 52}{space 1}   -8.67{col 61}{space 3}0.000{col 69}{space 4}-1.068301{col 82}{space 3}-.6742818
{txt}{hline 28}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{hline 29}{c TT}{hline 48}
{col 3}Random-effects Parameters{col 30}{c |}{col 34}Estimate{col 45}Std. Err.{col 59}[95% Conf. Interval]
{hline 29}{c +}{hline 48}
{res}ecoden{txt}: Unstructured{col 30}{c |}
{col 20}var(year){col 30}{c |}{res}{col 33} .0021006{col 44} .0010156{col 58} .0008143{col 70} .0054188
{txt}{col 19}var(_cons){col 30}{c |}{res}{col 33} 2.698938{col 44} 1.189533{col 58} 1.137714{col 70} 6.402543
{txt}{col 14}cov(year,_cons){col 30}{c |}{res}{col 33}-.0689986{col 44} .0339629{col 58}-.1355647{col 70}-.0024325
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 2.179825{col 44} .0520165{col 58} 2.080222{col 70} 2.284197
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}chi2({res}3{txt}) = {res}659.28{col 59}{txt}Prob > chi2 ={col 73}{res}0.0000

{txt}{p 0 6 4}Note: {help j_mixedlr##|_new:LR test is conservative} and provided only for reference.{p_end}

{com}. estimates store m3
{txt}
{com}. estout m1 m2 m3 using table2.tex, style(tex) stats(ll aic bic) cells("b(star fmt(3) label(Coeff.)) se(fmt(3) label(SE))") starlevels(* 0.1 ** 0.05 *** 0.01) label dmarker(.) msign(--) title("Results of multilevel analyses") note(Notes: "* p<0.1, ** p<0.05, *** p<0.01\\Number of observations: 3,570\\Number of groups: 27") replace
{res}{txt}(note: file table2.tex not found)
(output written to {browse  `"table2.tex"'})

{com}. 
. *Figure 2. The impact of legislative characteristics on partisan support
. *for European integration at different levels of the main independent variables.
. 
. use EU_SUPPORT, clear
{txt}(EU SUPPORT)

{com}. set obs 10000
{txt}{p}
number of observations (_N)  was 3,570,
now 10,000
{p_end}

{com}. mixed i102pos_pc sec_share_agg2 lr_pc_l_agg2 lr_pc_l_agg2_sec_share_agg2 gov_agg_2 ep_share_agg2 dir_share_agg2 lr_pc_l_agg2_ep_share_agg2 lr_pc_l_agg2_dir_share_agg2 gov_agg_2_sec_share_agg2 gov_agg_2_ep_share_agg2 gov_agg_2_dir_share_agg2 eu_fam1 eu_fam2 eu_fam3 eu_fam4 eu_fam5 eu_fam6 eu_fam7 eu_fam8 eu_fam10 eb_sup w_va obb_gni_calc trade_exp partysize EU_salience divisiveness, noconstant || ecoden: year, covariance(unstructured)
{res}
{txt}Performing EM optimization: 
{res}
{txt}Performing gradient-based optimization: 
{res}
{txt}Iteration 0:{space 3}log likelihood = {res: -6519.169}  
{res}{txt}Iteration 1:{space 3}log likelihood = {res: -6519.169}  
{res}
{txt}Computing standard errors:
{res}
{txt}Mixed-effects ML regression{col 49}Number of obs{col 67}={col 69}{res}     3,570
{txt}Group variable: {res}ecoden{col 49}{txt}Number of groups{col 67}={col 69}{res}        27

{txt}{col 49}Obs per group:
{col 63}min{col 67}={col 69}{res}        18
{txt}{col 63}avg{col 67}={col 69}{res}     132.2
{txt}{col 63}max{col 67}={col 69}{res}       362

{col 49}{txt}Wald chi2({res}27{txt}){col 67}={col 70}{res}  2022.76
{txt}Log likelihood = {res} -6519.169{col 49}{txt}Prob > chi2{col 67}={col 73}{res}0.0000

{txt}{hline 28}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                 i102pos_pc{col 29}{c |}      Coef.{col 41}   Std. Err.{col 53}      z{col 61}   P>|z|{col 69}     [95% Con{col 82}f. Interval]
{hline 28}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}sec_share_agg2 {c |}{col 29}{res}{space 2} .0516224{col 41}{space 2} .0183852{col 52}{space 1}    2.81{col 61}{space 3}0.005{col 69}{space 4} .0155881{col 82}{space 3} .0876566
{txt}{space 15}lr_pc_l_agg2 {c |}{col 29}{res}{space 2}-1.508394{col 41}{space 2}  .260792{col 52}{space 1}   -5.78{col 61}{space 3}0.000{col 69}{space 4}-2.019537{col 82}{space 3}-.9972513
{txt}lr_pc_l_agg2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.023457{col 41}{space 2} .0137164{col 52}{space 1}   -1.71{col 61}{space 3}0.087{col 69}{space 4}-.0503406{col 82}{space 3} .0034266
{txt}{space 18}gov_agg_2 {c |}{col 29}{res}{space 2} 1.206351{col 41}{space 2} .3793353{col 52}{space 1}    3.18{col 61}{space 3}0.001{col 69}{space 4} .4628674{col 82}{space 3} 1.949835
{txt}{space 14}ep_share_agg2 {c |}{col 29}{res}{space 2} .0151422{col 41}{space 2} .0644807{col 52}{space 1}    0.23{col 61}{space 3}0.814{col 69}{space 4}-.1112377{col 82}{space 3}  .141522
{txt}{space 13}dir_share_agg2 {c |}{col 29}{res}{space 2}-.4605472{col 41}{space 2} .1387088{col 52}{space 1}   -3.32{col 61}{space 3}0.001{col 69}{space 4}-.7324114{col 82}{space 3}-.1886831
{txt}{space 1}lr_pc_l_agg2_ep_share_agg2 {c |}{col 29}{res}{space 2} .0963384{col 41}{space 2} .0456115{col 52}{space 1}    2.11{col 61}{space 3}0.035{col 69}{space 4} .0069415{col 82}{space 3} .1857352
{txt}lr_pc_l_agg2_dir_share_agg2 {c |}{col 29}{res}{space 2} .4430171{col 41}{space 2} .1053067{col 52}{space 1}    4.21{col 61}{space 3}0.000{col 69}{space 4} .2366198{col 82}{space 3} .6494144
{txt}{space 3}gov_agg_2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.066051{col 41}{space 2} .0235983{col 52}{space 1}   -2.80{col 61}{space 3}0.005{col 69}{space 4}-.1123027{col 82}{space 3}-.0197992
{txt}{space 4}gov_agg_2_ep_share_agg2 {c |}{col 29}{res}{space 2}-.2695186{col 41}{space 2} .0792444{col 52}{space 1}   -3.40{col 61}{space 3}0.001{col 69}{space 4}-.4248347{col 82}{space 3}-.1142024
{txt}{space 3}gov_agg_2_dir_share_agg2 {c |}{col 29}{res}{space 2} .3510607{col 41}{space 2} .1859854{col 52}{space 1}    1.89{col 61}{space 3}0.059{col 69}{space 4} -.013464{col 82}{space 3} .7155855
{txt}{space 20}eu_fam1 {c |}{col 29}{res}{space 2} .1286018{col 41}{space 2} .1427464{col 52}{space 1}    0.90{col 61}{space 3}0.368{col 69}{space 4} -.151176{col 82}{space 3} .4083796
{txt}{space 20}eu_fam2 {c |}{col 29}{res}{space 2}-.9260716{col 41}{space 2}  .143586{col 52}{space 1}   -6.45{col 61}{space 3}0.000{col 69}{space 4}-1.207495{col 82}{space 3}-.6446482
{txt}{space 20}eu_fam3 {c |}{col 29}{res}{space 2}  .605907{col 41}{space 2} .1316853{col 52}{space 1}    4.60{col 61}{space 3}0.000{col 69}{space 4} .3478085{col 82}{space 3} .8640054
{txt}{space 20}eu_fam4 {c |}{col 29}{res}{space 2} .6393463{col 41}{space 2}  .125027{col 52}{space 1}    5.11{col 61}{space 3}0.000{col 69}{space 4} .3942979{col 82}{space 3} .8843947
{txt}{space 20}eu_fam5 {c |}{col 29}{res}{space 2} .7374089{col 41}{space 2}  .130481{col 52}{space 1}    5.65{col 61}{space 3}0.000{col 69}{space 4} .4816708{col 82}{space 3}  .993147
{txt}{space 20}eu_fam6 {c |}{col 29}{res}{space 2}-.4294079{col 41}{space 2}  .159883{col 52}{space 1}   -2.69{col 61}{space 3}0.007{col 69}{space 4}-.7427727{col 82}{space 3} -.116043
{txt}{space 20}eu_fam7 {c |}{col 29}{res}{space 2}-1.427474{col 41}{space 2} .1681534{col 52}{space 1}   -8.49{col 61}{space 3}0.000{col 69}{space 4}-1.757049{col 82}{space 3}-1.097899
{txt}{space 20}eu_fam8 {c |}{col 29}{res}{space 2} 1.428286{col 41}{space 2} .5334326{col 52}{space 1}    2.68{col 61}{space 3}0.007{col 69}{space 4} .3827771{col 82}{space 3} 2.473794
{txt}{space 19}eu_fam10 {c |}{col 29}{res}{space 2} -2.28242{col 41}{space 2}  .283112{col 52}{space 1}   -8.06{col 61}{space 3}0.000{col 69}{space 4} -2.83731{col 82}{space 3}-1.727531
{txt}{space 21}eb_sup {c |}{col 29}{res}{space 2} -.005124{col 41}{space 2} .0026862{col 52}{space 1}   -1.91{col 61}{space 3}0.056{col 69}{space 4}-.0103888{col 82}{space 3} .0001408
{txt}{space 23}w_va {c |}{col 29}{res}{space 2}-.0031169{col 41}{space 2}  .271883{col 52}{space 1}   -0.01{col 61}{space 3}0.991{col 69}{space 4}-.5359977{col 82}{space 3}  .529764
{txt}{space 15}obb_gni_calc {c |}{col 29}{res}{space 2} .0325776{col 41}{space 2} .0360565{col 52}{space 1}    0.90{col 61}{space 3}0.366{col 69}{space 4}-.0380919{col 82}{space 3} .1032471
{txt}{space 18}trade_exp {c |}{col 29}{res}{space 2} .0330415{col 41}{space 2} .0053256{col 52}{space 1}    6.20{col 61}{space 3}0.000{col 69}{space 4} .0226035{col 82}{space 3} .0434795
{txt}{space 18}partysize {c |}{col 29}{res}{space 2} .0155846{col 41}{space 2} .0023693{col 52}{space 1}    6.58{col 61}{space 3}0.000{col 69}{space 4} .0109409{col 82}{space 3} .0202282
{txt}{space 16}EU_salience {c |}{col 29}{res}{space 2} .0501881{col 41}{space 2} .0055385{col 52}{space 1}    9.06{col 61}{space 3}0.000{col 69}{space 4} .0393329{col 82}{space 3} .0610433
{txt}{space 15}divisiveness {c |}{col 29}{res}{space 2}-.8712916{col 41}{space 2} .1005171{col 52}{space 1}   -8.67{col 61}{space 3}0.000{col 69}{space 4}-1.068301{col 82}{space 3}-.6742818
{txt}{hline 28}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{hline 29}{c TT}{hline 48}
{col 3}Random-effects Parameters{col 30}{c |}{col 34}Estimate{col 45}Std. Err.{col 59}[95% Conf. Interval]
{hline 29}{c +}{hline 48}
{res}ecoden{txt}: Unstructured{col 30}{c |}
{col 20}var(year){col 30}{c |}{res}{col 33} .0021006{col 44} .0010156{col 58} .0008143{col 70} .0054188
{txt}{col 19}var(_cons){col 30}{c |}{res}{col 33} 2.698938{col 44} 1.189533{col 58} 1.137714{col 70} 6.402543
{txt}{col 14}cov(year,_cons){col 30}{c |}{res}{col 33}-.0689986{col 44} .0339629{col 58}-.1355647{col 70}-.0024325
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 2.179825{col 44} .0520165{col 58} 2.080222{col 70} 2.284197
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}chi2({res}3{txt}) = {res}659.28{col 59}{txt}Prob > chi2 ={col 73}{res}0.0000

{txt}{p 0 6 4}Note: {help j_mixedlr##|_new:LR test is conservative} and provided only for reference.{p_end}

{com}. matrix b=e(b)
{txt}
{com}. matrix V=e(V)
{txt}
{com}. scalar b1=b[1,1]
{txt}
{com}. scalar b3=b[1,3]
{txt}
{com}. scalar varb1=V[1,1]
{txt}
{com}. scalar varb3=V[3,3]
{txt}
{com}. scalar covb1b3=V[1,3]
{txt}
{com}. scalar list b1 b3 varb1 varb3 covb1b3
{txt}        b1 = {res} .05162238
{txt}        b3 = {res}-.02345696
{txt}     varb1 = {res} .00033801
{txt}     varb3 = {res} .00018814
{txt}   covb1b3 = {res}-.00018176
{txt}
{com}. generate MVZ=((_n-1)/100)
{txt}
{com}. replace MVZ=. if _n>384
{txt}(9,616 real changes made, 9,616 to missing)

{com}. gen conbx=b1+b3*MVZ if _n<384
{txt}(9,617 missing values generated)

{com}. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if _n<384
{txt}(9,617 missing values generated)

{com}. gen ax=1.96*consx
{txt}(9,617 missing values generated)

{com}. gen upperx=conbx+ax
{txt}(9,617 missing values generated)

{com}. gen lowerx=conbx-ax
{txt}(9,617 missing values generated)

{com}. gen where=-0.194
{txt}
{com}. gen pipe = "|"
{txt}
{com}. egen tag_lr = tag(lr_pc_l_agg2)
{txt}
{com}. gen yline=0
{txt}
{com}. graph twoway hist lr_pc_l_agg2, percent color(gs14) yaxis(2) || scatter where lr_pc_l_agg2 if tag_lr, plotr(m(b 4)) ms(none) mlabcolor(gs5) mlabel(pipe) mlabpos(6) legend(off) || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) || , xlabel(0 0.5 1 1.5 2 2.5 3 3.5 4, nogrid labsize(2)) ylabel(-0.2 -0.15 -0.1 -0.05 0 0.05 0.1, axis(1) nogrid labsize(2)) ylabel(0 1 2 3 4 5 6 7 8 9 10, axis(2) nogrid labsize(2)) yscale(noline alt) yscale(noline alt axis(2)) xscale(noline) legend(off) title("The impact of secondary legislation on EU support" "at different levels of distance to the outcome in retrospect") xtitle("Distance to the outcome in retrospect" , size(2.5) ) ytitle("Marginal effect of secondary legislation", axis(1) size(2.5)) ytitle("Percentage of observations" , axis(2) size(2.5)) xsca(titlegap(2)) ysca(titlegap(2)) scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white))
{res}{txt}
{com}. graph save Graph figure2a
{res}{txt}(file figure2a.gph saved)

{com}. 
. use EU_SUPPORT, clear
{txt}(EU SUPPORT)

{com}. set obs 10000
{txt}{p}
number of observations (_N)  was 3,570,
now 10,000
{p_end}

{com}. mixed i102pos_pc sec_share_agg2 gov_agg_2 gov_agg_2_sec_share_agg2 lr_pc_l_agg2 ep_share_agg2 dir_share_agg2 lr_pc_l_agg2_sec_share_agg2 lr_pc_l_agg2_ep_share_agg2 lr_pc_l_agg2_dir_share_agg2 gov_agg_2_ep_share_agg2 gov_agg_2_dir_share_agg2 eu_fam1 eu_fam2 eu_fam3 eu_fam4 eu_fam5 eu_fam6 eu_fam7 eu_fam8 eu_fam10 eb_sup w_va obb_gni_calc trade_exp partysize EU_salience divisiveness, noconstant || ecoden: year, covariance(unstructured)
{res}
{txt}Performing EM optimization: 
{res}
{txt}Performing gradient-based optimization: 
{res}
{txt}Iteration 0:{space 3}log likelihood = {res: -6519.169}  
{res}{txt}Iteration 1:{space 3}log likelihood = {res: -6519.169}  
{res}
{txt}Computing standard errors:
{res}
{txt}Mixed-effects ML regression{col 49}Number of obs{col 67}={col 69}{res}     3,570
{txt}Group variable: {res}ecoden{col 49}{txt}Number of groups{col 67}={col 69}{res}        27

{txt}{col 49}Obs per group:
{col 63}min{col 67}={col 69}{res}        18
{txt}{col 63}avg{col 67}={col 69}{res}     132.2
{txt}{col 63}max{col 67}={col 69}{res}       362

{col 49}{txt}Wald chi2({res}27{txt}){col 67}={col 70}{res}  2022.76
{txt}Log likelihood = {res} -6519.169{col 49}{txt}Prob > chi2{col 67}={col 73}{res}0.0000

{txt}{hline 28}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                 i102pos_pc{col 29}{c |}      Coef.{col 41}   Std. Err.{col 53}      z{col 61}   P>|z|{col 69}     [95% Con{col 82}f. Interval]
{hline 28}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}sec_share_agg2 {c |}{col 29}{res}{space 2} .0516224{col 41}{space 2} .0183852{col 52}{space 1}    2.81{col 61}{space 3}0.005{col 69}{space 4} .0155881{col 82}{space 3} .0876566
{txt}{space 18}gov_agg_2 {c |}{col 29}{res}{space 2} 1.206351{col 41}{space 2} .3793353{col 52}{space 1}    3.18{col 61}{space 3}0.001{col 69}{space 4} .4628674{col 82}{space 3} 1.949835
{txt}{space 3}gov_agg_2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.066051{col 41}{space 2} .0235983{col 52}{space 1}   -2.80{col 61}{space 3}0.005{col 69}{space 4}-.1123027{col 82}{space 3}-.0197992
{txt}{space 15}lr_pc_l_agg2 {c |}{col 29}{res}{space 2}-1.508394{col 41}{space 2}  .260792{col 52}{space 1}   -5.78{col 61}{space 3}0.000{col 69}{space 4}-2.019537{col 82}{space 3}-.9972513
{txt}{space 14}ep_share_agg2 {c |}{col 29}{res}{space 2} .0151422{col 41}{space 2} .0644807{col 52}{space 1}    0.23{col 61}{space 3}0.814{col 69}{space 4}-.1112377{col 82}{space 3}  .141522
{txt}{space 13}dir_share_agg2 {c |}{col 29}{res}{space 2}-.4605472{col 41}{space 2} .1387088{col 52}{space 1}   -3.32{col 61}{space 3}0.001{col 69}{space 4}-.7324114{col 82}{space 3}-.1886831
{txt}lr_pc_l_agg2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.023457{col 41}{space 2} .0137164{col 52}{space 1}   -1.71{col 61}{space 3}0.087{col 69}{space 4}-.0503406{col 82}{space 3} .0034266
{txt}{space 1}lr_pc_l_agg2_ep_share_agg2 {c |}{col 29}{res}{space 2} .0963384{col 41}{space 2} .0456115{col 52}{space 1}    2.11{col 61}{space 3}0.035{col 69}{space 4} .0069415{col 82}{space 3} .1857352
{txt}lr_pc_l_agg2_dir_share_agg2 {c |}{col 29}{res}{space 2} .4430171{col 41}{space 2} .1053067{col 52}{space 1}    4.21{col 61}{space 3}0.000{col 69}{space 4} .2366198{col 82}{space 3} .6494144
{txt}{space 4}gov_agg_2_ep_share_agg2 {c |}{col 29}{res}{space 2}-.2695186{col 41}{space 2} .0792444{col 52}{space 1}   -3.40{col 61}{space 3}0.001{col 69}{space 4}-.4248347{col 82}{space 3}-.1142024
{txt}{space 3}gov_agg_2_dir_share_agg2 {c |}{col 29}{res}{space 2} .3510607{col 41}{space 2} .1859854{col 52}{space 1}    1.89{col 61}{space 3}0.059{col 69}{space 4} -.013464{col 82}{space 3} .7155855
{txt}{space 20}eu_fam1 {c |}{col 29}{res}{space 2} .1286018{col 41}{space 2} .1427464{col 52}{space 1}    0.90{col 61}{space 3}0.368{col 69}{space 4} -.151176{col 82}{space 3} .4083796
{txt}{space 20}eu_fam2 {c |}{col 29}{res}{space 2}-.9260716{col 41}{space 2}  .143586{col 52}{space 1}   -6.45{col 61}{space 3}0.000{col 69}{space 4}-1.207495{col 82}{space 3}-.6446482
{txt}{space 20}eu_fam3 {c |}{col 29}{res}{space 2}  .605907{col 41}{space 2} .1316853{col 52}{space 1}    4.60{col 61}{space 3}0.000{col 69}{space 4} .3478085{col 82}{space 3} .8640054
{txt}{space 20}eu_fam4 {c |}{col 29}{res}{space 2} .6393463{col 41}{space 2}  .125027{col 52}{space 1}    5.11{col 61}{space 3}0.000{col 69}{space 4} .3942979{col 82}{space 3} .8843947
{txt}{space 20}eu_fam5 {c |}{col 29}{res}{space 2} .7374089{col 41}{space 2}  .130481{col 52}{space 1}    5.65{col 61}{space 3}0.000{col 69}{space 4} .4816708{col 82}{space 3}  .993147
{txt}{space 20}eu_fam6 {c |}{col 29}{res}{space 2}-.4294079{col 41}{space 2}  .159883{col 52}{space 1}   -2.69{col 61}{space 3}0.007{col 69}{space 4}-.7427727{col 82}{space 3} -.116043
{txt}{space 20}eu_fam7 {c |}{col 29}{res}{space 2}-1.427474{col 41}{space 2} .1681534{col 52}{space 1}   -8.49{col 61}{space 3}0.000{col 69}{space 4}-1.757049{col 82}{space 3}-1.097899
{txt}{space 20}eu_fam8 {c |}{col 29}{res}{space 2} 1.428286{col 41}{space 2} .5334326{col 52}{space 1}    2.68{col 61}{space 3}0.007{col 69}{space 4} .3827771{col 82}{space 3} 2.473794
{txt}{space 19}eu_fam10 {c |}{col 29}{res}{space 2} -2.28242{col 41}{space 2}  .283112{col 52}{space 1}   -8.06{col 61}{space 3}0.000{col 69}{space 4} -2.83731{col 82}{space 3}-1.727531
{txt}{space 21}eb_sup {c |}{col 29}{res}{space 2} -.005124{col 41}{space 2} .0026862{col 52}{space 1}   -1.91{col 61}{space 3}0.056{col 69}{space 4}-.0103888{col 82}{space 3} .0001408
{txt}{space 23}w_va {c |}{col 29}{res}{space 2}-.0031169{col 41}{space 2}  .271883{col 52}{space 1}   -0.01{col 61}{space 3}0.991{col 69}{space 4}-.5359977{col 82}{space 3}  .529764
{txt}{space 15}obb_gni_calc {c |}{col 29}{res}{space 2} .0325776{col 41}{space 2} .0360565{col 52}{space 1}    0.90{col 61}{space 3}0.366{col 69}{space 4}-.0380919{col 82}{space 3} .1032471
{txt}{space 18}trade_exp {c |}{col 29}{res}{space 2} .0330415{col 41}{space 2} .0053256{col 52}{space 1}    6.20{col 61}{space 3}0.000{col 69}{space 4} .0226035{col 82}{space 3} .0434795
{txt}{space 18}partysize {c |}{col 29}{res}{space 2} .0155846{col 41}{space 2} .0023693{col 52}{space 1}    6.58{col 61}{space 3}0.000{col 69}{space 4} .0109409{col 82}{space 3} .0202282
{txt}{space 16}EU_salience {c |}{col 29}{res}{space 2} .0501881{col 41}{space 2} .0055385{col 52}{space 1}    9.06{col 61}{space 3}0.000{col 69}{space 4} .0393329{col 82}{space 3} .0610433
{txt}{space 15}divisiveness {c |}{col 29}{res}{space 2}-.8712916{col 41}{space 2} .1005171{col 52}{space 1}   -8.67{col 61}{space 3}0.000{col 69}{space 4}-1.068301{col 82}{space 3}-.6742818
{txt}{hline 28}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{hline 29}{c TT}{hline 48}
{col 3}Random-effects Parameters{col 30}{c |}{col 34}Estimate{col 45}Std. Err.{col 59}[95% Conf. Interval]
{hline 29}{c +}{hline 48}
{res}ecoden{txt}: Unstructured{col 30}{c |}
{col 20}var(year){col 30}{c |}{res}{col 33} .0021006{col 44} .0010156{col 58} .0008143{col 70} .0054188
{txt}{col 19}var(_cons){col 30}{c |}{res}{col 33} 2.698938{col 44} 1.189533{col 58} 1.137714{col 70} 6.402543
{txt}{col 14}cov(year,_cons){col 30}{c |}{res}{col 33}-.0689986{col 44} .0339629{col 58}-.1355647{col 70}-.0024325
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 2.179825{col 44} .0520165{col 58} 2.080222{col 70} 2.284197
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}chi2({res}3{txt}) = {res}659.28{col 59}{txt}Prob > chi2 ={col 73}{res}0.0000

{txt}{p 0 6 4}Note: {help j_mixedlr##|_new:LR test is conservative} and provided only for reference.{p_end}

{com}. matrix b=e(b)
{txt}
{com}. matrix V=e(V)
{txt}
{com}. scalar b1=b[1,1]
{txt}
{com}. scalar b3=b[1,3]
{txt}
{com}. scalar varb1=V[1,1]
{txt}
{com}. scalar varb3=V[3,3]
{txt}
{com}. scalar covb1b3=V[1,3]
{txt}
{com}. scalar list b1 b3 varb1 varb3 covb1b3
{txt}        b1 = {res} .05162238
{txt}        b3 = {res}-.06605097
{txt}     varb1 = {res} .00033801
{txt}     varb3 = {res} .00055688
{txt}   covb1b3 = {res}-.00016838
{txt}
{com}. generate MVZ=((_n-1)/1000)
{txt}
{com}. replace MVZ=. if _n>1001
{txt}(8,999 real changes made, 8,999 to missing)

{com}. gen conbx=b1+b3*MVZ if _n<1001
{txt}(9,000 missing values generated)

{com}. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if _n<1001
{txt}(9,000 missing values generated)

{com}. gen ax=1.96*consx
{txt}(9,000 missing values generated)

{com}. gen upperx=conbx+ax
{txt}(9,000 missing values generated)

{com}. gen lowerx=conbx-ax
{txt}(9,000 missing values generated)

{com}. gen where=-0.192
{txt}
{com}. gen pipe = "|"
{txt}
{com}. egen tag_lr = tag(gov_agg_2)
{txt}
{com}. gen yline=0
{txt}
{com}. graph twoway hist gov_agg_2, percent color(gs14) yaxis(2) || scatter where gov_agg_2 if tag_lr, plotr(m(b 4)) ms(none) mlabcolor(gs5) mlabel(pipe) mlabpos(6) legend(off) || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) || , xlabel(0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1, nogrid labsize(2)) ylabel(-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2, axis(1) nogrid labsize(2)) ylabel(0 5 10 15 20 25 30 35 40, axis(2) nogrid labsize(2)) yscale(noline alt) yscale(noline alt axis(2)) xscale(noline) legend(off) title("The impact of secondary legislation on EU support" "at different levels of government party in retrospect") xtitle("Government party in retrospect" , size(2.5) ) ytitle("Marginal effect of secondary legislation", axis(1) size(2.5)) ytitle("Percentage of observations" , axis(2) size(2.5)) xsca(titlegap(2)) ysca(titlegap(2)) scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white))
{res}{txt}
{com}. graph save Graph figure2b
{res}{txt}(file figure2b.gph saved)

{com}. 
. use EU_SUPPORT, clear
{txt}(EU SUPPORT)

{com}. set obs 10000
{txt}{p}
number of observations (_N)  was 3,570,
now 10,000
{p_end}

{com}. mixed i102pos_pc ep_share_agg2 lr_pc_l_agg2 lr_pc_l_agg2_ep_share_agg2 gov_agg_2 sec_share_agg2 dir_share_agg2 lr_pc_l_agg2_sec_share_agg2 lr_pc_l_agg2_dir_share_agg2 gov_agg_2_sec_share_agg2 gov_agg_2_ep_share_agg2 gov_agg_2_dir_share_agg2 eu_fam1 eu_fam2 eu_fam3 eu_fam4 eu_fam5 eu_fam6 eu_fam7 eu_fam8 eu_fam10 eb_sup w_va obb_gni_calc trade_exp partysize EU_salience divisiveness, noconstant || ecoden: year, covariance(unstructured)
{res}
{txt}Performing EM optimization: 
{res}
{txt}Performing gradient-based optimization: 
{res}
{txt}Iteration 0:{space 3}log likelihood = {res: -6519.169}  
{res}{txt}Iteration 1:{space 3}log likelihood = {res: -6519.169}  
{res}
{txt}Computing standard errors:
{res}
{txt}Mixed-effects ML regression{col 49}Number of obs{col 67}={col 69}{res}     3,570
{txt}Group variable: {res}ecoden{col 49}{txt}Number of groups{col 67}={col 69}{res}        27

{txt}{col 49}Obs per group:
{col 63}min{col 67}={col 69}{res}        18
{txt}{col 63}avg{col 67}={col 69}{res}     132.2
{txt}{col 63}max{col 67}={col 69}{res}       362

{col 49}{txt}Wald chi2({res}27{txt}){col 67}={col 70}{res}  2022.76
{txt}Log likelihood = {res} -6519.169{col 49}{txt}Prob > chi2{col 67}={col 73}{res}0.0000

{txt}{hline 28}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                 i102pos_pc{col 29}{c |}      Coef.{col 41}   Std. Err.{col 53}      z{col 61}   P>|z|{col 69}     [95% Con{col 82}f. Interval]
{hline 28}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 14}ep_share_agg2 {c |}{col 29}{res}{space 2} .0151422{col 41}{space 2} .0644807{col 52}{space 1}    0.23{col 61}{space 3}0.814{col 69}{space 4}-.1112377{col 82}{space 3}  .141522
{txt}{space 15}lr_pc_l_agg2 {c |}{col 29}{res}{space 2}-1.508394{col 41}{space 2}  .260792{col 52}{space 1}   -5.78{col 61}{space 3}0.000{col 69}{space 4}-2.019537{col 82}{space 3}-.9972513
{txt}{space 1}lr_pc_l_agg2_ep_share_agg2 {c |}{col 29}{res}{space 2} .0963384{col 41}{space 2} .0456115{col 52}{space 1}    2.11{col 61}{space 3}0.035{col 69}{space 4} .0069415{col 82}{space 3} .1857352
{txt}{space 18}gov_agg_2 {c |}{col 29}{res}{space 2} 1.206351{col 41}{space 2} .3793353{col 52}{space 1}    3.18{col 61}{space 3}0.001{col 69}{space 4} .4628674{col 82}{space 3} 1.949835
{txt}{space 13}sec_share_agg2 {c |}{col 29}{res}{space 2} .0516224{col 41}{space 2} .0183852{col 52}{space 1}    2.81{col 61}{space 3}0.005{col 69}{space 4} .0155881{col 82}{space 3} .0876566
{txt}{space 13}dir_share_agg2 {c |}{col 29}{res}{space 2}-.4605472{col 41}{space 2} .1387088{col 52}{space 1}   -3.32{col 61}{space 3}0.001{col 69}{space 4}-.7324114{col 82}{space 3}-.1886831
{txt}lr_pc_l_agg2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.023457{col 41}{space 2} .0137164{col 52}{space 1}   -1.71{col 61}{space 3}0.087{col 69}{space 4}-.0503406{col 82}{space 3} .0034266
{txt}lr_pc_l_agg2_dir_share_agg2 {c |}{col 29}{res}{space 2} .4430171{col 41}{space 2} .1053067{col 52}{space 1}    4.21{col 61}{space 3}0.000{col 69}{space 4} .2366198{col 82}{space 3} .6494144
{txt}{space 3}gov_agg_2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.066051{col 41}{space 2} .0235983{col 52}{space 1}   -2.80{col 61}{space 3}0.005{col 69}{space 4}-.1123027{col 82}{space 3}-.0197992
{txt}{space 4}gov_agg_2_ep_share_agg2 {c |}{col 29}{res}{space 2}-.2695186{col 41}{space 2} .0792444{col 52}{space 1}   -3.40{col 61}{space 3}0.001{col 69}{space 4}-.4248347{col 82}{space 3}-.1142024
{txt}{space 3}gov_agg_2_dir_share_agg2 {c |}{col 29}{res}{space 2} .3510607{col 41}{space 2} .1859854{col 52}{space 1}    1.89{col 61}{space 3}0.059{col 69}{space 4} -.013464{col 82}{space 3} .7155855
{txt}{space 20}eu_fam1 {c |}{col 29}{res}{space 2} .1286018{col 41}{space 2} .1427464{col 52}{space 1}    0.90{col 61}{space 3}0.368{col 69}{space 4} -.151176{col 82}{space 3} .4083796
{txt}{space 20}eu_fam2 {c |}{col 29}{res}{space 2}-.9260716{col 41}{space 2}  .143586{col 52}{space 1}   -6.45{col 61}{space 3}0.000{col 69}{space 4}-1.207495{col 82}{space 3}-.6446482
{txt}{space 20}eu_fam3 {c |}{col 29}{res}{space 2}  .605907{col 41}{space 2} .1316853{col 52}{space 1}    4.60{col 61}{space 3}0.000{col 69}{space 4} .3478085{col 82}{space 3} .8640054
{txt}{space 20}eu_fam4 {c |}{col 29}{res}{space 2} .6393463{col 41}{space 2}  .125027{col 52}{space 1}    5.11{col 61}{space 3}0.000{col 69}{space 4} .3942979{col 82}{space 3} .8843947
{txt}{space 20}eu_fam5 {c |}{col 29}{res}{space 2} .7374089{col 41}{space 2}  .130481{col 52}{space 1}    5.65{col 61}{space 3}0.000{col 69}{space 4} .4816708{col 82}{space 3}  .993147
{txt}{space 20}eu_fam6 {c |}{col 29}{res}{space 2}-.4294079{col 41}{space 2}  .159883{col 52}{space 1}   -2.69{col 61}{space 3}0.007{col 69}{space 4}-.7427727{col 82}{space 3} -.116043
{txt}{space 20}eu_fam7 {c |}{col 29}{res}{space 2}-1.427474{col 41}{space 2} .1681534{col 52}{space 1}   -8.49{col 61}{space 3}0.000{col 69}{space 4}-1.757049{col 82}{space 3}-1.097899
{txt}{space 20}eu_fam8 {c |}{col 29}{res}{space 2} 1.428286{col 41}{space 2} .5334326{col 52}{space 1}    2.68{col 61}{space 3}0.007{col 69}{space 4} .3827771{col 82}{space 3} 2.473794
{txt}{space 19}eu_fam10 {c |}{col 29}{res}{space 2} -2.28242{col 41}{space 2}  .283112{col 52}{space 1}   -8.06{col 61}{space 3}0.000{col 69}{space 4} -2.83731{col 82}{space 3}-1.727531
{txt}{space 21}eb_sup {c |}{col 29}{res}{space 2} -.005124{col 41}{space 2} .0026862{col 52}{space 1}   -1.91{col 61}{space 3}0.056{col 69}{space 4}-.0103888{col 82}{space 3} .0001408
{txt}{space 23}w_va {c |}{col 29}{res}{space 2}-.0031169{col 41}{space 2}  .271883{col 52}{space 1}   -0.01{col 61}{space 3}0.991{col 69}{space 4}-.5359977{col 82}{space 3}  .529764
{txt}{space 15}obb_gni_calc {c |}{col 29}{res}{space 2} .0325776{col 41}{space 2} .0360565{col 52}{space 1}    0.90{col 61}{space 3}0.366{col 69}{space 4}-.0380919{col 82}{space 3} .1032471
{txt}{space 18}trade_exp {c |}{col 29}{res}{space 2} .0330415{col 41}{space 2} .0053256{col 52}{space 1}    6.20{col 61}{space 3}0.000{col 69}{space 4} .0226035{col 82}{space 3} .0434795
{txt}{space 18}partysize {c |}{col 29}{res}{space 2} .0155846{col 41}{space 2} .0023693{col 52}{space 1}    6.58{col 61}{space 3}0.000{col 69}{space 4} .0109409{col 82}{space 3} .0202282
{txt}{space 16}EU_salience {c |}{col 29}{res}{space 2} .0501881{col 41}{space 2} .0055385{col 52}{space 1}    9.06{col 61}{space 3}0.000{col 69}{space 4} .0393329{col 82}{space 3} .0610433
{txt}{space 15}divisiveness {c |}{col 29}{res}{space 2}-.8712916{col 41}{space 2} .1005171{col 52}{space 1}   -8.67{col 61}{space 3}0.000{col 69}{space 4}-1.068301{col 82}{space 3}-.6742818
{txt}{hline 28}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{hline 29}{c TT}{hline 48}
{col 3}Random-effects Parameters{col 30}{c |}{col 34}Estimate{col 45}Std. Err.{col 59}[95% Conf. Interval]
{hline 29}{c +}{hline 48}
{res}ecoden{txt}: Unstructured{col 30}{c |}
{col 20}var(year){col 30}{c |}{res}{col 33} .0021006{col 44} .0010156{col 58} .0008143{col 70} .0054188
{txt}{col 19}var(_cons){col 30}{c |}{res}{col 33} 2.698938{col 44} 1.189533{col 58} 1.137714{col 70} 6.402543
{txt}{col 14}cov(year,_cons){col 30}{c |}{res}{col 33}-.0689986{col 44} .0339629{col 58}-.1355647{col 70}-.0024325
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 2.179825{col 44} .0520165{col 58} 2.080222{col 70} 2.284197
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}chi2({res}3{txt}) = {res}659.28{col 59}{txt}Prob > chi2 ={col 73}{res}0.0000

{txt}{p 0 6 4}Note: {help j_mixedlr##|_new:LR test is conservative} and provided only for reference.{p_end}

{com}. matrix b=e(b)
{txt}
{com}. matrix V=e(V)
{txt}
{com}. scalar b1=b[1,1]
{txt}
{com}. scalar b3=b[1,3]
{txt}
{com}. scalar varb1=V[1,1]
{txt}
{com}. scalar varb3=V[3,3]
{txt}
{com}. scalar covb1b3=V[1,3]
{txt}
{com}. scalar list b1 b3 varb1 varb3 covb1b3
{txt}        b1 = {res} .01514216
{txt}        b3 = {res} .09633838
{txt}     varb1 = {res} .00415776
{txt}     varb3 = {res} .00208041
{txt}   covb1b3 = {res}-.00206281
{txt}
{com}. generate MVZ=((_n-1)/100)
{txt}
{com}. replace MVZ=. if _n>384
{txt}(9,616 real changes made, 9,616 to missing)

{com}. gen conbx=b1+b3*MVZ if _n<384
{txt}(9,617 missing values generated)

{com}. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if _n<384
{txt}(9,617 missing values generated)

{com}. gen ax=1.96*consx
{txt}(9,617 missing values generated)

{com}. gen upperx=conbx+ax
{txt}(9,617 missing values generated)

{com}. gen lowerx=conbx-ax
{txt}(9,617 missing values generated)

{com}. gen where=-0.182
{txt}
{com}. gen pipe = "|"
{txt}
{com}. egen tag_lr = tag(lr_pc_l_agg2)
{txt}
{com}. gen yline=0
{txt}
{com}. graph twoway hist lr_pc_l_agg2, percent color(gs14) yaxis(2) || scatter where lr_pc_l_agg2 if tag_lr, plotr(m(b 4)) ms(none) mlabcolor(gs5) mlabel(pipe) mlabpos(6) legend(off) || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) || , xlabel(0 0.5 1 1.5 2 2.5 3 3.5 4, nogrid labsize(2)) ylabel(-0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6, axis(1) nogrid labsize(2)) ylabel(0 1 2 3 4 5 6 7 8 9 10, axis(2) nogrid labsize(2)) yscale(noline alt) yscale(noline alt axis(2)) xscale(noline) legend(off) title("The impact of parliamentary involvement on EU support" "at different levels of distance to the outcome in retrospect") xtitle("Distance to the outcome in retrospect" , size(2.5) ) ytitle("Marginal effect of parliamentary involvement", axis(1) size(2.5)) ytitle("Percentage of observations" , axis(2) size(2.5)) xsca(titlegap(2)) ysca(titlegap(2)) scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white))
{res}{txt}
{com}. graph save Graph figure2c
{res}{txt}(file figure2c.gph saved)

{com}. 
. use EU_SUPPORT, clear
{txt}(EU SUPPORT)

{com}. set obs 10000
{txt}{p}
number of observations (_N)  was 3,570,
now 10,000
{p_end}

{com}. mixed i102pos_pc ep_share_agg2 gov_agg_2 gov_agg_2_ep_share_agg2 lr_pc_l_agg2 sec_share_agg2 dir_share_agg2 lr_pc_l_agg2_sec_share_agg2 lr_pc_l_agg2_ep_share_agg2 lr_pc_l_agg2_dir_share_agg2 gov_agg_2_sec_share_agg2 gov_agg_2_dir_share_agg2 eu_fam1 eu_fam2 eu_fam3 eu_fam4 eu_fam5 eu_fam6 eu_fam7 eu_fam8 eu_fam10 eb_sup w_va obb_gni_calc trade_exp partysize EU_salience divisiveness, noconstant || ecoden: year, covariance(unstructured)
{res}
{txt}Performing EM optimization: 
{res}
{txt}Performing gradient-based optimization: 
{res}
{txt}Iteration 0:{space 3}log likelihood = {res: -6519.169}  
{res}{txt}Iteration 1:{space 3}log likelihood = {res: -6519.169}  
{res}
{txt}Computing standard errors:
{res}
{txt}Mixed-effects ML regression{col 49}Number of obs{col 67}={col 69}{res}     3,570
{txt}Group variable: {res}ecoden{col 49}{txt}Number of groups{col 67}={col 69}{res}        27

{txt}{col 49}Obs per group:
{col 63}min{col 67}={col 69}{res}        18
{txt}{col 63}avg{col 67}={col 69}{res}     132.2
{txt}{col 63}max{col 67}={col 69}{res}       362

{col 49}{txt}Wald chi2({res}27{txt}){col 67}={col 70}{res}  2022.76
{txt}Log likelihood = {res} -6519.169{col 49}{txt}Prob > chi2{col 67}={col 73}{res}0.0000

{txt}{hline 28}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                 i102pos_pc{col 29}{c |}      Coef.{col 41}   Std. Err.{col 53}      z{col 61}   P>|z|{col 69}     [95% Con{col 82}f. Interval]
{hline 28}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 14}ep_share_agg2 {c |}{col 29}{res}{space 2} .0151422{col 41}{space 2} .0644807{col 52}{space 1}    0.23{col 61}{space 3}0.814{col 69}{space 4}-.1112377{col 82}{space 3}  .141522
{txt}{space 18}gov_agg_2 {c |}{col 29}{res}{space 2} 1.206351{col 41}{space 2} .3793353{col 52}{space 1}    3.18{col 61}{space 3}0.001{col 69}{space 4} .4628674{col 82}{space 3} 1.949835
{txt}{space 4}gov_agg_2_ep_share_agg2 {c |}{col 29}{res}{space 2}-.2695186{col 41}{space 2} .0792444{col 52}{space 1}   -3.40{col 61}{space 3}0.001{col 69}{space 4}-.4248347{col 82}{space 3}-.1142024
{txt}{space 15}lr_pc_l_agg2 {c |}{col 29}{res}{space 2}-1.508394{col 41}{space 2}  .260792{col 52}{space 1}   -5.78{col 61}{space 3}0.000{col 69}{space 4}-2.019537{col 82}{space 3}-.9972513
{txt}{space 13}sec_share_agg2 {c |}{col 29}{res}{space 2} .0516224{col 41}{space 2} .0183852{col 52}{space 1}    2.81{col 61}{space 3}0.005{col 69}{space 4} .0155881{col 82}{space 3} .0876566
{txt}{space 13}dir_share_agg2 {c |}{col 29}{res}{space 2}-.4605472{col 41}{space 2} .1387088{col 52}{space 1}   -3.32{col 61}{space 3}0.001{col 69}{space 4}-.7324114{col 82}{space 3}-.1886831
{txt}lr_pc_l_agg2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.023457{col 41}{space 2} .0137164{col 52}{space 1}   -1.71{col 61}{space 3}0.087{col 69}{space 4}-.0503406{col 82}{space 3} .0034266
{txt}{space 1}lr_pc_l_agg2_ep_share_agg2 {c |}{col 29}{res}{space 2} .0963384{col 41}{space 2} .0456115{col 52}{space 1}    2.11{col 61}{space 3}0.035{col 69}{space 4} .0069415{col 82}{space 3} .1857352
{txt}lr_pc_l_agg2_dir_share_agg2 {c |}{col 29}{res}{space 2} .4430171{col 41}{space 2} .1053067{col 52}{space 1}    4.21{col 61}{space 3}0.000{col 69}{space 4} .2366198{col 82}{space 3} .6494144
{txt}{space 3}gov_agg_2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.066051{col 41}{space 2} .0235983{col 52}{space 1}   -2.80{col 61}{space 3}0.005{col 69}{space 4}-.1123027{col 82}{space 3}-.0197992
{txt}{space 3}gov_agg_2_dir_share_agg2 {c |}{col 29}{res}{space 2} .3510607{col 41}{space 2} .1859854{col 52}{space 1}    1.89{col 61}{space 3}0.059{col 69}{space 4} -.013464{col 82}{space 3} .7155855
{txt}{space 20}eu_fam1 {c |}{col 29}{res}{space 2} .1286018{col 41}{space 2} .1427464{col 52}{space 1}    0.90{col 61}{space 3}0.368{col 69}{space 4} -.151176{col 82}{space 3} .4083796
{txt}{space 20}eu_fam2 {c |}{col 29}{res}{space 2}-.9260716{col 41}{space 2}  .143586{col 52}{space 1}   -6.45{col 61}{space 3}0.000{col 69}{space 4}-1.207495{col 82}{space 3}-.6446482
{txt}{space 20}eu_fam3 {c |}{col 29}{res}{space 2}  .605907{col 41}{space 2} .1316853{col 52}{space 1}    4.60{col 61}{space 3}0.000{col 69}{space 4} .3478085{col 82}{space 3} .8640054
{txt}{space 20}eu_fam4 {c |}{col 29}{res}{space 2} .6393463{col 41}{space 2}  .125027{col 52}{space 1}    5.11{col 61}{space 3}0.000{col 69}{space 4} .3942979{col 82}{space 3} .8843947
{txt}{space 20}eu_fam5 {c |}{col 29}{res}{space 2} .7374089{col 41}{space 2}  .130481{col 52}{space 1}    5.65{col 61}{space 3}0.000{col 69}{space 4} .4816708{col 82}{space 3}  .993147
{txt}{space 20}eu_fam6 {c |}{col 29}{res}{space 2}-.4294079{col 41}{space 2}  .159883{col 52}{space 1}   -2.69{col 61}{space 3}0.007{col 69}{space 4}-.7427727{col 82}{space 3} -.116043
{txt}{space 20}eu_fam7 {c |}{col 29}{res}{space 2}-1.427474{col 41}{space 2} .1681534{col 52}{space 1}   -8.49{col 61}{space 3}0.000{col 69}{space 4}-1.757049{col 82}{space 3}-1.097899
{txt}{space 20}eu_fam8 {c |}{col 29}{res}{space 2} 1.428286{col 41}{space 2} .5334326{col 52}{space 1}    2.68{col 61}{space 3}0.007{col 69}{space 4} .3827771{col 82}{space 3} 2.473794
{txt}{space 19}eu_fam10 {c |}{col 29}{res}{space 2} -2.28242{col 41}{space 2}  .283112{col 52}{space 1}   -8.06{col 61}{space 3}0.000{col 69}{space 4} -2.83731{col 82}{space 3}-1.727531
{txt}{space 21}eb_sup {c |}{col 29}{res}{space 2} -.005124{col 41}{space 2} .0026862{col 52}{space 1}   -1.91{col 61}{space 3}0.056{col 69}{space 4}-.0103888{col 82}{space 3} .0001408
{txt}{space 23}w_va {c |}{col 29}{res}{space 2}-.0031169{col 41}{space 2}  .271883{col 52}{space 1}   -0.01{col 61}{space 3}0.991{col 69}{space 4}-.5359977{col 82}{space 3}  .529764
{txt}{space 15}obb_gni_calc {c |}{col 29}{res}{space 2} .0325776{col 41}{space 2} .0360565{col 52}{space 1}    0.90{col 61}{space 3}0.366{col 69}{space 4}-.0380919{col 82}{space 3} .1032471
{txt}{space 18}trade_exp {c |}{col 29}{res}{space 2} .0330415{col 41}{space 2} .0053256{col 52}{space 1}    6.20{col 61}{space 3}0.000{col 69}{space 4} .0226035{col 82}{space 3} .0434795
{txt}{space 18}partysize {c |}{col 29}{res}{space 2} .0155846{col 41}{space 2} .0023693{col 52}{space 1}    6.58{col 61}{space 3}0.000{col 69}{space 4} .0109409{col 82}{space 3} .0202282
{txt}{space 16}EU_salience {c |}{col 29}{res}{space 2} .0501881{col 41}{space 2} .0055385{col 52}{space 1}    9.06{col 61}{space 3}0.000{col 69}{space 4} .0393329{col 82}{space 3} .0610433
{txt}{space 15}divisiveness {c |}{col 29}{res}{space 2}-.8712916{col 41}{space 2} .1005171{col 52}{space 1}   -8.67{col 61}{space 3}0.000{col 69}{space 4}-1.068301{col 82}{space 3}-.6742818
{txt}{hline 28}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{hline 29}{c TT}{hline 48}
{col 3}Random-effects Parameters{col 30}{c |}{col 34}Estimate{col 45}Std. Err.{col 59}[95% Conf. Interval]
{hline 29}{c +}{hline 48}
{res}ecoden{txt}: Unstructured{col 30}{c |}
{col 20}var(year){col 30}{c |}{res}{col 33} .0021006{col 44} .0010156{col 58} .0008143{col 70} .0054188
{txt}{col 19}var(_cons){col 30}{c |}{res}{col 33} 2.698938{col 44} 1.189533{col 58} 1.137714{col 70} 6.402543
{txt}{col 14}cov(year,_cons){col 30}{c |}{res}{col 33}-.0689986{col 44} .0339629{col 58}-.1355647{col 70}-.0024325
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 2.179825{col 44} .0520165{col 58} 2.080222{col 70} 2.284197
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}chi2({res}3{txt}) = {res}659.28{col 59}{txt}Prob > chi2 ={col 73}{res}0.0000

{txt}{p 0 6 4}Note: {help j_mixedlr##|_new:LR test is conservative} and provided only for reference.{p_end}

{com}. matrix b=e(b)
{txt}
{com}. matrix V=e(V)
{txt}
{com}. scalar b1=b[1,1]
{txt}
{com}. scalar b3=b[1,3]
{txt}
{com}. scalar varb1=V[1,1]
{txt}
{com}. scalar varb3=V[3,3]
{txt}
{com}. scalar covb1b3=V[1,3]
{txt}
{com}. scalar list b1 b3 varb1 varb3 covb1b3
{txt}        b1 = {res} .01514216
{txt}        b3 = {res}-.26951858
{txt}     varb1 = {res} .00415776
{txt}     varb3 = {res} .00627967
{txt}   covb1b3 = {res}-.00236908
{txt}
{com}. generate MVZ=((_n-1)/1000)
{txt}
{com}. replace MVZ=. if _n>1001
{txt}(8,999 real changes made, 8,999 to missing)

{com}. gen conbx=b1+b3*MVZ if _n<1001
{txt}(9,000 missing values generated)

{com}. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if _n<1001
{txt}(9,000 missing values generated)

{com}. gen ax=1.96*consx
{txt}(9,000 missing values generated)

{com}. gen upperx=conbx+ax
{txt}(9,000 missing values generated)

{com}. gen lowerx=conbx-ax
{txt}(9,000 missing values generated)

{com}. gen where=-0.582
{txt}
{com}. gen pipe = "|"
{txt}
{com}. egen tag_lr = tag(gov_agg_2)
{txt}
{com}. gen yline=0
{txt}
{com}. graph twoway hist gov_agg_2, percent color(gs14) yaxis(2) || scatter where gov_agg_2 if tag_lr, plotr(m(b 4)) ms(none) mlabcolor(gs5) mlabel(pipe) mlabpos(6) legend(off) || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) || , xlabel(0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1, nogrid labsize(2)) ylabel(-0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3, axis(1) nogrid labsize(2)) ylabel(0 5 10 15 20 25 30 35 40, axis(2) nogrid labsize(2)) yscale(noline alt) yscale(noline alt axis(2)) xscale(noline) legend(off) title("The impact of parliamentary involvement on EU support" "at different levels of government party in retrospect") xtitle("Government party in retrospect" , size(2.5) ) ytitle("Marginal effect of parliamentary involvement", axis(1) size(2.5)) ytitle("Percentage of observations" , axis(2) size(2.5)) xsca(titlegap(2)) ysca(titlegap(2)) scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white))
{res}{txt}
{com}. graph save Graph figure2d
{res}{txt}(file figure2d.gph saved)

{com}. 
. use EU_SUPPORT, clear
{txt}(EU SUPPORT)

{com}. set obs 10000
{txt}{p}
number of observations (_N)  was 3,570,
now 10,000
{p_end}

{com}. mixed i102pos_pc dir_share_agg2 lr_pc_l_agg2 lr_pc_l_agg2_dir_share_agg2 gov_agg_2 sec_share_agg2 ep_share_agg2 lr_pc_l_agg2_sec_share_agg2 lr_pc_l_agg2_ep_share_agg2 gov_agg_2_sec_share_agg2 gov_agg_2_ep_share_agg2 gov_agg_2_dir_share_agg2 eu_fam1 eu_fam2 eu_fam3 eu_fam4 eu_fam5 eu_fam6 eu_fam7 eu_fam8 eu_fam10 eb_sup w_va obb_gni_calc trade_exp partysize EU_salience divisiveness, noconstant || ecoden: year, covariance(unstructured)
{res}
{txt}Performing EM optimization: 
{res}
{txt}Performing gradient-based optimization: 
{res}
{txt}Iteration 0:{space 3}log likelihood = {res: -6519.169}  
{res}{txt}Iteration 1:{space 3}log likelihood = {res: -6519.169}  
{res}
{txt}Computing standard errors:
{res}
{txt}Mixed-effects ML regression{col 49}Number of obs{col 67}={col 69}{res}     3,570
{txt}Group variable: {res}ecoden{col 49}{txt}Number of groups{col 67}={col 69}{res}        27

{txt}{col 49}Obs per group:
{col 63}min{col 67}={col 69}{res}        18
{txt}{col 63}avg{col 67}={col 69}{res}     132.2
{txt}{col 63}max{col 67}={col 69}{res}       362

{col 49}{txt}Wald chi2({res}27{txt}){col 67}={col 70}{res}  2022.76
{txt}Log likelihood = {res} -6519.169{col 49}{txt}Prob > chi2{col 67}={col 73}{res}0.0000

{txt}{hline 28}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                 i102pos_pc{col 29}{c |}      Coef.{col 41}   Std. Err.{col 53}      z{col 61}   P>|z|{col 69}     [95% Con{col 82}f. Interval]
{hline 28}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}dir_share_agg2 {c |}{col 29}{res}{space 2}-.4605472{col 41}{space 2} .1387088{col 52}{space 1}   -3.32{col 61}{space 3}0.001{col 69}{space 4}-.7324114{col 82}{space 3}-.1886831
{txt}{space 15}lr_pc_l_agg2 {c |}{col 29}{res}{space 2}-1.508394{col 41}{space 2}  .260792{col 52}{space 1}   -5.78{col 61}{space 3}0.000{col 69}{space 4}-2.019537{col 82}{space 3}-.9972513
{txt}lr_pc_l_agg2_dir_share_agg2 {c |}{col 29}{res}{space 2} .4430171{col 41}{space 2} .1053067{col 52}{space 1}    4.21{col 61}{space 3}0.000{col 69}{space 4} .2366198{col 82}{space 3} .6494144
{txt}{space 18}gov_agg_2 {c |}{col 29}{res}{space 2} 1.206351{col 41}{space 2} .3793353{col 52}{space 1}    3.18{col 61}{space 3}0.001{col 69}{space 4} .4628674{col 82}{space 3} 1.949835
{txt}{space 13}sec_share_agg2 {c |}{col 29}{res}{space 2} .0516224{col 41}{space 2} .0183852{col 52}{space 1}    2.81{col 61}{space 3}0.005{col 69}{space 4} .0155881{col 82}{space 3} .0876566
{txt}{space 14}ep_share_agg2 {c |}{col 29}{res}{space 2} .0151422{col 41}{space 2} .0644807{col 52}{space 1}    0.23{col 61}{space 3}0.814{col 69}{space 4}-.1112377{col 82}{space 3}  .141522
{txt}lr_pc_l_agg2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.023457{col 41}{space 2} .0137164{col 52}{space 1}   -1.71{col 61}{space 3}0.087{col 69}{space 4}-.0503406{col 82}{space 3} .0034266
{txt}{space 1}lr_pc_l_agg2_ep_share_agg2 {c |}{col 29}{res}{space 2} .0963384{col 41}{space 2} .0456115{col 52}{space 1}    2.11{col 61}{space 3}0.035{col 69}{space 4} .0069415{col 82}{space 3} .1857352
{txt}{space 3}gov_agg_2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.066051{col 41}{space 2} .0235983{col 52}{space 1}   -2.80{col 61}{space 3}0.005{col 69}{space 4}-.1123027{col 82}{space 3}-.0197992
{txt}{space 4}gov_agg_2_ep_share_agg2 {c |}{col 29}{res}{space 2}-.2695186{col 41}{space 2} .0792444{col 52}{space 1}   -3.40{col 61}{space 3}0.001{col 69}{space 4}-.4248347{col 82}{space 3}-.1142024
{txt}{space 3}gov_agg_2_dir_share_agg2 {c |}{col 29}{res}{space 2} .3510607{col 41}{space 2} .1859854{col 52}{space 1}    1.89{col 61}{space 3}0.059{col 69}{space 4} -.013464{col 82}{space 3} .7155855
{txt}{space 20}eu_fam1 {c |}{col 29}{res}{space 2} .1286018{col 41}{space 2} .1427464{col 52}{space 1}    0.90{col 61}{space 3}0.368{col 69}{space 4} -.151176{col 82}{space 3} .4083796
{txt}{space 20}eu_fam2 {c |}{col 29}{res}{space 2}-.9260716{col 41}{space 2}  .143586{col 52}{space 1}   -6.45{col 61}{space 3}0.000{col 69}{space 4}-1.207495{col 82}{space 3}-.6446482
{txt}{space 20}eu_fam3 {c |}{col 29}{res}{space 2}  .605907{col 41}{space 2} .1316853{col 52}{space 1}    4.60{col 61}{space 3}0.000{col 69}{space 4} .3478085{col 82}{space 3} .8640054
{txt}{space 20}eu_fam4 {c |}{col 29}{res}{space 2} .6393463{col 41}{space 2}  .125027{col 52}{space 1}    5.11{col 61}{space 3}0.000{col 69}{space 4} .3942979{col 82}{space 3} .8843947
{txt}{space 20}eu_fam5 {c |}{col 29}{res}{space 2} .7374089{col 41}{space 2}  .130481{col 52}{space 1}    5.65{col 61}{space 3}0.000{col 69}{space 4} .4816708{col 82}{space 3}  .993147
{txt}{space 20}eu_fam6 {c |}{col 29}{res}{space 2}-.4294079{col 41}{space 2}  .159883{col 52}{space 1}   -2.69{col 61}{space 3}0.007{col 69}{space 4}-.7427727{col 82}{space 3} -.116043
{txt}{space 20}eu_fam7 {c |}{col 29}{res}{space 2}-1.427474{col 41}{space 2} .1681534{col 52}{space 1}   -8.49{col 61}{space 3}0.000{col 69}{space 4}-1.757049{col 82}{space 3}-1.097899
{txt}{space 20}eu_fam8 {c |}{col 29}{res}{space 2} 1.428286{col 41}{space 2} .5334326{col 52}{space 1}    2.68{col 61}{space 3}0.007{col 69}{space 4} .3827771{col 82}{space 3} 2.473794
{txt}{space 19}eu_fam10 {c |}{col 29}{res}{space 2} -2.28242{col 41}{space 2}  .283112{col 52}{space 1}   -8.06{col 61}{space 3}0.000{col 69}{space 4} -2.83731{col 82}{space 3}-1.727531
{txt}{space 21}eb_sup {c |}{col 29}{res}{space 2} -.005124{col 41}{space 2} .0026862{col 52}{space 1}   -1.91{col 61}{space 3}0.056{col 69}{space 4}-.0103888{col 82}{space 3} .0001408
{txt}{space 23}w_va {c |}{col 29}{res}{space 2}-.0031169{col 41}{space 2}  .271883{col 52}{space 1}   -0.01{col 61}{space 3}0.991{col 69}{space 4}-.5359977{col 82}{space 3}  .529764
{txt}{space 15}obb_gni_calc {c |}{col 29}{res}{space 2} .0325776{col 41}{space 2} .0360565{col 52}{space 1}    0.90{col 61}{space 3}0.366{col 69}{space 4}-.0380919{col 82}{space 3} .1032471
{txt}{space 18}trade_exp {c |}{col 29}{res}{space 2} .0330415{col 41}{space 2} .0053256{col 52}{space 1}    6.20{col 61}{space 3}0.000{col 69}{space 4} .0226035{col 82}{space 3} .0434795
{txt}{space 18}partysize {c |}{col 29}{res}{space 2} .0155846{col 41}{space 2} .0023693{col 52}{space 1}    6.58{col 61}{space 3}0.000{col 69}{space 4} .0109409{col 82}{space 3} .0202282
{txt}{space 16}EU_salience {c |}{col 29}{res}{space 2} .0501881{col 41}{space 2} .0055385{col 52}{space 1}    9.06{col 61}{space 3}0.000{col 69}{space 4} .0393329{col 82}{space 3} .0610433
{txt}{space 15}divisiveness {c |}{col 29}{res}{space 2}-.8712916{col 41}{space 2} .1005171{col 52}{space 1}   -8.67{col 61}{space 3}0.000{col 69}{space 4}-1.068301{col 82}{space 3}-.6742818
{txt}{hline 28}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{hline 29}{c TT}{hline 48}
{col 3}Random-effects Parameters{col 30}{c |}{col 34}Estimate{col 45}Std. Err.{col 59}[95% Conf. Interval]
{hline 29}{c +}{hline 48}
{res}ecoden{txt}: Unstructured{col 30}{c |}
{col 20}var(year){col 30}{c |}{res}{col 33} .0021006{col 44} .0010156{col 58} .0008143{col 70} .0054188
{txt}{col 19}var(_cons){col 30}{c |}{res}{col 33} 2.698938{col 44} 1.189533{col 58} 1.137714{col 70} 6.402543
{txt}{col 14}cov(year,_cons){col 30}{c |}{res}{col 33}-.0689986{col 44} .0339629{col 58}-.1355647{col 70}-.0024325
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 2.179825{col 44} .0520165{col 58} 2.080222{col 70} 2.284197
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}chi2({res}3{txt}) = {res}659.28{col 59}{txt}Prob > chi2 ={col 73}{res}0.0000

{txt}{p 0 6 4}Note: {help j_mixedlr##|_new:LR test is conservative} and provided only for reference.{p_end}

{com}. matrix b=e(b)
{txt}
{com}. matrix V=e(V)
{txt}
{com}. scalar b1=b[1,1]
{txt}
{com}. scalar b3=b[1,3]
{txt}
{com}. scalar varb1=V[1,1]
{txt}
{com}. scalar varb3=V[3,3]
{txt}
{com}. scalar covb1b3=V[1,3]
{txt}
{com}. scalar list b1 b3 varb1 varb3 covb1b3
{txt}        b1 = {res}-.46054725
{txt}        b3 = {res} .44301707
{txt}     varb1 = {res} .01924012
{txt}     varb3 = {res}  .0110895
{txt}   covb1b3 = {res}-.01110844
{txt}
{com}. generate MVZ=((_n-1)/100)
{txt}
{com}. replace MVZ=. if _n>384
{txt}(9,616 real changes made, 9,616 to missing)

{com}. gen conbx=b1+b3*MVZ if _n<384
{txt}(9,617 missing values generated)

{com}. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if _n<384
{txt}(9,617 missing values generated)

{com}. gen ax=1.96*consx
{txt}(9,617 missing values generated)

{com}. gen upperx=conbx+ax
{txt}(9,617 missing values generated)

{com}. gen lowerx=conbx-ax
{txt}(9,617 missing values generated)

{com}. gen where=-0.68
{txt}
{com}. gen pipe = "|"
{txt}
{com}. egen tag_lr = tag(lr_pc_l_agg2)
{txt}
{com}. gen yline=0
{txt}
{com}. graph twoway hist lr_pc_l_agg2, percent color(gs14) yaxis(2) || scatter where lr_pc_l_agg2 if tag_lr, plotr(m(b 4)) ms(none) mlabcolor(gs5) mlabel(pipe) mlabpos(6) legend(off) || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) || , xlabel(0 0.5 1 1.5 2 2.5 3 3.5 4, nogrid labsize(2)) ylabel(-0.5 0 0.5 1 1.5 2, axis(1) nogrid labsize(2)) ylabel(0 1 2 3 4 5 6 7 8 9 10, axis(2) nogrid labsize(2)) yscale(noline alt) yscale(noline alt axis(2)) xscale(noline) legend(off) title("The impact of directives on EU support" "at different levels of distance to the outcome in retrospect") xtitle("Distance to the outcome in retrospect" , size(2.5) ) ytitle("Marginal effect of directives", axis(1) size(2.5)) ytitle("Percentage of observations" , axis(2) size(2.5)) xsca(titlegap(2)) ysca(titlegap(2)) scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white))
{res}{txt}
{com}. graph save Graph figure2e
{res}{txt}(file figure2e.gph saved)

{com}. 
. use EU_SUPPORT, clear
{txt}(EU SUPPORT)

{com}. set obs 10000
{txt}{p}
number of observations (_N)  was 3,570,
now 10,000
{p_end}

{com}. mixed i102pos_pc dir_share_agg2 gov_agg_2 gov_agg_2_dir_share_agg2 lr_pc_l_agg2 sec_share_agg2 ep_share_agg2 lr_pc_l_agg2_sec_share_agg2 lr_pc_l_agg2_ep_share_agg2 lr_pc_l_agg2_dir_share_agg2 gov_agg_2_sec_share_agg2 gov_agg_2_ep_share_agg2 eu_fam1 eu_fam2 eu_fam3 eu_fam4 eu_fam5 eu_fam6 eu_fam7 eu_fam8 eu_fam10 eb_sup w_va obb_gni_calc trade_exp partysize EU_salience divisiveness, noconstant || ecoden: year, covariance(unstructured)
{res}
{txt}Performing EM optimization: 
{res}
{txt}Performing gradient-based optimization: 
{res}
{txt}Iteration 0:{space 3}log likelihood = {res: -6519.169}  
{res}{txt}Iteration 1:{space 3}log likelihood = {res: -6519.169}  
{res}
{txt}Computing standard errors:
{res}
{txt}Mixed-effects ML regression{col 49}Number of obs{col 67}={col 69}{res}     3,570
{txt}Group variable: {res}ecoden{col 49}{txt}Number of groups{col 67}={col 69}{res}        27

{txt}{col 49}Obs per group:
{col 63}min{col 67}={col 69}{res}        18
{txt}{col 63}avg{col 67}={col 69}{res}     132.2
{txt}{col 63}max{col 67}={col 69}{res}       362

{col 49}{txt}Wald chi2({res}27{txt}){col 67}={col 70}{res}  2022.76
{txt}Log likelihood = {res} -6519.169{col 49}{txt}Prob > chi2{col 67}={col 73}{res}0.0000

{txt}{hline 28}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                 i102pos_pc{col 29}{c |}      Coef.{col 41}   Std. Err.{col 53}      z{col 61}   P>|z|{col 69}     [95% Con{col 82}f. Interval]
{hline 28}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}dir_share_agg2 {c |}{col 29}{res}{space 2}-.4605472{col 41}{space 2} .1387088{col 52}{space 1}   -3.32{col 61}{space 3}0.001{col 69}{space 4}-.7324114{col 82}{space 3}-.1886831
{txt}{space 18}gov_agg_2 {c |}{col 29}{res}{space 2} 1.206351{col 41}{space 2} .3793353{col 52}{space 1}    3.18{col 61}{space 3}0.001{col 69}{space 4} .4628674{col 82}{space 3} 1.949835
{txt}{space 3}gov_agg_2_dir_share_agg2 {c |}{col 29}{res}{space 2} .3510607{col 41}{space 2} .1859854{col 52}{space 1}    1.89{col 61}{space 3}0.059{col 69}{space 4} -.013464{col 82}{space 3} .7155855
{txt}{space 15}lr_pc_l_agg2 {c |}{col 29}{res}{space 2}-1.508394{col 41}{space 2}  .260792{col 52}{space 1}   -5.78{col 61}{space 3}0.000{col 69}{space 4}-2.019537{col 82}{space 3}-.9972513
{txt}{space 13}sec_share_agg2 {c |}{col 29}{res}{space 2} .0516224{col 41}{space 2} .0183852{col 52}{space 1}    2.81{col 61}{space 3}0.005{col 69}{space 4} .0155881{col 82}{space 3} .0876566
{txt}{space 14}ep_share_agg2 {c |}{col 29}{res}{space 2} .0151422{col 41}{space 2} .0644807{col 52}{space 1}    0.23{col 61}{space 3}0.814{col 69}{space 4}-.1112377{col 82}{space 3}  .141522
{txt}lr_pc_l_agg2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.023457{col 41}{space 2} .0137164{col 52}{space 1}   -1.71{col 61}{space 3}0.087{col 69}{space 4}-.0503406{col 82}{space 3} .0034266
{txt}{space 1}lr_pc_l_agg2_ep_share_agg2 {c |}{col 29}{res}{space 2} .0963384{col 41}{space 2} .0456115{col 52}{space 1}    2.11{col 61}{space 3}0.035{col 69}{space 4} .0069415{col 82}{space 3} .1857352
{txt}lr_pc_l_agg2_dir_share_agg2 {c |}{col 29}{res}{space 2} .4430171{col 41}{space 2} .1053067{col 52}{space 1}    4.21{col 61}{space 3}0.000{col 69}{space 4} .2366198{col 82}{space 3} .6494144
{txt}{space 3}gov_agg_2_sec_share_agg2 {c |}{col 29}{res}{space 2} -.066051{col 41}{space 2} .0235983{col 52}{space 1}   -2.80{col 61}{space 3}0.005{col 69}{space 4}-.1123027{col 82}{space 3}-.0197992
{txt}{space 4}gov_agg_2_ep_share_agg2 {c |}{col 29}{res}{space 2}-.2695186{col 41}{space 2} .0792444{col 52}{space 1}   -3.40{col 61}{space 3}0.001{col 69}{space 4}-.4248347{col 82}{space 3}-.1142024
{txt}{space 20}eu_fam1 {c |}{col 29}{res}{space 2} .1286018{col 41}{space 2} .1427464{col 52}{space 1}    0.90{col 61}{space 3}0.368{col 69}{space 4} -.151176{col 82}{space 3} .4083796
{txt}{space 20}eu_fam2 {c |}{col 29}{res}{space 2}-.9260716{col 41}{space 2}  .143586{col 52}{space 1}   -6.45{col 61}{space 3}0.000{col 69}{space 4}-1.207495{col 82}{space 3}-.6446482
{txt}{space 20}eu_fam3 {c |}{col 29}{res}{space 2}  .605907{col 41}{space 2} .1316853{col 52}{space 1}    4.60{col 61}{space 3}0.000{col 69}{space 4} .3478085{col 82}{space 3} .8640054
{txt}{space 20}eu_fam4 {c |}{col 29}{res}{space 2} .6393463{col 41}{space 2}  .125027{col 52}{space 1}    5.11{col 61}{space 3}0.000{col 69}{space 4} .3942979{col 82}{space 3} .8843947
{txt}{space 20}eu_fam5 {c |}{col 29}{res}{space 2} .7374089{col 41}{space 2}  .130481{col 52}{space 1}    5.65{col 61}{space 3}0.000{col 69}{space 4} .4816708{col 82}{space 3}  .993147
{txt}{space 20}eu_fam6 {c |}{col 29}{res}{space 2}-.4294079{col 41}{space 2}  .159883{col 52}{space 1}   -2.69{col 61}{space 3}0.007{col 69}{space 4}-.7427727{col 82}{space 3} -.116043
{txt}{space 20}eu_fam7 {c |}{col 29}{res}{space 2}-1.427474{col 41}{space 2} .1681534{col 52}{space 1}   -8.49{col 61}{space 3}0.000{col 69}{space 4}-1.757049{col 82}{space 3}-1.097899
{txt}{space 20}eu_fam8 {c |}{col 29}{res}{space 2} 1.428286{col 41}{space 2} .5334326{col 52}{space 1}    2.68{col 61}{space 3}0.007{col 69}{space 4} .3827771{col 82}{space 3} 2.473794
{txt}{space 19}eu_fam10 {c |}{col 29}{res}{space 2} -2.28242{col 41}{space 2}  .283112{col 52}{space 1}   -8.06{col 61}{space 3}0.000{col 69}{space 4} -2.83731{col 82}{space 3}-1.727531
{txt}{space 21}eb_sup {c |}{col 29}{res}{space 2} -.005124{col 41}{space 2} .0026862{col 52}{space 1}   -1.91{col 61}{space 3}0.056{col 69}{space 4}-.0103888{col 82}{space 3} .0001408
{txt}{space 23}w_va {c |}{col 29}{res}{space 2}-.0031169{col 41}{space 2}  .271883{col 52}{space 1}   -0.01{col 61}{space 3}0.991{col 69}{space 4}-.5359977{col 82}{space 3}  .529764
{txt}{space 15}obb_gni_calc {c |}{col 29}{res}{space 2} .0325776{col 41}{space 2} .0360565{col 52}{space 1}    0.90{col 61}{space 3}0.366{col 69}{space 4}-.0380919{col 82}{space 3} .1032471
{txt}{space 18}trade_exp {c |}{col 29}{res}{space 2} .0330415{col 41}{space 2} .0053256{col 52}{space 1}    6.20{col 61}{space 3}0.000{col 69}{space 4} .0226035{col 82}{space 3} .0434795
{txt}{space 18}partysize {c |}{col 29}{res}{space 2} .0155846{col 41}{space 2} .0023693{col 52}{space 1}    6.58{col 61}{space 3}0.000{col 69}{space 4} .0109409{col 82}{space 3} .0202282
{txt}{space 16}EU_salience {c |}{col 29}{res}{space 2} .0501881{col 41}{space 2} .0055385{col 52}{space 1}    9.06{col 61}{space 3}0.000{col 69}{space 4} .0393329{col 82}{space 3} .0610433
{txt}{space 15}divisiveness {c |}{col 29}{res}{space 2}-.8712916{col 41}{space 2} .1005171{col 52}{space 1}   -8.67{col 61}{space 3}0.000{col 69}{space 4}-1.068301{col 82}{space 3}-.6742818
{txt}{hline 28}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{hline 29}{c TT}{hline 48}
{col 3}Random-effects Parameters{col 30}{c |}{col 34}Estimate{col 45}Std. Err.{col 59}[95% Conf. Interval]
{hline 29}{c +}{hline 48}
{res}ecoden{txt}: Unstructured{col 30}{c |}
{col 20}var(year){col 30}{c |}{res}{col 33} .0021006{col 44} .0010156{col 58} .0008143{col 70} .0054188
{txt}{col 19}var(_cons){col 30}{c |}{res}{col 33} 2.698938{col 44} 1.189533{col 58} 1.137714{col 70} 6.402543
{txt}{col 14}cov(year,_cons){col 30}{c |}{res}{col 33}-.0689986{col 44} .0339629{col 58}-.1355647{col 70}-.0024325
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 2.179825{col 44} .0520165{col 58} 2.080222{col 70} 2.284197
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}chi2({res}3{txt}) = {res}659.28{col 59}{txt}Prob > chi2 ={col 73}{res}0.0000

{txt}{p 0 6 4}Note: {help j_mixedlr##|_new:LR test is conservative} and provided only for reference.{p_end}

{com}. matrix b=e(b)
{txt}
{com}. matrix V=e(V)
{txt}
{com}. scalar b1=b[1,1]
{txt}
{com}. scalar b3=b[1,3]
{txt}
{com}. scalar varb1=V[1,1]
{txt}
{com}. scalar varb3=V[3,3]
{txt}
{com}. scalar covb1b3=V[1,3]
{txt}
{com}. scalar list b1 b3 varb1 varb3 covb1b3
{txt}        b1 = {res}-.46054725
{txt}        b3 = {res} .35106074
{txt}     varb1 = {res} .01924012
{txt}     varb3 = {res} .03459058
{txt}   covb1b3 = {res}-.01151441
{txt}
{com}. generate MVZ=((_n-1)/1000)
{txt}
{com}. replace MVZ=. if _n>1001
{txt}(8,999 real changes made, 8,999 to missing)

{com}. gen conbx=b1+b3*MVZ if _n<1001
{txt}(9,000 missing values generated)

{com}. gen consx=sqrt(varb1+varb3*(MVZ^2)+2*covb1b3*MVZ) if _n<1001
{txt}(9,000 missing values generated)

{com}. gen ax=1.96*consx
{txt}(9,000 missing values generated)

{com}. gen upperx=conbx+ax
{txt}(9,000 missing values generated)

{com}. gen lowerx=conbx-ax
{txt}(9,000 missing values generated)

{com}. gen where=-0.77
{txt}
{com}. gen pipe = "|"
{txt}
{com}. egen tag_lr = tag(gov_agg_2)
{txt}
{com}. gen yline=0
{txt}
{com}. graph twoway hist gov_agg_2, percent color(gs14) yaxis(2) || scatter where gov_agg_2 if tag_lr, plotr(m(b 4)) ms(none) mlabcolor(gs5) mlabel(pipe) mlabpos(6) legend(off) || line conbx MVZ, clpattern(solid) clwidth(medium) clcolor(black) yaxis(1) || line upperx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line lowerx MVZ, clpattern(dash) clwidth(thin) clcolor(black) || line yline MVZ, clwidth(thin) clcolor(black) clpattern(solid) || , xlabel(0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1, nogrid labsize(2)) ylabel(-0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6, axis(1) nogrid labsize(2)) ylabel(0 5 10 15 20 25 30 35 40, axis(2) nogrid labsize(2)) yscale(noline alt) yscale(noline alt axis(2)) xscale(noline) legend(off) title("The impact of directives on EU support" "at different levels of government party in retrospect") xtitle("Government party in retrospect" , size(2.5) ) ytitle("Marginal effect of directives", axis(1) size(2.5)) ytitle("Percentage of observations" , axis(2) size(2.5)) xsca(titlegap(2)) ysca(titlegap(2)) scheme(s2mono) graphregion(fcolor(white) ilcolor(white) lcolor(white))
{res}{txt}
{com}. graph save Graph figure2f
{res}{txt}(file figure2f.gph saved)

{com}. 
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}E:\data\EU_SUPPORT_EUP.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 1 Apr 2017, 13:10:12
{txt}{.-}
{smcl}
{txt}{sf}{ul off}