Announcement

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

  • Hierarchical ordered probit model

    Hi,

    I would love to estimate an hierarchical ordered probit model, but I have only found the command
    Code:
    meoprobit DV IV, vce (robust)
    Nevertheless, I would love to exploit the longitudinal nature of my dataset. Is there an random effects variant? (such as the xtoprobit command for random effects ordered probit models?) I now I can do
    Code:
    meoprobit DV IV, re vce (robust)
    but this is only for cross-sectional datasets.



  • #2
    Nevertheless, I would love to exploit the longitudinal nature of my dataset. Is there an random effects variant? (such as the xtoprobit command for random effects ordered probit models?)
    I am not sure that I understand what you are getting at. xtprobit estimates a two-level random intercept model which can also be estimated using meprobit. If you want to estimate a two-level mixed effects ordered probit model, then go right ahead.

    Code:
    webuse union
    xtset idcode year
    xtprobit union age grade i.not_smsa south##c.year
    meprobit union age grade i.not_smsa south##c.year|| idcode:
    Res.:

    Code:
    . xtprobit union age grade i.not_smsa south##c.year
    
    Fitting comparison model:
    
    Iteration 0:   log likelihood =  -13864.23  
    Iteration 1:   log likelihood = -13545.541  
    Iteration 2:   log likelihood = -13544.385  
    Iteration 3:   log likelihood = -13544.385  
    
    Fitting full model:
    
    rho =  0.0     log likelihood = -13544.385
    rho =  0.1     log likelihood = -12237.655
    rho =  0.2     log likelihood = -11590.282
    rho =  0.3     log likelihood = -11211.185
    rho =  0.4     log likelihood = -10981.319
    rho =  0.5     log likelihood = -10852.793
    rho =  0.6     log likelihood = -10808.759
    rho =  0.7     log likelihood =  -10865.57
    
    Iteration 0:   log likelihood = -10807.712  
    Iteration 1:   log likelihood = -10599.332  
    Iteration 2:   log likelihood = -10552.287  
    Iteration 3:   log likelihood = -10552.225  
    Iteration 4:   log likelihood = -10552.225  
    
    Random-effects probit regression                Number of obs     =     26,200
    Group variable: idcode                          Number of groups  =      4,434
    
    Random effects u_i ~ Gaussian                   Obs per group:
                                                                  min =          1
                                                                  avg =        5.9
                                                                  max =         12
    
    Integration method: mvaghermite                 Integration pts.  =         12
    
                                                    Wald chi2(6)      =     220.91
    Log likelihood  = -10552.225                    Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------
           union |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .0082967   .0084599     0.98   0.327    -.0082843    .0248778
           grade |   .0482731   .0099469     4.85   0.000     .0287776    .0677686
      1.not_smsa |   -.139657   .0460548    -3.03   0.002    -.2299227   -.0493913
         1.south |  -1.584394    .358473    -4.42   0.000    -2.286989   -.8818002
            year |  -.0039854   .0088399    -0.45   0.652    -.0213113    .0133406
                 |
    south#c.year |
              1  |   .0134017   .0044622     3.00   0.003     .0046559    .0221475
                 |
           _cons |  -1.668202   .4751819    -3.51   0.000    -2.599542   -.7368628
    -------------+----------------------------------------------------------------
        /lnsig2u |   .6103616   .0458783                      .5204418    .7002814
    -------------+----------------------------------------------------------------
         sigma_u |    1.35687   .0311255                      1.297217    1.419267
             rho |   .6480233   .0104643                      .6272511    .6682502
    ------------------------------------------------------------------------------
    LR test of rho=0: chibar2(01) = 5984.32                Prob >= chibar2 = 0.000
    
    . 
    . meprobit union age grade i.not_smsa south##c.year|| idcode:
    
    Fitting fixed-effects model:
    
    Iteration 0:   log likelihood = -13560.682  
    Iteration 1:   log likelihood = -13544.386  
    Iteration 2:   log likelihood = -13544.385  
    
    Refining starting values:
    
    Grid node 0:   log likelihood = -10852.439
    
    Fitting full model:
    
    Iteration 0:   log likelihood = -10852.439  
    Iteration 1:   log likelihood = -10582.047  
    Iteration 2:   log likelihood = -10548.924  
    Iteration 3:   log likelihood = -10548.759  
    Iteration 4:   log likelihood = -10548.762  
    Iteration 5:   log likelihood = -10548.762  
    
    Mixed-effects probit regression                 Number of obs     =     26,200
    Group variable:          idcode                 Number of groups  =      4,434
    
                                                    Obs per group:
                                                                  min =          1
                                                                  avg =        5.9
                                                                  max =         12
    
    Integration method: mvaghermite                 Integration pts.  =          7
    
                                                    Wald chi2(6)      =     226.73
    Log likelihood = -10548.762                     Prob > chi2       =     0.0000
    ------------------------------------------------------------------------------
           union |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |    .008223   .0082976     0.99   0.322      -.00804    .0244861
           grade |   .0484164   .0098133     4.93   0.000     .0291827    .0676501
      1.not_smsa |  -.1392458   .0455343    -3.06   0.002    -.2284913   -.0500002
         1.south |   -1.58779   .3582428    -4.43   0.000    -2.289933   -.8856471
            year |  -.0039134   .0086835    -0.45   0.652    -.0209327    .0131058
                 |
    south#c.year |
              1  |   .0134334   .0044595     3.01   0.003     .0046928     .022174
                 |
           _cons |   -1.68694   .4679579    -3.60   0.000    -2.604121   -.7697595
    -------------+----------------------------------------------------------------
    idcode       |
       var(_cons)|   1.890777   .0906564                      1.721187    2.077077
    ------------------------------------------------------------------------------
    LR test vs. probit model: chibar2(01) = 5991.25       Prob >= chibar2 = 0.0000

    Comment


    • #3
      What do you have against using xtoprobit?

      At least for simpler models, it is pretty easy to get meoprobit to do the same things xtoprobit does:

      Code:
      webuse tvsfpors, clear
      xtset school
      xtoprobit thk prethk cc##tv, nolog vce(robust)
      meoprobit thk prethk cc##tv || school:, nolog vce(robust)
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 19.5 MP (2 processor)

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

      Comment


      • #4
        Richard Williams
        What is the best specification for weight in xtoprobit?
        svy: xtoprobit or
        xtoprobit Y X1 X2 X2 [pweight=weight]

        I don't understand the difference

        Comment


        • #5
          It definitely makes a difference if you have stratification or clustering. Also if you are analyzing subopulations. See

          https://www.statalist.org/forums/for...-are-available

          Even though I asked the original Q in that thread, I am still a little confused.

          An added consideration in this specific case: I don't think svy: works with xtoprobit. But meoprobit does.

          Anyway, I always just use svy:
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

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

          Comment


          • #6
            svy: definitely doesn't work with XTOPROBIT.

            I don't know if the error of "weight not constant within groups of defined by ID" can be addressed. I also would like to know the major cause of the error.
            Click image for larger version

Name:	2020-07-03.png
Views:	1
Size:	106.8 KB
ID:	1561818

            Comment

            Working...
            X