Announcement

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

  • Non proportional odds model in GSEM

    Does anyone know whether this can be done? I am trying to get marginal effects for a model I ran in GLLAMM, but I cannot get these - either using the margins command, or the gllapred command. Some forum posts suggest to re-estimate models from GLLAMM using Stata's own commands, like meologit, or gsem. However, how an ordered logistic regression model with non proportional odds is created in gsem is still a question to me.

    I look forward to your responses.

  • #2
    Hi Martijn. The coding is a little painful and probably error-prone, and you have to use the probit link, but the user-written regoprob2 (available from SSC) might meet your needs. Example:

    Code:
    use https://www.stata-press.com/data/r16/tvsfpors, clear
    xtset school
    quietly xtoprobit thk prethk i.cc i.tv
    margins cc tv
    
    quietly regoprob2 thk prethk cc tv, i(school) pl
    forval j = 1/4 {
        margins, at(cc=(0 1)) at(tv=(0 1)) predict(outcome(`j'))
    }
    regoprob2 is an older program and does not support factor variables. As shown, you can work around that but if you've got interaction or squared terms life may be more complicated.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

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

    Comment


    • #3
      Hi Richard,

      I installed the package, but when trying to fit a model, I receive the following error message:

      Code:
      regoprob2 degree_volunteering female, i(cntry2) pl
      
      Fitting constant-only model:
      __00000X not found
      r(111);
      Any idea what is causing the error message?
      Also, when using the sample data, I receive another error message:

      Code:
      . use https://www.stata-press.com/data/r16/tvsfpors, clear
      
      .  regoprob2 thk prethk cc tv, i(school) pl
      
      Fitting constant-only model:
      
      Fitting full model:
      
      Iteration 0:   log likelihood = -2192.2464  (not concave)
      Iteration 1:   log likelihood = -2164.8319  (not concave)
      no observations
      r(2000);

      Comment


      • #4
        I forgot, I had the exact same problem with regoprob2 a year ago. I wrote to the authors, and they said "As far as I can see, the problem isn’t regoprob2, but regoprob has some problems which can be overcome using the updated regoprob version. Unfortunately, [regoprob's author] has not updated his program. I have attached an updated version of the original regoprob program."

        The updated regoprob program can be found at

        https://www3.nd.edu/~rwilliam/stataf...rob_update.zip

        Extract the files and then place them someplace (e.g. c:\ado\personal\) where Stata will find them before it finds the original regoprob files.

        As a sidelight, regoprob and regoprob2 both came out long before xtoprobit. They are slower but I'm impressed with how well they work, giving very similar results.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

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

        Comment


        • #5
          That did solve the issue with the sample dataset, and I receive the expected output.
          Unfortunately, with my dataset, I still have the same error message returning:

          regoprob2 degree_volunteering female, i(cntry2) pl

          Fitting constant-only model:
          __00000X not found
          r(111);

          Comment


          • #6
            Does xtoprobit run ok?

            It isn't my program, but if you can email me your data and code I will try it.
            -------------------------------------------
            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
              Stefan Boes is going to post an updated regoprob soon which will make my workaround unnecessary. I can’t say much about the other problem you are having unless I have the data or a replicable example.
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              StataNow Version: 19.5 MP (2 processor)

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

              Comment


              • #8
                Hi Richard,

                xtoprobit works fine on my data, but regoprob2 does not:

                Code:
                . xtset cntry2
                       panel variable:  cntry2 (unbalanced)
                
                . xtoprobit degree_volunteering female, nolog
                
                Random-effects ordered probit regression        Number of obs     =     48,073
                Group variable: cntry2                          Number of groups  =         27
                
                Random effects u_i ~ Gaussian                   Obs per group:
                                                                              min =        714
                                                                              avg =    1,780.5
                                                                              max =      2,868
                
                Integration method: mvaghermite                 Integration pts.  =         12
                
                                                                Wald chi2(1)      =       1.83
                Log likelihood  = -56886.019                    Prob > chi2       =     0.1756
                
                -------------------------------------------------------------------------------------
                degree_volunteering |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                --------------------+----------------------------------------------------------------
                             female |   .0150184   .0110893     1.35   0.176    -.0067162     .036753
                --------------------+----------------------------------------------------------------
                              /cut1 |   .3611059   .0740433                      .2159837    .5062281
                              /cut2 |   .7400063   .0740825                      .5948072    .8852054
                              /cut3 |   .9599813   .0741238                      .8147012    1.105261
                              /cut4 |   1.175925   .0741827                      1.030529     1.32132
                              /cut5 |   1.609934   .0743879                      1.464136    1.755731
                --------------------+----------------------------------------------------------------
                          /sigma2_u |   .1460211   .0400027                      .0853548    .2498062
                -------------------------------------------------------------------------------------
                LR test vs. oprobit model: chibar2(01) = 4500.07      Prob >= chibar2 = 0.0000
                
                . regoprob2 degree_volunteering female, i(cntry2)
                
                Fitting constant-only model:
                __00000X not found
                r(111);

                Edit: After playing around with the data, selecting only a subsample of cases (max. 450 in each of the 27 countries, so 12,150 cases total) seems to make the model run and give me output. And the model still runs after adding additional covariates.

                Increasing the matsize does not solve the issues of not being able to run the model on the complete sample.
                Last edited by Martijn Hogerbrugge; 05 Jul 2019, 03:37.

                Comment


                • #9
                  What version of Stata do you have? 16 has better memory management. Again if you can give me the data or a replicable example I'll see if there is any easy workaround.

                  Sometimes you can get by with changing the version # in a program, e.g. change version 8 to version 14. But you have to make sure the program still works correctly then.
                  -------------------------------------------
                  Richard Williams, Notre Dame Dept of Sociology
                  StataNow Version: 19.5 MP (2 processor)

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

                  Comment


                  • #10
                    I have Stata version 15.1. I will send the data by email to you now.
                    Thanks for your help.

                    Comment


                    • #11
                      Hi,
                      Sir Richard Williams, I am using the regoprob2 command for estimation. My dependent variable having 10 categories and I am using 5 year panel data. I used the follopwing command
                      ​​​​​​​
                      Code:
                      regoprob2 A170 quantX0472 quantX0473 quantX0474 relative2 relative3 relative4 IU0 X003, i(newid)
                      I am getting the results too but when I am using the margin command, you have mentioned in #2. it showing the error. Kindly guide me to calculate margins in the case of regoprob2.

                      Comment


                      • #12
                        Neeraj Kumar My earlier code still works. Please show your commands and output. It could just be you have a syntax problem (e.g. a misspelled option) or it could be a more fundamental problem. Without seeing your code and output, it is impossible to say.
                        -------------------------------------------
                        Richard Williams, Notre Dame Dept of Sociology
                        StataNow Version: 19.5 MP (2 processor)

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

                        Comment


                        • #13
                          Thank you so much Sir Richard Williams for your reply. Sir here I am attaching the command as well output.

                          Code:
                          . regoprob2 A170 quantX0472 quantX0473 quantX0474 relative2 relative3 relative4 IU0 X003 X011 marriage, i(newid)
                          
                          Fitting constant-only model:
                          rho <= 0, set to rho = 0.01
                          
                          Fitting full model:
                          
                          Iteration 0:   log likelihood =  -19799.85  
                          Iteration 1:   log likelihood = -19013.978  
                          Iteration 2:   log likelihood = -18984.695  
                          Iteration 3:   log likelihood =  -18983.71  
                          Iteration 4:   log likelihood = -18983.708  
                          Iteration 5:   log likelihood = -18983.708  
                          
                          Random Effects Generalized Ordered Probit         Number of obs   =       9458
                                                                            LR chi2(90)     =      14.62
                          Log likelihood = -18983.708                       Prob > chi2     =     1.0000
                          
                          ------------------------------------------------------------------------------
                                  A170 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                          -------------+----------------------------------------------------------------
                          mleq1        |
                            quantX0472 |   .3712199   .0703646     5.28   0.000     .2333078    .5091319
                            quantX0473 |   .2990958   .1052161     2.84   0.004      .092876    .5053155
                            quantX0474 |   .5384643   .1444039     3.73   0.000     .2554379    .8214907
                             relative2 |  -.0387631   .0731855    -0.53   0.596     -.182204    .1046779
                             relative3 |   .1104649   .0987894     1.12   0.263    -.0831588    .3040886
                             relative4 |   .1872434   .1362469     1.37   0.169    -.0797956    .4542824
                                   IU0 |   .8879326   .3449306     2.57   0.010      .211881    1.563984
                                  X003 |  -.0047363   .0016921    -2.80   0.005    -.0080528   -.0014199
                                  X011 |  -.0020559   .0140705    -0.15   0.884    -.0296337    .0255219
                              marriage |   .1488653   .0695044     2.14   0.032     .0126391    .2850914
                                 _cons |   .8420028   .2696995     3.12   0.002     .3134014    1.370604
                          -------------+----------------------------------------------------------------
                          mleq2        |
                            quantX0472 |   .2980582   .0613732     4.86   0.000      .177769    .4183475
                            quantX0473 |   .2180192   .0910305     2.40   0.017     .0396027    .3964358
                            quantX0474 |   .3965289   .1135108     3.49   0.000     .1740518     .619006
                             relative2 |   .0826411   .0645248     1.28   0.200    -.0438251    .2091074
                             relative3 |   .2806092   .0846074     3.32   0.001     .1147818    .4464365
                             relative4 |     .25531   .1074024     2.38   0.017     .0448052    .4658148
                                   IU0 |   .1374752   .3274172     0.42   0.675    -.5042508    .7792011
                                  X003 |  -.0035726   .0015252    -2.34   0.019     -.006562   -.0005833
                                  X011 |  -.0052946   .0124854    -0.42   0.672    -.0297656    .0191764
                              marriage |   .1408971     .06285     2.24   0.025     .0177133    .2640808
                                 _cons |   1.199536    .255893     4.69   0.000     .6979952    1.701077
                          -------------+----------------------------------------------------------------
                          mleq3        |
                            quantX0472 |   .3243286   .0476655     6.80   0.000      .230906    .4177513
                            quantX0473 |   .5907402   .0751643     7.86   0.000     .4434208    .7380596
                            quantX0474 |   .9798843   .0933194    10.50   0.000     .7969817    1.162787
                             relative2 |  -.0617923   .0494261    -1.25   0.211    -.1586657    .0350811
                             relative3 |  -.0799129   .0628837    -1.27   0.204    -.2031626    .0433368
                             relative4 |  -.1988519   .0861433    -2.31   0.021    -.3676896   -.0300141
                                   IU0 |   2.645902    .231547    11.43   0.000     2.192078    3.099726
                                  X003 |  -.0031191   .0011826    -2.64   0.008    -.0054369   -.0008014
                                  X011 |  -.0506203   .0093759    -5.40   0.000    -.0689967   -.0322438
                              marriage |   .2080788   .0486246     4.28   0.000     .1127763    .3033812
                                 _cons |  -1.167085    .181235    -6.44   0.000    -1.522299   -.8118708
                          -------------+----------------------------------------------------------------
                          mleq4        |
                            quantX0472 |    .178823   .0465012     3.85   0.000     .0876823    .2699638
                            quantX0473 |   .4139642   .0721104     5.74   0.000     .2726304    .5552979
                            quantX0474 |   .6895927   .0882476     7.81   0.000     .5166306    .8625548
                             relative2 |   .0951083   .0479796     1.98   0.047       .00107    .1891466
                             relative3 |   .1154234     .06167     1.87   0.061    -.0054476    .2362944
                             relative4 |   .0831767   .0825284     1.01   0.314     -.078576    .2449294
                                   IU0 |   1.401816   .2258157     6.21   0.000     .9592257    1.844407
                                  X003 |  -.0043627    .001138    -3.83   0.000    -.0065933   -.0021322
                                  X011 |  -.0209891    .009074    -2.31   0.021    -.0387738   -.0032044
                              marriage |   .1530804   .0470582     3.25   0.001     .0608481    .2453127
                                 _cons |   -.417688   .1778758    -2.35   0.019    -.7663183   -.0690578
                          -------------+----------------------------------------------------------------
                          mleq5        |
                            quantX0472 |   .2982999   .0434344     6.87   0.000     .2131701    .3834297
                            quantX0473 |   .7951107   .0650926    12.22   0.000     .6675315    .9226899
                            quantX0474 |   1.356479   .0774001    17.53   0.000     1.204778    1.508181
                             relative2 |  -.0719204   .0439514    -1.64   0.102    -.1580637    .0142228
                             relative3 |  -.2888017   .0553227    -5.22   0.000    -.3972322   -.1803713
                             relative4 |  -.5684913   .0720125    -7.89   0.000    -.7096332   -.4273495
                                   IU0 |   2.598029   .2098799    12.38   0.000     2.186672    3.009386
                                  X003 |  -.0031936   .0010509    -3.04   0.002    -.0052533    -.001134
                                  X011 |  -.0481928   .0085047    -5.67   0.000    -.0648618   -.0315239
                              marriage |    .177438   .0434556     4.08   0.000     .0922666    .2626094
                                 _cons |  -2.060834   .1659657   -12.42   0.000    -2.386121   -1.735548
                          -------------+----------------------------------------------------------------
                          mleq6        |
                            quantX0472 |   .1573262    .043758     3.60   0.000      .071562    .2430904
                            quantX0473 |   .4141032   .0646828     6.40   0.000     .2873271    .5408792
                            quantX0474 |   .8384677   .0760297    11.03   0.000     .6894522    .9874832
                             relative2 |   .0577221   .0442551     1.30   0.192    -.0290162    .1444604
                             relative3 |  -.0733708   .0556145    -1.32   0.187    -.1823732    .0356315
                             relative4 |  -.0919314   .0711935    -1.29   0.197     -.231468    .0476052
                                   IU0 |   1.869935   .2134152     8.76   0.000     1.451649    2.288221
                                  X003 |  -.0025437   .0010614    -2.40   0.017     -.004624   -.0004635
                                  X011 |  -.0453112   .0087243    -5.19   0.000    -.0624105   -.0282119
                              marriage |   .1260287   .0440101     2.86   0.004     .0397706    .2122869
                                 _cons |   -1.69491   .1689797   -10.03   0.000    -2.026104   -1.363715
                          -------------+----------------------------------------------------------------
                          mleq7        |
                            quantX0472 |   .1296422   .0472218     2.75   0.006     .0370892    .2221953
                            quantX0473 |   .3736992   .0691113     5.41   0.000     .2382436    .5091548
                            quantX0474 |   .7959402   .0799526     9.96   0.000      .639236    .9526444
                             relative2 |  -.0560071   .0480069    -1.17   0.243    -.1500989    .0380847
                             relative3 |  -.1580012   .0604743    -2.61   0.009    -.2765287   -.0394737
                             relative4 |  -.2092494   .0748396    -2.80   0.005    -.3559323   -.0625665
                                   IU0 |   2.980595   .2617242    11.39   0.000     2.467624    3.493565
                                  X003 |  -.0029187   .0011421    -2.56   0.011    -.0051573   -.0006801
                                  X011 |  -.0383926    .009545    -4.02   0.000    -.0571004   -.0196849
                              marriage |   .0742837   .0476494     1.56   0.119    -.0191073    .1676747
                                 _cons |  -2.883938   .2061239   -13.99   0.000    -3.287933   -2.479943
                          -------------+----------------------------------------------------------------
                          mleq8        |
                            quantX0472 |  -.0686852   .0517338    -1.33   0.184    -.1700816    .0327112
                            quantX0473 |   .1030861   .0753398     1.37   0.171    -.0445773    .2507494
                            quantX0474 |   .4448737   .0852212     5.22   0.000     .2778432    .6119042
                             relative2 |   .0468859   .0527204     0.89   0.374    -.0564441    .1502159
                             relative3 |  -.0389005   .0671361    -0.58   0.562    -.1704848    .0926837
                             relative4 |   .0145576   .0801179     0.18   0.856    -.1424706    .1715857
                                   IU0 |    1.81802   .3013497     6.03   0.000     1.227385    2.408654
                                  X003 |  -.0013129   .0012581    -1.04   0.297    -.0037787    .0011528
                                  X011 |  -.0157169   .0105124    -1.50   0.135    -.0363209     .004887
                              marriage |     .02127   .0514969     0.41   0.680    -.0796621    .1222021
                                 _cons |   -2.31973   .2351128    -9.87   0.000    -2.780543   -1.858918
                          -------------+----------------------------------------------------------------
                          mleq9        |
                            quantX0472 |  -.2054642   .0561782    -3.66   0.000    -.3155714    -.095357
                            quantX0473 |  -.1367442   .0824348    -1.66   0.097    -.2983133    .0248249
                            quantX0474 |   .0396952   .0916723     0.43   0.665    -.1399791    .2193696
                             relative2 |   .1036618   .0570458     1.82   0.069     -.008146    .2154696
                             relative3 |   .1314401   .0733415     1.79   0.073    -.0123065    .2751868
                             relative4 |   .1700958   .0866897     1.96   0.050     .0001872    .3400044
                                   IU0 |   2.230735   .3526587     6.33   0.000     1.539537    2.921933
                                  X003 |  -.0000519   .0013914    -0.04   0.970    -.0027789    .0026752
                                  X011 |  -.0031044   .0113738    -0.27   0.785    -.0253966    .0191877
                              marriage |  -.0652516   .0560576    -1.16   0.244    -.1751224    .0446193
                                 _cons |  -2.801932   .2749377   -10.19   0.000      -3.3408   -2.263064
                          -------------+----------------------------------------------------------------
                          rho          |
                                 _cons |   .0357694   .0098023     3.65   0.000     .0165573    .0549815
                          ------------------------------------------------------------------------------

                          There most of the variable used in the above output are dummy variable (having value 0 and 1) except IU0, X003 and X011. These three variables are continuous. My dependent variable A170 having 10 categories.


                          Code:
                          . forval j = 1/10{
                            2.
                          .     margins, at(quantX0472=(0 1)) at(quantX0473=(0 1))  at(quantX0474=(0 1)) at(relative2=(0 1)) at(relative3=(0 1)) at(relativ
                          > e4=(0 1)) at(marriage=(0 1))at(IU0=(0.747)) at(X011=(2.60)) at (X003= (39.17))  predict (outcome(`j'))
                            3.
                          . }
                          command margins not appropriate after mean
                          r(322);
                          The values mentioned in the bracket of the variables IU0, X011 and X003 are the mean values.
                          Kindly guide my further on the issue.


                          Last edited by Neeraj Kumar; 27 Jul 2022, 15:40.

                          Comment


                          • #14
                            Is there an intermediate command before margins (E.g. mean) that you are not showing us?

                            sometimes commands are super-picky about spaces. Make sure there is always one space before each at, and no spaces between the at and the following parentheses.

                            you are allowing all coefficients to differed between panels. I always think gologit models are pointless in such situations. They gain you no parsimony, so you might as well use better known mlogit models.

                            if you still can’t get the model to run, you can either try posting an extract of your data, or, if you are free to share, send your data to me. My first guess, though, is that either you aren’t showing us all your commands, or there is a trivial syntax error which is zapping things. Even if the model did run I don’t think it would be worth much as is, but it might be worth something if several variables meet the parallel lines constraint.
                            -------------------------------------------
                            Richard Williams, Notre Dame Dept of Sociology
                            StataNow Version: 19.5 MP (2 processor)

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

                            Comment


                            • #15
                              Yes, I have calculated the mean of my three continuous variables, these variable I have used in the margin also. I am sharing the entire result now. Thank you so much for your guidance. One question is it correct to use the mean value which I have used in the margin for my continuous variable. Actually I had run the wald test earlier. That result skipped from my mind to save.

                              Code:
                               
                              . regoprob2 A170 quantX0472 quantX0473 quantX0474 relative2 relative3 relative4 IU0 X003 X011 marriage, i(newid)
                              
                              Fitting constant-only model:
                              rho <= 0, set to rho = 0.01
                              
                              Fitting full model:
                              
                              Iteration 0:   log likelihood =  -19799.85  
                              Iteration 1:   log likelihood = -19013.978  
                              Iteration 2:   log likelihood = -18984.695  
                              Iteration 3:   log likelihood =  -18983.71  
                              Iteration 4:   log likelihood = -18983.708  
                              Iteration 5:   log likelihood = -18983.708  
                              
                              Random Effects Generalized Ordered Probit         Number of obs   =       9458
                                                                                LR chi2(90)     =      14.62
                              Log likelihood = -18983.708                       Prob > chi2     =     1.0000
                              
                              ------------------------------------------------------------------------------
                                      A170 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                              mleq1        |
                                quantX0472 |   .3712199   .0703646     5.28   0.000     .2333078    .5091319
                                quantX0473 |   .2990958   .1052161     2.84   0.004      .092876    .5053155
                                quantX0474 |   .5384643   .1444039     3.73   0.000     .2554379    .8214907
                                 relative2 |  -.0387631   .0731855    -0.53   0.596     -.182204    .1046779
                                 relative3 |   .1104649   .0987894     1.12   0.263    -.0831588    .3040886
                                 relative4 |   .1872434   .1362469     1.37   0.169    -.0797956    .4542824
                                       IU0 |   .8879326   .3449306     2.57   0.010      .211881    1.563984
                                      X003 |  -.0047363   .0016921    -2.80   0.005    -.0080528   -.0014199
                                      X011 |  -.0020559   .0140705    -0.15   0.884    -.0296337    .0255219
                                  marriage |   .1488653   .0695044     2.14   0.032     .0126391    .2850914
                                     _cons |   .8420028   .2696995     3.12   0.002     .3134014    1.370604
                              -------------+----------------------------------------------------------------
                              mleq2        |
                                quantX0472 |   .2980582   .0613732     4.86   0.000      .177769    .4183475
                                quantX0473 |   .2180192   .0910305     2.40   0.017     .0396027    .3964358
                                quantX0474 |   .3965289   .1135108     3.49   0.000     .1740518     .619006
                                 relative2 |   .0826411   .0645248     1.28   0.200    -.0438251    .2091074
                                 relative3 |   .2806092   .0846074     3.32   0.001     .1147818    .4464365
                                 relative4 |     .25531   .1074024     2.38   0.017     .0448052    .4658148
                                       IU0 |   .1374752   .3274172     0.42   0.675    -.5042508    .7792011
                                      X003 |  -.0035726   .0015252    -2.34   0.019     -.006562   -.0005833
                                      X011 |  -.0052946   .0124854    -0.42   0.672    -.0297656    .0191764
                                  marriage |   .1408971     .06285     2.24   0.025     .0177133    .2640808
                                     _cons |   1.199536    .255893     4.69   0.000     .6979952    1.701077
                              -------------+----------------------------------------------------------------
                              mleq3        |
                                quantX0472 |   .3243286   .0476655     6.80   0.000      .230906    .4177513
                                quantX0473 |   .5907402   .0751643     7.86   0.000     .4434208    .7380596
                                quantX0474 |   .9798843   .0933194    10.50   0.000     .7969817    1.162787
                                 relative2 |  -.0617923   .0494261    -1.25   0.211    -.1586657    .0350811
                                 relative3 |  -.0799129   .0628837    -1.27   0.204    -.2031626    .0433368
                                 relative4 |  -.1988519   .0861433    -2.31   0.021    -.3676896   -.0300141
                                       IU0 |   2.645902    .231547    11.43   0.000     2.192078    3.099726
                                      X003 |  -.0031191   .0011826    -2.64   0.008    -.0054369   -.0008014
                                      X011 |  -.0506203   .0093759    -5.40   0.000    -.0689967   -.0322438
                                  marriage |   .2080788   .0486246     4.28   0.000     .1127763    .3033812
                                     _cons |  -1.167085    .181235    -6.44   0.000    -1.522299   -.8118708
                              -------------+----------------------------------------------------------------
                              mleq4        |
                                quantX0472 |    .178823   .0465012     3.85   0.000     .0876823    .2699638
                                quantX0473 |   .4139642   .0721104     5.74   0.000     .2726304    .5552979
                                quantX0474 |   .6895927   .0882476     7.81   0.000     .5166306    .8625548
                                 relative2 |   .0951083   .0479796     1.98   0.047       .00107    .1891466
                                 relative3 |   .1154234     .06167     1.87   0.061    -.0054476    .2362944
                                 relative4 |   .0831767   .0825284     1.01   0.314     -.078576    .2449294
                                       IU0 |   1.401816   .2258157     6.21   0.000     .9592257    1.844407
                                      X003 |  -.0043627    .001138    -3.83   0.000    -.0065933   -.0021322
                                      X011 |  -.0209891    .009074    -2.31   0.021    -.0387738   -.0032044
                                  marriage |   .1530804   .0470582     3.25   0.001     .0608481    .2453127
                                     _cons |   -.417688   .1778758    -2.35   0.019    -.7663183   -.0690578
                              -------------+----------------------------------------------------------------
                              mleq5        |
                                quantX0472 |   .2982999   .0434344     6.87   0.000     .2131701    .3834297
                                quantX0473 |   .7951107   .0650926    12.22   0.000     .6675315    .9226899
                                quantX0474 |   1.356479   .0774001    17.53   0.000     1.204778    1.508181
                                 relative2 |  -.0719204   .0439514    -1.64   0.102    -.1580637    .0142228
                                 relative3 |  -.2888017   .0553227    -5.22   0.000    -.3972322   -.1803713
                                 relative4 |  -.5684913   .0720125    -7.89   0.000    -.7096332   -.4273495
                                       IU0 |   2.598029   .2098799    12.38   0.000     2.186672    3.009386
                                      X003 |  -.0031936   .0010509    -3.04   0.002    -.0052533    -.001134
                                      X011 |  -.0481928   .0085047    -5.67   0.000    -.0648618   -.0315239
                                  marriage |    .177438   .0434556     4.08   0.000     .0922666    .2626094
                                     _cons |  -2.060834   .1659657   -12.42   0.000    -2.386121   -1.735548
                              -------------+----------------------------------------------------------------
                              mleq6        |
                                quantX0472 |   .1573262    .043758     3.60   0.000      .071562    .2430904
                                quantX0473 |   .4141032   .0646828     6.40   0.000     .2873271    .5408792
                                quantX0474 |   .8384677   .0760297    11.03   0.000     .6894522    .9874832
                                 relative2 |   .0577221   .0442551     1.30   0.192    -.0290162    .1444604
                                 relative3 |  -.0733708   .0556145    -1.32   0.187    -.1823732    .0356315
                                 relative4 |  -.0919314   .0711935    -1.29   0.197     -.231468    .0476052
                                       IU0 |   1.869935   .2134152     8.76   0.000     1.451649    2.288221
                                      X003 |  -.0025437   .0010614    -2.40   0.017     -.004624   -.0004635
                                      X011 |  -.0453112   .0087243    -5.19   0.000    -.0624105   -.0282119
                                  marriage |   .1260287   .0440101     2.86   0.004     .0397706    .2122869
                                     _cons |   -1.69491   .1689797   -10.03   0.000    -2.026104   -1.363715
                              -------------+----------------------------------------------------------------
                              mleq7        |
                                quantX0472 |   .1296422   .0472218     2.75   0.006     .0370892    .2221953
                                quantX0473 |   .3736992   .0691113     5.41   0.000     .2382436    .5091548
                                quantX0474 |   .7959402   .0799526     9.96   0.000      .639236    .9526444
                                 relative2 |  -.0560071   .0480069    -1.17   0.243    -.1500989    .0380847
                                 relative3 |  -.1580012   .0604743    -2.61   0.009    -.2765287   -.0394737
                                 relative4 |  -.2092494   .0748396    -2.80   0.005    -.3559323   -.0625665
                                       IU0 |   2.980595   .2617242    11.39   0.000     2.467624    3.493565
                                      X003 |  -.0029187   .0011421    -2.56   0.011    -.0051573   -.0006801
                                      X011 |  -.0383926    .009545    -4.02   0.000    -.0571004   -.0196849
                                  marriage |   .0742837   .0476494     1.56   0.119    -.0191073    .1676747
                                     _cons |  -2.883938   .2061239   -13.99   0.000    -3.287933   -2.479943
                              -------------+----------------------------------------------------------------
                              mleq8        |
                                quantX0472 |  -.0686852   .0517338    -1.33   0.184    -.1700816    .0327112
                                quantX0473 |   .1030861   .0753398     1.37   0.171    -.0445773    .2507494
                                quantX0474 |   .4448737   .0852212     5.22   0.000     .2778432    .6119042
                                 relative2 |   .0468859   .0527204     0.89   0.374    -.0564441    .1502159
                                 relative3 |  -.0389005   .0671361    -0.58   0.562    -.1704848    .0926837
                                 relative4 |   .0145576   .0801179     0.18   0.856    -.1424706    .1715857
                                       IU0 |    1.81802   .3013497     6.03   0.000     1.227385    2.408654
                                      X003 |  -.0013129   .0012581    -1.04   0.297    -.0037787    .0011528
                                      X011 |  -.0157169   .0105124    -1.50   0.135    -.0363209     .004887
                                  marriage |     .02127   .0514969     0.41   0.680    -.0796621    .1222021
                                     _cons |   -2.31973   .2351128    -9.87   0.000    -2.780543   -1.858918
                              -------------+----------------------------------------------------------------
                              mleq9        |
                                quantX0472 |  -.2054642   .0561782    -3.66   0.000    -.3155714    -.095357
                                quantX0473 |  -.1367442   .0824348    -1.66   0.097    -.2983133    .0248249
                                quantX0474 |   .0396952   .0916723     0.43   0.665    -.1399791    .2193696
                                 relative2 |   .1036618   .0570458     1.82   0.069     -.008146    .2154696
                                 relative3 |   .1314401   .0733415     1.79   0.073    -.0123065    .2751868
                                 relative4 |   .1700958   .0866897     1.96   0.050     .0001872    .3400044
                                       IU0 |   2.230735   .3526587     6.33   0.000     1.539537    2.921933
                                      X003 |  -.0000519   .0013914    -0.04   0.970    -.0027789    .0026752
                                      X011 |  -.0031044   .0113738    -0.27   0.785    -.0253966    .0191877
                                  marriage |  -.0652516   .0560576    -1.16   0.244    -.1751224    .0446193
                                     _cons |  -2.801932   .2749377   -10.19   0.000      -3.3408   -2.263064
                              -------------+----------------------------------------------------------------
                              rho          |
                                     _cons |   .0357694   .0098023     3.65   0.000     .0165573    .0549815
                              ------------------------------------------------------------------------------
                              
                              . forval j = 1/10 {
                                2. 
                              .     margins, at(quantX0472=(0 1)) at(quantX0473=(0 1))  at(quantX0474=(0 1)) at(relative2=(0 1)) at(relative3=(0 1)) at(relativ
                              > e4=(0 1)) at(marriage=(0 1))at(IU0=(0.747)) at(X011=(2.60)) at (X003=(39.17)) predict (outcome (`j'))
                                3. 
                              . }
                              
                              Predictive margins                              Number of obs     =      9,458
                              Model VCE    : OIM
                              
                              Expression   : Pr(A170==1), predict(outcome (1))
                              
                              1._at        : quantX0472      =           0
                              
                              2._at        : quantX0472      =           1
                              
                              3._at        : quantX0473      =           0
                              
                              4._at        : quantX0473      =           1
                              
                              5._at        : quantX0474      =           0
                              
                              6._at        : quantX0474      =           1
                              
                              7._at        : relative2       =           0
                              
                              8._at        : relative2       =           1
                              
                              9._at        : relative3       =           0
                              
                              10._at       : relative3       =           1
                              
                              11._at       : relative4       =           0
                              
                              12._at       : relative4       =           1
                              
                              13._at       : marriage        =           0
                              
                              14._at       : marriage        =           1
                              
                              15._at       : IU0             =        .747
                              
                              16._at       : X011            =         2.6
                              
                              17._at       : X003            =       39.17
                              
                              ------------------------------------------------------------------------------
                                           |            Delta-method
                                           |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                       _at |
                                        1  |   .0606092   .0045526    13.31   0.000     .0516864    .0695321
                                        2  |   .0286091   .0027828    10.28   0.000     .0231549    .0340632
                                        3  |   .0488252   .0029216    16.71   0.000     .0430991    .0545514
                                        4  |   .0261725   .0051535     5.08   0.000     .0160719    .0362732
                                        5  |    .052846   .0040175    13.15   0.000     .0449719    .0607201
                                        6  |   .0162795   .0046103     3.53   0.000     .0072435    .0253154
                                        7  |   .0435483   .0025678    16.96   0.000     .0385154    .0485811
                                        8  |   .0470542   .0056855     8.28   0.000     .0359108    .0581975
                                        9  |   .0457005   .0024691    18.51   0.000     .0408612    .0505398
                                       10  |   .0364689   .0068043     5.36   0.000     .0231328     .049805
                                       11  |   .0467201   .0028847    16.20   0.000     .0410661    .0523741
                                       12  |   .0316686   .0081775     3.87   0.000      .015641    .0476961
                                       13  |   .0573123   .0071453     8.02   0.000     .0433076    .0713169
                                       14  |   .0427777   .0021926    19.51   0.000     .0384803    .0470751
                                       15  |   .0440387   .0021183    20.79   0.000     .0398869    .0481904
                                       16  |   .0443512   .0021256    20.87   0.000     .0401852    .0485172
                                       17  |   .0434627   .0021188    20.51   0.000     .0393099    .0476154
                              ------------------------------------------------------------------------------
                              
                              Predictive margins                              Number of obs     =      9,458
                              Model VCE    : OIM
                              
                              Expression   : Pr(A170==2), predict(outcome (2))
                              
                              1._at        : quantX0472      =           0
                              
                              2._at        : quantX0472      =           1
                              
                              3._at        : quantX0473      =           0
                              
                              4._at        : quantX0473      =           1
                              
                              5._at        : quantX0474      =           0
                              
                              6._at        : quantX0474      =           1
                              
                              7._at        : relative2       =           0
                              
                              8._at        : relative2       =           1
                              
                              9._at        : relative3       =           0
                              
                              10._at       : relative3       =           1
                              
                              11._at       : relative4       =           0
                              
                              12._at       : relative4       =           1
                              
                              13._at       : marriage        =           0
                              
                              14._at       : marriage        =           1
                              
                              15._at       : IU0             =        .747
                              
                              16._at       : X011            =         2.6
                              
                              17._at       : X003            =       39.17
                              
                              ------------------------------------------------------------------------------
                                           |            Delta-method
                                           |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                       _at |
                                        1  |    .015423   .0026154     5.90   0.000      .010297    .0205491
                                        2  |   .0144205   .0021437     6.73   0.000     .0102189     .018622
                                        3  |   .0156091   .0016876     9.25   0.000     .0123014    .0189168
                                        4  |    .015949   .0039668     4.02   0.000     .0081744    .0237237
                                        5  |   .0162197    .002594     6.25   0.000     .0111355    .0213039
                                        6  |   .0148059    .004372     3.39   0.001      .006237    .0233748
                                        7  |   .0195844   .0017969    10.90   0.000     .0160625    .0231063
                                        8  |   .0068872   .0031367     2.20   0.028     .0007393    .0130351
                                        9  |   .0195646   .0017148    11.41   0.000     .0162036    .0229255
                                       10  |   .0010094    .003904     0.26   0.796    -.0066424    .0086611
                                       11  |   .0193331   .0022446     8.61   0.000     .0149337    .0237325
                                       12  |     .00828   .0057569     1.44   0.150    -.0030033    .0195633
                                       13  |    .019118   .0043981     4.35   0.000     .0104979     .027738
                                       14  |   .0161526   .0013567    11.91   0.000     .0134935    .0188116
                                       15  |   .0167697   .0013285    12.62   0.000     .0141658    .0193736
                                       16  |   .0164002   .0013078    12.54   0.000     .0138369    .0189634
                                       17  |   .0165172   .0013249    12.47   0.000     .0139204     .019114
                              ------------------------------------------------------------------------------
                              
                              Predictive margins                              Number of obs     =      9,458
                              Model VCE    : OIM
                              
                              Expression   : Pr(A170==3), predict(outcome (3))
                              
                              1._at        : quantX0472      =           0
                              
                              2._at        : quantX0472      =           1
                              
                              3._at        : quantX0473      =           0
                              
                              4._at        : quantX0473      =           1
                              
                              5._at        : quantX0474      =           0
                              
                              6._at        : quantX0474      =           1
                              
                              7._at        : relative2       =           0
                              
                              8._at        : relative2       =           1
                              
                              9._at        : relative3       =           0
                              
                              10._at       : relative3       =           1
                              
                              11._at       : relative4       =           0
                              
                              12._at       : relative4       =           1
                              
                              13._at       : marriage        =           0
                              
                              14._at       : marriage        =           1
                              
                              15._at       : IU0             =        .747
                              
                              16._at       : X011            =         2.6
                              
                              17._at       : X003            =       39.17
                              
                              ------------------------------------------------------------------------------
                                           |            Delta-method
                                           |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                       _at |
                                        1  |   .1181924   .0055021    21.48   0.000     .1074084    .1289764
                                        2  |    .080503   .0044121    18.25   0.000     .0718554    .0891506
                                        3  |   .1168936     .00411    28.44   0.000     .1088382    .1249491
                                        4  |   .0311195   .0055732     5.58   0.000     .0201963    .0420427
                                        5  |   .1368172   .0058796    23.27   0.000     .1252935     .148341
                                        6  |     .00925   .0043176     2.14   0.032     .0007877    .0177122
                                        7  |   .0924863   .0035634    25.95   0.000     .0855022    .0994704
                                        8  |   .1157135   .0076099    15.21   0.000     .1007985    .1306286
                                        9  |   .0914359    .003171    28.84   0.000     .0852208    .0976509
                                       10  |   .1375691   .0110952    12.40   0.000      .115823    .1593153
                                       11  |   .0874887   .0032713    26.74   0.000      .081077    .0939004
                                       12  |   .1604886   .0154795    10.37   0.000     .1301493     .190828
                                       13  |   .1273619   .0097832    13.02   0.000     .1081872    .1465366
                                       14  |   .0947404   .0031169    30.40   0.000     .0886314    .1008495
                                       15  |   .0937732   .0029652    31.62   0.000     .0879614     .099585
                                       16  |   .0965522   .0029929    32.26   0.000     .0906862    .1024183
                                       17  |   .0976772    .003022    32.32   0.000     .0917543    .1036002
                              ------------------------------------------------------------------------------
                              
                              Predictive margins                              Number of obs     =      9,458
                              Model VCE    : OIM
                              
                              Expression   : Pr(A170==4), predict(outcome (4))
                              
                              1._at        : quantX0472      =           0
                              
                              2._at        : quantX0472      =           1
                              
                              3._at        : quantX0473      =           0
                              
                              4._at        : quantX0473      =           1
                              
                              5._at        : quantX0474      =           0
                              
                              6._at        : quantX0474      =           1
                              
                              7._at        : relative2       =           0
                              
                              8._at        : relative2       =           1
                              
                              9._at        : relative3       =           0
                              
                              10._at       : relative3       =           1
                              
                              11._at       : relative4       =           0
                              
                              12._at       : relative4       =           1
                              
                              13._at       : marriage        =           0
                              
                              14._at       : marriage        =           1
                              
                              15._at       : IU0             =        .747
                              
                              16._at       : X011            =         2.6
                              
                              17._at       : X003            =       39.17
                              
                              ------------------------------------------------------------------------------
                                           |            Delta-method
                                           |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                       _at |
                                        1  |   .0347948   .0024048    14.47   0.000     .0300814    .0395083
                                        2  |   .0581399   .0036259    16.03   0.000     .0510332    .0652465
                                        3  |   .0427779   .0022321    19.17   0.000     .0384032    .0471527
                                        4  |   .0521217   .0062655     8.32   0.000     .0398414    .0644019
                                        5  |   .0381155   .0028514    13.37   0.000     .0325269    .0437041
                                        6  |   .0468384   .0064716     7.24   0.000     .0341543    .0595225
                                        7  |   .0584928   .0028906    20.24   0.000     .0528273    .0641583
                                        8  |   .0193515   .0033232     5.82   0.000     .0128382    .0258647
                                        9  |   .0553594   .0026378    20.99   0.000     .0501893    .0605294
                                       10  |   .0068916   .0035612     1.94   0.053    -.0000882    .0138713
                                       11  |    .057551   .0032621    17.64   0.000     .0511574    .0639447
                                       12  |  -.0113386    .007386    -1.54   0.125     -.025815    .0031378
                                       13  |   .0420291    .005462     7.69   0.000     .0313237    .0527345
                                       14  |   .0491203   .0022829    21.52   0.000     .0446458    .0535948
                                       15  |   .0512374   .0022946    22.33   0.000     .0467401    .0557346
                                       16  |    .049534   .0022248    22.26   0.000     .0451736    .0538944
                                       17  |   .0475185   .0021603    22.00   0.000     .0432844    .0517525
                              ------------------------------------------------------------------------------
                              
                              Predictive margins                              Number of obs     =      9,458
                              Model VCE    : OIM
                              
                              Expression   : Pr(A170==5), predict(outcome (5))
                              
                              1._at        : quantX0472      =           0
                              
                              2._at        : quantX0472      =           1
                              
                              3._at        : quantX0473      =           0
                              
                              4._at        : quantX0473      =           1
                              
                              5._at        : quantX0474      =           0
                              
                              6._at        : quantX0474      =           1
                              
                              7._at        : relative2       =           0
                              
                              8._at        : relative2       =           1
                              
                              9._at        : relative3       =           0
                              
                              10._at       : relative3       =           1
                              
                              11._at       : relative4       =           0
                              
                              12._at       : relative4       =           1
                              
                              13._at       : marriage        =           0
                              
                              14._at       : marriage        =           1
                              
                              15._at       : IU0             =        .747
                              
                              16._at       : X011            =         2.6
                              
                              17._at       : X003            =       39.17
                              
                              ------------------------------------------------------------------------------
                                           |            Delta-method
                                           |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                       _at |
                                        1  |   .2747913   .0072037    38.15   0.000     .2606723    .2889103
                                        2  |   .2171905   .0081945    26.50   0.000     .2011295    .2332515
                                        3  |    .278204   .0055006    50.58   0.000      .267423     .288985
                                        4  |   .1143138   .0129579     8.82   0.000     .0889169    .1397108
                                        5  |   .3238196    .007307    44.32   0.000      .309498    .3381411
                                        6  |   .0532676   .0102085     5.22   0.000     .0332593    .0732759
                                        7  |   .2405222   .0054814    43.88   0.000     .2297787    .2512656
                                        8  |   .2917396   .0114233    25.54   0.000     .2693505    .3141288
                                        9  |   .2333229   .0049372    47.26   0.000     .2236461    .2429997
                                       10  |   .3675802   .0159331    23.07   0.000     .3363518    .3988085
                                       11  |   .2132454   .0052922    40.29   0.000     .2028728    .2236179
                                       12  |   .4265534   .0179458    23.77   0.000     .3913802    .4617266
                                       13  |   .2728784   .0139771    19.52   0.000     .2454838     .300273
                                       14  |   .2513393   .0046439    54.12   0.000     .2422374    .2604412
                                       15  |   .2537436   .0044441    57.10   0.000     .2450334    .2624538
                                       16  |   .2537048   .0044225    57.37   0.000     .2450368    .2623728
                                       17  |    .253968   .0044559    57.00   0.000     .2452346    .2627014
                              ------------------------------------------------------------------------------
                              
                              
                              
                              .

                              Comment

                              Working...
                              X