-------------
      name:  <unnamed>
       log:  C:\Users\smcdo\Documents\ProposalsProjectFinal\FinalDocs\JPR-Log.smcl
  log type:  smcl
 opened on:   4 Jun 2019, 14:21:59

. do "C:\Users\smcdo\Documents\ProposalsProjectFinal\JPR Model Replication.do"

. **JPR-TPRD Analysis Replication .do**
. *Stata 15.1
.
. ***USE REPLICATION DATASET: JPR-TPRD-ReplicationData.dta***
.
. *Model:
. melogit binding d_polyarchy d_cinc d_pacsettg d_pacsettr i.pastfight m_polyarchy m_cinc m_pacsettg m_pacsettr m_pastfight c.duration##c.duration c.catyr##c.catyr|| claimproposer:, cov(unstr) vce(robust)

Fitting fixed-effects model:

Iteration 0:   log likelihood = -1715.1988
Iteration 1:   log likelihood =  -1365.433
Iteration 2:   log likelihood = -1353.0151
Iteration 3:   log likelihood = -1351.6363
Iteration 4:   log likelihood = -1351.6119
Iteration 5:   log likelihood = -1351.6119

Refining starting values:

Grid node 0:   log likelihood = -1137.1863

Fitting full model:

Iteration 0:   log pseudolikelihood = -1137.1863
Iteration 1:   log pseudolikelihood = -1037.4813
Iteration 2:   log pseudolikelihood = -1003.1867
Iteration 3:   log pseudolikelihood = -988.24867
Iteration 4:   log pseudolikelihood = -985.22932
Iteration 5:   log pseudolikelihood = -984.88529
Iteration 6:   log pseudolikelihood = -984.92463
Iteration 7:   log pseudolikelihood = -984.94508
Iteration 8:   log pseudolikelihood =  -984.9544
Iteration 9:   log pseudolikelihood = -984.95846
Iteration 10:  log pseudolikelihood = -984.96013
Iteration 11:  log pseudolikelihood = -984.96082
Iteration 12:  log pseudolikelihood =  -984.9611
Iteration 13:  log pseudolikelihood = -984.96121
Iteration 14:  log pseudolikelihood = -984.96126

Mixed-effects logistic regression               Number of obs     =      9,065
Group variable:   claimproposer                 Number of groups  =        408

                                                Obs per group:
                                                              min =          1
                                                              avg =       22.2
                                                              max =         67

Integration method:  mvaghermite                Integration pts.  =          7

                                                Wald chi2(14)     =      77.85
Log pseudolikelihood = -984.96126               Prob > chi2       =     0.0000
(Std. Err. adjusted for 408 clusters in claimproposer)
----------------------+----------------------------------------------------------------
                      |               Robust
               binding |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
----------------------+----------------------------------------------------------------
          d_polyarchy |    2.878035    1.119045      2.57    0.010      .6847461     5.071324
               d_cinc |     55.4012    25.46541      2.18    0.030      5.489919     105.3125
           d_pacsettg |   -.7949573    .3479728     -2.28    0.022     -1.476971    -.1129432
           d_pacsettr |    -.108078    .2037225     -0.53    0.596     -.5073667     .2912108
          1.pastfight |    1.913771     1.21107      1.58    0.114     -.4598834     4.287424
          m_polyarchy |   -1.020416    .8005681     -1.27    0.202       -2.5895      .548669
               m_cinc |   -48.21933    16.34981     -2.95    0.003     -80.26438    -16.17429
           m_pacsettg |    1.140398    .2367448      4.82    0.000       .676387      1.60441
           m_pacsettr |    .2571263    .0833274      3.09    0.002      .0938075      .420445
          m_pastfight |   -2.227045    1.679697     -1.33    0.185      -5.51919       1.0651
             duration |    .3232964    .0623383      5.19    0.000      .2011155     .4454773
                      |
c.duration#c.duration |   -.0043653    .0008373     -5.21    0.000     -.0060064    -.0027242
                      |
                catyr |   -.2185567    .0575756     -3.80    0.000     -.3314028    -.1057105
                      |
      c.catyr#c.catyr |    .0031908    .0007158      4.46    0.000      .0017878     .0045938
                      |
                _cons |   -10.91051     1.44269     -7.56    0.000     -13.73813    -8.082886
----------------------+----------------------------------------------------------------
 claimproposer         |
            var(_cons)|    17.60291    4.783228                    10.33447      29.9834
----------------------+----------------------------------------------------------------

.
. *Information Criteria:
. estat ic

Akaike's information criterion and Bayesian information criterion

-------------+---------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
.            |      9,065         .  -984.9613      16    2001.923   2115.717
-------------+---------------------------------------------------------------


Note: N=Obs used in calculating BIC; see [R] BIC note.


.
. *Predicted Probabilities for Figure V (Calculation may take awhile):
. margins, at(duration=(0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40))

Predictive margins                              Number of obs     =      9,065
Model VCE    : Robust


Expression  : Marginal predicted mean, predict()


1._at  : duration        =           0


2._at  : duration        =           2


3._at  : duration        =           4


4._at  : duration        =           6


5._at  : duration        =           8


6._at  : duration        =          10


7._at  : duration        =          12


8._at  : duration        =          14


9._at  : duration        =          16


10._at  : duration        =          18


11._at  : duration        =          20


12._at  : duration        =          22


13._at  : duration        =          24


14._at  : duration        =          26


15._at  : duration        =          28


16._at  : duration        =          30


17._at  : duration        =          32


18._at  : duration        =          34


19._at  : duration        =          36


20._at  : duration        =          38


21._at  : duration        =          40


-------------+----------------------------------------------------------------
             |            Delta-method
             |     Margin    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |    .0138364    .0042237      3.28    0.001      .0055581     .0221147
          2  |    .0186963    .0047825      3.91    0.000      .0093227     .0280699
          3  |    .0244975    .0052838      4.64    0.000      .0141413     .0348536
          4  |    .0312641    .0057531      5.43    0.000      .0199882       .04254
          5  |    .0390093    .0062264      6.27    0.000      .0268058     .0512128
          6  |    .0477114     .006744      7.07    0.000      .0344934     .0609294
          7  |    .0572829    .0073573      7.79    0.000      .0428629     .0717029
          8  |    .0675547    .0081278      8.31    0.000      .0516246     .0834849
          9  |    .0782867    .0091054      8.60    0.000      .0604404      .096133
         10  |    .0891929    .0103033      8.66    0.000      .0689988     .1093871
         11  |    .0999691    .0116913      8.55    0.000      .0770545     .1228836
         12  |    .1103157    .0132088      8.35    0.000      .0844269     .1362044
         13  |    .1199554    .0147848      8.11    0.000      .0909777     .1489332
         14  |    .1286447    .0163541      7.87    0.000      .0965913     .1606981
         15  |    .1361793    .0178651      7.62    0.000      .1011642     .1711943
         16  |    .1423955    .0192826      7.38    0.000      .1046024     .1801886
         17  |    .1471679    .0205847      7.15    0.000      .1068227     .1875131
         18  |    .1504062    .0217602      6.91    0.000      .1077569     .1930555
         19  |    .1520521    .0228049      6.67    0.000      .1073553     .1967489
         20  |    .1520766     .023718      6.41    0.000      .1055902     .1985631
         21  |    .1504794       .0245      6.14    0.000      .1024604     .1984985
-------------+----------------------------------------------------------------

. marginsplot


Variables that uniquely identify margins: duration


.
. margins, at(catyr=(0 5 10 15 20 25 30 35 40 45 50 55 60 65 70))

Predictive margins                              Number of obs     =      9,065
Model VCE    : Robust


Expression  : Marginal predicted mean, predict()


1._at  : catyr           =           0


2._at  : catyr           =           5


3._at  : catyr           =          10


4._at  : catyr           =          15


5._at  : catyr           =          20


6._at  : catyr           =          25


7._at  : catyr           =          30


8._at  : catyr           =          35


9._at  : catyr           =          40


10._at  : catyr           =          45


11._at  : catyr           =          50


12._at  : catyr           =          55


13._at  : catyr           =          60


14._at  : catyr           =          65


15._at  : catyr           =          70


-------------+----------------------------------------------------------------
             |            Delta-method
             |     Margin    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |    .1679766     .044308      3.79    0.000      .0811345     .2548187
          2  |    .1255296    .0287788      4.36    0.000      .0691241     .1819351
          3  |    .0956639    .0189805      5.04    0.000      .0584628      .132865
          4  |    .0750626    .0128016      5.86    0.000       .049972     .1001532
          5  |    .0614016    .0091508      6.71    0.000      .0434665     .0793368
          6  |    .0529597     .007326      7.23    0.000       .038601     .0673185
          7  |    .0485315    .0066732      7.27    0.000      .0354523     .0616108
          8  |    .0474339    .0066674      7.11    0.000       .034366     .0605018
          9  |    .0494925    .0070268      7.04    0.000      .0357201     .0632648
         10  |    .0550327    .0076767      7.17    0.000      .0399867     .0700788
         11  |    .0648945    .0087183      7.44    0.000      .0478069      .081982
         12  |    .0804389    .0104898      7.67    0.000      .0598792     .1009985
         13  |    .1035487    .0136295      7.60    0.000      .0768354      .130262
         14  |    .1367901    .0190798      7.17    0.000      .0993944     .1741859
         15  |      .18389    .0283737      6.48    0.000      .1282786     .2395013
-------------+----------------------------------------------------------------

. marginsplot


Variables that uniquely identify margins: catyr


.
end of do-file

. log close
      name:  <unnamed>
       log:  C:\Users\smcdo\Documents\ProposalsProjectFinal\FinalDocs\JPR-Log.smcl
  log type:  smcl
 closed on:   4 Jun 2019, 14:23:57
-------------