Announcement

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

  • STATA code for recursive Bi-variate Probit

    I want to estimate a equation where Y1=X1 Y2 and Y2=X2 X1 shoudl the first stage equation be written first with biprobit command ? Like biprobit (Y2=X2 X1) (Y1=Y2 X1) or the other way round like biprobit(Y1=Y2 X1) (Y2=X2 X1) or the ordering doesn't matter.

    Thank you!

  • #2
    You may check this:

    Code:
    . webuse school
    
    . biprobit (private = logptax loginc years) (vote = logptax years)
    
    Fitting comparison equation 1:
    
    Iteration 0:   log likelihood = -31.967097  
    Iteration 1:   log likelihood = -31.452424  
    Iteration 2:   log likelihood = -31.448958  
    Iteration 3:   log likelihood = -31.448958  
    
    Fitting comparison equation 2:
    
    Iteration 0:   log likelihood = -63.036914  
    Iteration 1:   log likelihood = -61.455896  
    Iteration 2:   log likelihood = -61.452436  
    Iteration 3:   log likelihood = -61.452436  
    
    Comparison:    log likelihood = -92.901393
    
    Fitting full model:
    
    Iteration 0:   log likelihood = -92.901393  
    Iteration 1:   log likelihood = -92.220515  
    Iteration 2:   log likelihood = -92.215279  
    Iteration 3:   log likelihood = -92.215278  
    
    Seemingly unrelated bivariate probit            Number of obs     =         95
                                                    Wald chi2(5)      =       4.77
    Log likelihood = -92.215278                     Prob > chi2       =     0.4440
    
    ------------------------------------------------------------------------------
                 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    private      |
         logptax |   -.194247   .6677031    -0.29   0.771    -1.502921    1.114427
          loginc |   .5289522   .5339413     0.99   0.322    -.5175536    1.575458
           years |  -.0107319   .0255361    -0.42   0.674    -.0607818     .039318
           _cons |  -5.108515    4.83203    -1.06   0.290    -14.57912    4.362089
    -------------+----------------------------------------------------------------
    vote         |
         logptax |  -.6138309   .4585021    -1.34   0.181    -1.512478    .2848167
           years |  -.0230864   .0143602    -1.61   0.108    -.0512319    .0050591
           _cons |   4.773266   3.235681     1.48   0.140    -1.568552    11.11508
    -------------+----------------------------------------------------------------
         /athrho |  -.2801136   .2453392    -1.14   0.254    -.7609696    .2007424
    -------------+----------------------------------------------------------------
             rho |  -.2730102   .2270529                     -.6416477    .1980887
    ------------------------------------------------------------------------------
    LR test of rho=0: chi2(1) = 1.37223                       Prob > chi2 = 0.2414
    
    . biprobit (vote = logptax years)(private = logptax loginc years)
    
    Fitting comparison equation 1:
    
    Iteration 0:   log likelihood = -63.036914  
    Iteration 1:   log likelihood = -61.455896  
    Iteration 2:   log likelihood = -61.452436  
    Iteration 3:   log likelihood = -61.452436  
    
    Fitting comparison equation 2:
    
    Iteration 0:   log likelihood = -31.967097  
    Iteration 1:   log likelihood = -31.452424  
    Iteration 2:   log likelihood = -31.448958  
    Iteration 3:   log likelihood = -31.448958  
    
    Comparison:    log likelihood = -92.901393
    
    Fitting full model:
    
    Iteration 0:   log likelihood = -92.901393  
    Iteration 1:   log likelihood = -92.220515  
    Iteration 2:   log likelihood = -92.215279  
    Iteration 3:   log likelihood = -92.215278  
    
    Seemingly unrelated bivariate probit            Number of obs     =         95
                                                    Wald chi2(5)      =       4.77
    Log likelihood = -92.215278                     Prob > chi2       =     0.4440
    
    ------------------------------------------------------------------------------
                 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    vote         |
         logptax |  -.6138309   .4585021    -1.34   0.181    -1.512478    .2848167
           years |  -.0230864   .0143602    -1.61   0.108    -.0512319    .0050591
           _cons |   4.773266   3.235681     1.48   0.140    -1.568552    11.11508
    -------------+----------------------------------------------------------------
    private      |
         logptax |   -.194247   .6677031    -0.29   0.771    -1.502921    1.114427
          loginc |   .5289522   .5339413     0.99   0.322    -.5175536    1.575458
           years |  -.0107319   .0255361    -0.42   0.674    -.0607818     .039318
           _cons |  -5.108515    4.83203    -1.06   0.290    -14.57912    4.362089
    -------------+----------------------------------------------------------------
         /athrho |  -.2801136   .2453392    -1.14   0.254    -.7609696    .2007424
    -------------+----------------------------------------------------------------
             rho |  -.2730102   .2270529                     -.6416477    .1980887
    ------------------------------------------------------------------------------
    LR test of rho=0: chi2(1) = 1.37223                       Prob > chi2 = 0.2414
    Best regards,

    Marcos

    Comment


    • #3
      Thanks a lot Marcos. However, your example deals with bi-variate probit while my model is one where explanatory variable in the first stage is the dependent variable in the second stage. So it's a recursive bivariate probit model.

      Comment


      • #4
        Surely you may check this as well:

        Code:
        . webuse school
        
        . biprobit (private = vote logptax loginc years) (vote = private logptax years)
        
        Fitting comparison equation 1:
        
        Iteration 0:   log likelihood = -31.967097  
        Iteration 1:   log likelihood = -30.827412  
        Iteration 2:   log likelihood = -30.800599  
        Iteration 3:   log likelihood =  -30.80056  
        Iteration 4:   log likelihood =  -30.80056  
        
        Fitting comparison equation 2:
        
        Iteration 0:   log likelihood = -63.036914  
        Iteration 1:   log likelihood = -61.057179  
        Iteration 2:   log likelihood = -61.051485  
        Iteration 3:   log likelihood = -61.051485  
        
        Comparison:    log likelihood = -91.852045
        
        Fitting full model:
        
        Iteration 0:   log likelihood = -91.852045  (not concave)
        Iteration 1:   log likelihood = -82.719795  (not concave)
        Iteration 2:   log likelihood = -80.287621  
        Iteration 3:   log likelihood =  -77.74067  
        Iteration 4:   log likelihood = -76.469275  
        Iteration 5:   log likelihood = -76.288029  
        Iteration 6:   log likelihood = -76.195605  
        Iteration 7:   log likelihood = -76.125922  
        Iteration 8:   log likelihood = -76.088532  
        Iteration 9:   log likelihood = -76.082014  
        Iteration 10:  log likelihood = -76.077762  
        Iteration 11:  log likelihood = -76.076303  
        Iteration 12:  log likelihood = -76.075686  
        Iteration 13:  log likelihood = -76.075391  
        Iteration 14:  log likelihood = -76.075238  
        Iteration 15:  log likelihood = -76.075186  
        Iteration 16:  log likelihood = -76.075171  
        Iteration 17:  log likelihood = -76.075123  
        Iteration 18:  log likelihood =   -76.0751  
        Iteration 19:  log likelihood = -76.075099  
        
        Seemingly unrelated bivariate probit            Number of obs     =         95
                                                        Wald chi2(7)      =      77.94
        Log likelihood = -76.075099                     Prob > chi2       =     0.0000
        
        ------------------------------------------------------------------------------
                     |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        private      |
                vote |  -2.121034   .2403399    -8.83   0.000    -2.592092   -1.649977
             logptax |  -.4221233   .4150263    -1.02   0.309     -1.23556    .3913133
              loginc |   1.07e-06   .0013492     0.00   0.999    -.0026433    .0026454
               years |  -.0225277   .0137058    -1.64   0.100    -.0493905    .0043351
               _cons |   3.583567   2.932262     1.22   0.222    -2.163561    9.330695
        -------------+----------------------------------------------------------------
        vote         |
             private |  -2.121034   .2403405    -8.83   0.000    -2.592093   -1.649975
             logptax |  -.4221273   .4150227    -1.02   0.309    -1.235557    .3913021
               years |  -.0225276   .0137054    -1.64   0.100    -.0493898    .0043345
               _cons |   3.583608   2.932217     1.22   0.222    -2.163432    9.330647
        -------------+----------------------------------------------------------------
             /athrho |   14.21671   272.2404     0.05   0.958    -519.3646     547.798
        -------------+----------------------------------------------------------------
                 rho |          1   4.88e-10                            -1           1
        ------------------------------------------------------------------------------
        LR test of rho=0: chi2(1) = 31.5539                       Prob > chi2 = 0.0000
        
        . biprobit (vote = private logptax years)(private = vote logptax loginc years)
        
        Fitting comparison equation 1:
        
        Iteration 0:   log likelihood = -63.036914  
        Iteration 1:   log likelihood = -61.057179  
        Iteration 2:   log likelihood = -61.051485  
        Iteration 3:   log likelihood = -61.051485  
        
        Fitting comparison equation 2:
        
        Iteration 0:   log likelihood = -31.967097  
        Iteration 1:   log likelihood = -30.827412  
        Iteration 2:   log likelihood = -30.800599  
        Iteration 3:   log likelihood =  -30.80056  
        Iteration 4:   log likelihood =  -30.80056  
        
        Comparison:    log likelihood = -91.852045
        
        Fitting full model:
        
        Iteration 0:   log likelihood = -91.852045  (not concave)
        Iteration 1:   log likelihood = -82.719795  (not concave)
        Iteration 2:   log likelihood = -80.287621  
        Iteration 3:   log likelihood =  -77.74067  
        Iteration 4:   log likelihood = -76.469275  
        Iteration 5:   log likelihood = -76.288029  
        Iteration 6:   log likelihood = -76.195605  
        Iteration 7:   log likelihood = -76.125922  
        Iteration 8:   log likelihood = -76.088532  
        Iteration 9:   log likelihood = -76.082014  
        Iteration 10:  log likelihood = -76.077762  
        Iteration 11:  log likelihood = -76.076303  
        Iteration 12:  log likelihood = -76.075686  
        Iteration 13:  log likelihood = -76.075391  
        Iteration 14:  log likelihood = -76.075238  
        Iteration 15:  log likelihood = -76.075186  
        Iteration 16:  log likelihood = -76.075171  
        Iteration 17:  log likelihood = -76.075123  
        Iteration 18:  log likelihood =   -76.0751  
        Iteration 19:  log likelihood = -76.075099  
        
        Seemingly unrelated bivariate probit            Number of obs     =         95
                                                        Wald chi2(7)      =      77.94
        Log likelihood = -76.075099                     Prob > chi2       =     0.0000
        
        ------------------------------------------------------------------------------
                     |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        vote         |
             private |  -2.121034   .2403405    -8.83   0.000    -2.592093   -1.649975
             logptax |  -.4221273   .4150226    -1.02   0.309    -1.235557    .3913021
               years |  -.0225276   .0137054    -1.64   0.100    -.0493898    .0043345
               _cons |   3.583608   2.932217     1.22   0.222    -2.163432    9.330647
        -------------+----------------------------------------------------------------
        private      |
                vote |  -2.121034   .2403399    -8.83   0.000    -2.592092   -1.649977
             logptax |  -.4221233   .4150263    -1.02   0.309     -1.23556    .3913133
              loginc |   1.07e-06   .0013492     0.00   0.999    -.0026433    .0026454
               years |  -.0225277   .0137058    -1.64   0.100    -.0493905    .0043351
               _cons |   3.583567   2.932262     1.22   0.222     -2.16356    9.330695
        -------------+----------------------------------------------------------------
             /athrho |    14.2167   272.2415     0.05   0.958    -519.3668    547.8002
        -------------+----------------------------------------------------------------
                 rho |          1   4.88e-10                            -1           1
        ------------------------------------------------------------------------------
        LR test of rho=0: chi2(1) = 31.5539                       Prob > chi2 = 0.0000
        Best regards,

        Marcos

        Comment


        • #5
          Thanks for the guide. However, I cannot run recursive bivariate probit. There are two problems for me. First, Stata keeps running many iterations. I cannot find the final result. Then I changed the variable and face the second problem. It is informed 'convergence not achieved'. I don't know if the result is usable?

          Comment


          • #6
            Ploypallin, Welcome to Statalist. My generic advice for dealing with convergence problems is on pp.4-5 of

            https://www3.nd.edu/~rwilliam/xsoc73994/L02.pdf

            Without knowing more about your data and seeing your code, I don't know how much more advice we can give you. See pt #12 in the FAQ about asking effective questions.
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment


            • #7
              Dear Marcos,
              According to your explanation; biprobit (private = vote logptax loginc years) (vote = private logptax years), did you use 'lagged private' in the second step? Thanks

              Comment

              Working...
              X