Announcement

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

  • error r(3102) after using fracreg (and fracglm)

    Hi,
    I need to run a regression. As i use fractional data I thought about using the fracreg (or similar Richard Williams' fracglm) command. But I alway get an error code from stata.
    In his PDF "Analyzing Proportions: Fractional Response and Zero One Inflated Beta Models" (https://www3.nd.edu/~rwilliam/stats3...onseModels.pdf) he shows an example with Wooldridge's (2011) data from 4,075 companies in 1987. Using exactly the same codes as he does, mainly

    use https://www3.nd.edu/~rwilliam/statafiles/401kpart, clear
    fracglm prate mrate ltotemp age i.sole, het(mrate ltotemp age i.sole) link(p)

    I get the same error from stata as with my own data:

    . use https://www3.nd.edu/~rwilliam/statafiles/401kpart, clear
    . fracglm prate mrate ltotemp age i.sole, het(mrate ltotemp age i.sole) link(p)
    _robust_work(): 3102 function found where matrix required
    rob__compute(): - function returned error
    robust(): - function returned error
    moptimize_result_V_robust(): - function returned error
    mopt__result_V(): - function returned error
    moptimize_result_post(): - function returned error
    Mopt_maxmin(): - function returned error
    <istmt>: - function returned error
    r(3102);



    The same happens after using the fracreg command which he also describes. It is the same error code.

    Can someone help me solving this? Did I (and therefore he as I used what he told me to use) miss something out?

    Thanks a lot
    Robert

  • #2
    Welcome to Statalist, Robert.

    I'm sorry to say that I cannot reproduce your problem on my installation.
    Code:
    . about
    
    Stata/SE 15.1 for Mac (64-bit Intel)
    Revision 20 Dec 2017
    ...
    
    . net install fracglm, from(https://www3.nd.edu/~rwilliam/stata)
    checking fracglm consistency and verifying not already installed...
    installing into /Users/lisowskiw/Library/Application Support/Stata/ado/plus/...
    installation complete.
    
    .
    . which fracglm
    /Users/lisowskiw/Library/Application Support/Stata/ado/plus/f/fracglm.ado
    *! version 0.3 beta April 16, 2016   Richard Williams, [email protected]
    
    . 
    . do "/var/folders/xr/lm5ccr996k7dspxs35yqzyt80000gp/T//SD18557.000000"
    
    . use https://www3.nd.edu/~rwilliam/statafiles/401kpart, clear
    
    . fracglm prate mrate ltotemp age i.sole, het(mrate ltotemp age i.sole) link(p)
    
    Heteroskedastic Fractional Probit Regression    Number of obs     =      4,075
                                                    Wald chi2(4)      =     152.30
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -1674.5212               Pseudo R2         =     0.0632
    
    ------------------------------------------------------------------------------
                 |               Robust
           prate |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    prate        |
           mrate |   1.384624   .2238384     6.19   0.000     .9459091    1.823339
         ltotemp |   -.149509   .0139654   -10.71   0.000    -.1768806   -.1221374
             age |   .0670689   .0100628     6.67   0.000     .0473461    .0867917
          1.sole |  -.1182798   .0932275    -1.27   0.205    -.3010024    .0644428
           _cons |   1.679357   .1058955    15.86   0.000     1.471806    1.886908
    -------------+----------------------------------------------------------------
    lnsigma      |
           mrate |   .2403517    .053781     4.47   0.000     .1349428    .3457606
         ltotemp |   .0375134   .0144204     2.60   0.009     .0092499     .065777
             age |   .0171713   .0027289     6.29   0.000     .0118228    .0225198
          1.sole |  -.1627654   .0631052    -2.58   0.010    -.2864493   -.0390814
    ------------------------------------------------------------------------------
    
    . 
    end of do-file
    What version of Stata are you using?

    Comment


    • #3
      Hey William,
      thanks a lot for your answer! I use the same version as you do, namely 15.1 but for Windows, so I guess that should not be a problem as at least 14 is required.
      After reading your post I tried it again and failed again and have no idea why...


      Thanks again,
      Robert

      Comment


      • #4
        Perhaps something is wrong with your Stata installation. See the following topic for two good ideas to try.

        https://www.statalist.org/forums/for...tata-15-r-3499

        Comment


        • #5
          Like @William Lisowski, I can replicate the code without a trouble. So, I think you should follow @William Lisowski's advice in #4.

          Code:
          . . about
          
          Stata/MP 15.0 for Windows
          ...
          
          
          . . net install fracglm, from(https://www3.nd.edu/~rwilliam/stata)
          checking fracglm consistency and verifying not already installed...
          installing into c:\ado\plus\...
          installation complete.
          
          . . which fracglm
          c:\ado\plus\f\fracglm.ado
          *! version 0.3 beta April 16, 2016   Richard Williams, [email protected]
          
          
          . . use https://www3.nd.edu/~rwilliam/statafiles/401kpart, clear
          
          . . fracglm prate mrate ltotemp age i.sole, het(mrate ltotemp age i.sole) link(p)
          
          
          Heteroskedastic Fractional Probit Regression    Number of obs     =      4,075
                                                          Wald chi2(4)      =     152.30
                                                          Prob > chi2       =     0.0000
          Log pseudolikelihood = -1674.5212               Pseudo R2         =     0.0632
          
          ------------------------------------------------------------------------------
                       |               Robust
                 prate |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
          prate        |
                 mrate |   1.384633   .2238377     6.19   0.000     .9459188    1.823346
               ltotemp |  -.1495092   .0139654   -10.71   0.000     -.176881   -.1221375
                   age |   .0670695   .0100629     6.67   0.000     .0473465    .0867925
                1.sole |  -.1182803   .0932273    -1.27   0.205    -.3010024    .0644419
                 _cons |    1.67936   .1058958    15.86   0.000     1.471809    1.886912
          -------------+----------------------------------------------------------------
          lnsigma      |
                 mrate |   .2403522    .053781     4.47   0.000     .1349434    .3457609
               ltotemp |   .0375141   .0144203     2.60   0.009     .0092508    .0657774
                   age |   .0171714   .0027289     6.29   0.000     .0118229    .0225198
                1.sole |  -.1627647   .0631046    -2.58   0.010    -.2864475   -.0390819
          ------------------------------------------------------------------------------

          Comment


          • #6
            An update to Stata 15.1 was just released yesterday, so you might as well update anyway. Given that itis my example, I am glad it works for most people!
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

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

            Comment


            • #7
              Sorry for the late answer.. I am very happy that with the advice it is working now. Thank you very much!

              Comment

              Working...
              X