Hello Statalists,
I used firthlogit method because of the rare events (excessive zeros). Since the "margins" command does not work after 'firthlogit", I used the technique proposed by Joseph Coveney
The marginal effects obtained from the standard logit and firthlogit methods are almost the same. I would like to check if the results are correct.
I used firthlogit method because of the rare events (excessive zeros). Since the "margins" command does not work after 'firthlogit", I used the technique proposed by Joseph Coveney
HTML Code:
firthlogit innovation i.SoleProprietor i.KPI lnWorkersT1 i.MajObsElec i.highCompetition i.CreditLine i.businessGOV i.PercepGiftsOfficials i.Gifts i.politicPositionM tempname B matrix define `B' = e(b) quietly logit innovation i.SoleProprietor i.KPI lnWorkersT1 i.MajObsElec i.highCompetition i.CreditLine i.businessGOV i.PercepGiftsOfficials i.Gifts i.politicPositionM, asis iterate(0) from(`B', copy) nolog margins, dydx(*) post logit innovation i.SoleProprietor i.KPI lnWorkersT1 i.MajObsElec i.highCompetition i.CreditLine i.businessGOV i.PercepGiftsOfficials i.Gifts i.politicPositionM margins, dydx(*) post
HTML Code:
. firthlogit innovation i.SoleProprietor i.KPI lnWorkersT1 i.MajObsElec i.highCompetition i.CreditLine i.businessGOV i.PercepGiftsOff
> icials i.Gifts i.politicPositionM
initial: penalized log likelihood = -199.75085
rescale: penalized log likelihood = -199.75085
Iteration 0: penalized log likelihood = -199.75085
Iteration 1: penalized log likelihood = -157.81967
Iteration 2: penalized log likelihood = -148.49911
Iteration 3: penalized log likelihood = -148.3216
Iteration 4: penalized log likelihood = -148.32142
Iteration 5: penalized log likelihood = -148.32142
Number of obs = 531
Wald chi2(10) = 73.26
Penalized log likelihood = -148.32142 Prob > chi2 = 0.0000
----------------------------------------------------------------------------------------
innovation | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------------+----------------------------------------------------------------
1.SoleProprietor | -.7341323 .3505348 -2.09 0.036 -1.421168 -.0470966
1.KPI | .7950588 .3523213 2.26 0.024 .1045218 1.485596
lnWorkersT1 | .0343293 .1167632 0.29 0.769 -.1945223 .2631808
1.MajObsElec | 1.021998 .3093701 3.30 0.001 .4156439 1.628352
1.highCompetition | -.9992451 .3022214 -3.31 0.001 -1.591588 -.4069021
1.CreditLine | .6832562 .295702 2.31 0.021 .103691 1.262821
1.businessGOV | 1.177281 .3317323 3.55 0.000 .5270973 1.827464
1.PercepGiftsOfficials | -1.461738 .3125043 -4.68 0.000 -2.074235 -.8492404
1.Gifts | 1.602913 .6205271 2.58 0.010 .3867027 2.819124
1.politicPositionM | .5858813 .337224 1.74 0.082 -.0750656 1.246828
_cons | -2.135072 .5460497 -3.91 0.000 -3.205309 -1.064834
----------------------------------------------------------------------------------------
. tempname B
. matrix define `B' = e(b)
. quietly logit innovation i.SoleProprietor i.KPI lnWorkersT1 i.MajObsElec i.highCompetition i.CreditLine i.businessGOV i.PercepGifts
> Officials i.Gifts i.politicPositionM, asis iterate(0) from(`B', copy) nolog
. margins, dydx(*) post
Average marginal effects Number of obs = 531
Model VCE : OIM
Expression : Pr(innovation), predict()
dy/dx w.r.t. : 1.SoleProprietor 1.KPI lnWorkersT1 1.MajObsElec 1.highCompetition 1.CreditLine 1.businessGOV 1.PercepGiftsOfficials
1.Gifts 1.politicPositionM
----------------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-----------------------+----------------------------------------------------------------
1.SoleProprietor | -.0662876 .0295192 -2.25 0.025 -.1241441 -.008431
1.KPI | .0729891 .030728 2.38 0.018 .0127634 .1332149
lnWorkersT1 | .0032516 .0110878 0.29 0.769 -.0184801 .0249832
1.MajObsElec | .1030386 .0317777 3.24 0.001 .0407555 .1653217
1.highCompetition | -.1089059 .0364628 -2.99 0.003 -.1803717 -.0374401
1.CreditLine | .0663724 .0289854 2.29 0.022 .0095621 .1231826
1.businessGOV | .1381452 .0461586 2.99 0.003 .047676 .2286144
1.PercepGiftsOfficials | -.1495963 .0320192 -4.67 0.000 -.2123528 -.0868398
1.Gifts | .2137622 .1066279 2.00 0.045 .0047753 .422749
1.politicPositionM | .0596445 .0366413 1.63 0.104 -.0121711 .1314601
----------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
. logit innovation i.SoleProprietor i.KPI lnWorkersT1 i.MajObsElec i.highCompetition i.CreditLine i.businessGOV i.PercepGiftsOfficial
> s i.Gifts i.politicPositionM
Iteration 0: log likelihood = -214.41751
Iteration 1: log likelihood = -170.71611
Iteration 2: log likelihood = -162.30387
Iteration 3: log likelihood = -162.16226
Iteration 4: log likelihood = -162.16206
Iteration 5: log likelihood = -162.16206
Logistic regression Number of obs = 531
LR chi2(10) = 104.51
Prob > chi2 = 0.0000
Log likelihood = -162.16206 Pseudo R2 = 0.2437
----------------------------------------------------------------------------------------
innovation | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------------+----------------------------------------------------------------
1.SoleProprietor | -.7744158 .3591472 -2.16 0.031 -1.478331 -.0705001
1.KPI | .8296133 .3602922 2.30 0.021 .1234537 1.535773
lnWorkersT1 | .0345982 .1191459 0.29 0.772 -.1989235 .2681199
1.MajObsElec | 1.062424 .3166581 3.36 0.001 .4417856 1.683063
1.highCompetition | -1.032964 .3088274 -3.34 0.001 -1.638254 -.4276731
1.CreditLine | .7162555 .302266 2.37 0.018 .123825 1.308686
1.businessGOV | 1.210867 .3395521 3.57 0.000 .5453568 1.876377
1.PercepGiftsOfficials | -1.518501 .3199238 -4.75 0.000 -2.145541 -.8914623
1.Gifts | 1.641363 .6429058 2.55 0.011 .3812903 2.901435
1.politicPositionM | .5973945 .3446661 1.73 0.083 -.0781387 1.272928
_cons | -2.209897 .5583855 -3.96 0.000 -3.304312 -1.115481
----------------------------------------------------------------------------------------
. margins, dydx(*) post
Average marginal effects Number of obs = 531
Model VCE : OIM
Expression : Pr(innovation), predict()
dy/dx w.r.t. : 1.SoleProprietor 1.KPI lnWorkersT1 1.MajObsElec 1.highCompetition 1.CreditLine 1.businessGOV 1.PercepGiftsOfficials
1.Gifts 1.politicPositionM
----------------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-----------------------+----------------------------------------------------------------
1.SoleProprietor | -.066839 .0288736 -2.31 0.021 -.1234302 -.0102478
1.KPI | .0728684 .0300925 2.42 0.015 .0138881 .1318487
lnWorkersT1 | .0031411 .0108174 0.29 0.772 -.0180607 .0243429
1.MajObsElec | .1030601 .0313376 3.29 0.001 .0416396 .1644807
1.highCompetition | -.1083684 .0358741 -3.02 0.003 -.1786805 -.0380564
1.CreditLine | .0667061 .0283985 2.35 0.019 .011046 .1223661
1.businessGOV | .1368223 .0453126 3.02 0.003 .0480113 .2256333
1.PercepGiftsOfficials | -.1495356 .0316059 -4.73 0.000 -.211482 -.0875891
1.Gifts | .2117406 .1053288 2.01 0.044 .0053 .4181813
1.politicPositionM | .0583031 .0358812 1.62 0.104 -.0120229 .128629
----------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
