Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change i p-values when using margins command

    I'm trying to predict the effect different regimetypes have on the likelihood of civil war onset. For this purpose I'm using xtlogit since my dependent variable (onset) is binary and the dataset is paneldata. Seeing that I want to compare different regression models I'll use the
    Code:
    margins, dydx(*)
    . In one of the robustness models I substitute onset with another binary variable: governmental civil war onset (in danish regering). The problem is that the p-values change when I convert odds ratio to predicted probability using
    Code:
    margins, dydx(*)
    . For category 3 (liberal democracy) the result is insignificant in the model using odds ratio (p-value = 0,068), however it becomes significant when using predicted probability (p-value = 0,009). How should I interpret this?

    Code:
    xtlogit regering i.v2x_regime_lag cgdppc_lag max_rdiscl_lag NHIxl_lag cinc_lag Total_Oil_Income_PC_lag    peace_year_lag    decay_function_lag    Americas    Eu
    > rope MENA Asia if e2==1, or vce(cluster land)
    
    Fitting comparison model:
    
    Iteration 0:   log pseudolikelihood = -665.12183  
    Iteration 1:   log pseudolikelihood =  -638.6753  
    Iteration 2:   log pseudolikelihood = -631.36206  
    Iteration 3:   log pseudolikelihood = -631.07399  
    Iteration 4:   log pseudolikelihood = -631.07151  
    Iteration 5:   log pseudolikelihood = -631.07151  
    
    Fitting full model:
    
    tau =  0.0     log pseudolikelihood = -631.07151
    tau =  0.1     log pseudolikelihood = -631.45035
    
    Iteration 0:   log pseudolikelihood = -631.45035  
    Iteration 1:   log pseudolikelihood = -631.07129  
    Iteration 2:   log pseudolikelihood = -631.03574  
    Iteration 3:   log pseudolikelihood = -631.03068  
    Iteration 4:   log pseudolikelihood = -631.03059  
    Iteration 5:   log pseudolikelihood = -631.03059  
    
    Calculating robust standard errors:
    
    Random-effects logistic regression              Number of obs     =      6,724
    Group variable: land                            Number of groups  =        152
    
    Random effects u_i ~ Gaussian                   Obs per group:
    min =         12
    avg =       44.2
    max =         59
    
    Integration method: mvaghermite                 Integration pts.  =         12
    
    Wald chi2(14)     =      41.50
    Log pseudolikelihood  = -631.03059              Prob > chi2       =     0.0001
    
    (Std. Err. adjusted for 152 clusters in land)
    
    Robust
    regering  Odds Ratio   Std. Err.      z    P>z     [95% Conf. Interval]
    
    v2x_regime_lag 
    1     1.703123   .3962947     2.29   0.022       1.0794    2.687259
    2     .9463097   .3586698    -0.15   0.884      .450206    1.989094
    3     .3185905   .1997512    -1.82   0.068     .0932273    1.088736
    
    cgdppc_lag    .9999647   .0000271    -1.30   0.193     .9999116    1.000018
    max_rdiscl_lag    1.904016   .8477297     1.45   0.148     .7955879    4.556728
    NHIxl_lag     1.16897   .2459818     0.74   0.458      .773906    1.765706
    cinc_lag    4.461662   18.04084     0.37   0.711      .001613    12341.03
    Total_Oil_Income_PC_lag    1.000036   .0000525     0.68   0.496     .9999328    1.000139
    peace_year_lag    .9962825   .0109373    -0.34   0.734     .9750748    1.017952
    decay_function_lag    .7267845   .2485084    -0.93   0.351     .3718395    1.420547
    Americas     1.16026   .2638379     0.65   0.513     .7430119    1.811818
    Europe    .4185222   .1848075    -1.97   0.049     .1761376    .9944544
    MENA    1.619499    .496078     1.57   0.116     .8884728    2.952005
    Asia    .9230862   .2319049    -0.32   0.750     .5641529    1.510385
    _cons    .0200784   .0079414    -9.88   0.000     .0092482     .043591
    
    /lnsig2u   -3.245333   3.175614                     -9.469423    2.978756
    
    sigma_u    .1973717   .3133882                       .008785    4.434337
    rho    .0117025   .0367277                      .0000235    .8566707
    
    Note: Estimates are transformed only in the first equation.
    Note: _cons estimates baseline odds (conditional on zero random effects).
    Code:
    . margins, dydx(*)
    
    Average marginal effects                        Number of obs     =      6,724
    Model VCE    : Robust
    
    Expression   : Pr(regering=1), predict(pr)
    dy/dx w.r.t. : 1.v2x_regime_lag 2.v2x_regime_lag 3.v2x_regime_lag cgdppc_lag max_rdiscl_lag    NHIxl_lag    cinc_lag    Total_Oil_Income_PC_lag
    peace_year_lag decay_function_lag Americas Europe MENA Asia
    
    
    Delta-method
    dy/dx   Std. Err.      z    P>z     [95% Conf. Interval]
    
    v2x_regime_lag 
    1     .0118224   .0052635     2.25   0.025      .001506    .0221387
    2     -.000918   .0062151    -0.15   0.883    -.0130994    .0112634
    3    -.0118171   .0045169    -2.62   0.009    -.0206701   -.0029641
    
    cgdppc_lag   -6.92e-07   5.29e-07    -1.31   0.191    -1.73e-06    3.44e-07
    max_rdiscl_lag    .0126371   .0088414     1.43   0.153    -.0046916    .0299659
    NHIxl_lag    .0030637   .0041095     0.75   0.456    -.0049907    .0111182
    cinc_lag     .029348   .0798936     0.37   0.713    -.1272406    .1859366
    Total_Oil_Income_PC_lag    7.01e-07   1.02e-06     0.69   0.491    -1.29e-06    2.70e-06
    peace_year_lag   -.0000731   .0002163    -0.34   0.735     -.000497    .0003508
    decay_function_lag   -.0062625   .0067008    -0.93   0.350    -.0193958    .0068708
    Americas     .002917   .0044431     0.66   0.511    -.0057913    .0116252
    Europe   -.0170929    .008703    -1.96   0.050    -.0341505   -.0000353
    MENA     .009461   .0062125     1.52   0.128    -.0027153    .0216373
    Asia   -.0015706    .004936    -0.32   0.750     -.011245    .0081039
    
    Note: dy/dx for factor levels is the discrete change from the base level.

  • #2
    Remember that in the logit model, you're operating on the log odds scale. In margins, you are operating on the probability scale. This is a non-linear model also. I have had the p-values change myself, and this is normal.
    Please use the code delimiters to show code and results - use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

    Please use the command -dataex- to show a representative sample of data; it is installed already if you have Stata 14.2 or 15.1, else you can install it by typing

    Code:
    ssc install dataex

    Comment


    • #3
      Thank you Weiwen

      I'm aware that logit and margins are operating on two separate scales, however, I don't know why the p-values changes. Is it simply because of the difference in scales?

      Comment

      Working...
      X