Announcement

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

  • mgen error message "equation list required"

    Dear all,

    I am trying to use mgen command in Poisson regression with Long and Freese (2014) book's codes. Although I am using Stata 13.1, and installed mgen command, the error message "equation list required" came up as below. I've tried to find this error message in Google, but there is no one like this. I would appreciate it if you can give me any advice.
    Thank you.

    ---------------------------------------------------------
    . poisson num_awards, nolog

    Poisson regression Number of obs = 200
    LR chi2(0) = 0.00
    Prob > chi2 = .
    Log likelihood = -231.86356 Pseudo R2 = 0.0000

    ------------------------------------------------------------------------------
    num_awards | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    _cons | -.4620355 .0890871 -5.19 0.000 -.6366429 -.287428
    ------------------------------------------------------------------------------

    . mgen, pr(0/6) meanpred stub(psn)

    equation list required
    r(100);

    Last edited by K Park; 08 May 2015, 20:04.

  • #2
    Works for me in both 13 and 14. Make sure you have the latest versions of Stata 13.1 and spost13.

    Code:
    . use http://www.indiana.edu/~jslsoc/stata/spex_data/couart4, clear
    (couart4.dta | Long data on Ph.D. biochemists | 2014-04-24)
    
    . poisson art, nolog
    
    Poisson regression                              Number of obs     =        915
                                                    LR chi2(0)        =       0.00
                                                    Prob > chi2       =          .
    Log likelihood = -1742.5735                     Pseudo R2         =     0.0000
    
    ------------------------------------------------------------------------------
             art |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           _cons |   .5264408   .0254082    20.72   0.000     .4766416      .57624
    ------------------------------------------------------------------------------
    
    . mgen, pr(0/9) meanpred stub(psn)
    
    Predictions from: 
    
    Variable   Obs Unique       Mean        Min       Max  Label
    ----------------------------------------------------------------------------------------------------------------------
    psnval      10     10        4.5          0         9  Articles in last 3 yrs of PhD
    psnobeq     10     10   .0993443   .0010929  .3005464  Observed proportion
    psnoble     10     10   .8328962   .3005464  .9934427  Observed cum. proportion
    psnpreq     10     10   .0999988   .0000579   .311469  Avg predicted Pr(y=#)
    psnprle     10     10   .8307106   .1839859  .9999884  Avg predicted cum. Pr(y=#)
    psnob_pr    10     10  -.0006546  -.0691068  .1165605  Observed - Avg Pr(y=#)
    ----------------------------------------------------------------------------------------------------------------------
    
    . which mgen
    c:\ado\plus\m\mgen.ado
    *! version 1.1.3 2014-08-14 | long freese | non-estimable allowed
    
    . use http://www.indiana.edu/~jslsoc/stata/spex_data/couart4, clear
    (couart4.dta | Long data on Ph.D. biochemists | 2014-04-24)
    
    . poisson art, nolog
    
    Poisson regression                              Number of obs     =        915
                                                    LR chi2(0)        =       0.00
                                                    Prob > chi2       =          .
    Log likelihood = -1742.5735                     Pseudo R2         =     0.0000
    
    ------------------------------------------------------------------------------
             art |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           _cons |   .5264408   .0254082    20.72   0.000     .4766416      .57624
    ------------------------------------------------------------------------------
    
    . mgen, pr(0/9) meanpred stub(psn)
    
    Predictions from: 
    
    Variable   Obs Unique       Mean        Min       Max  Label
    ----------------------------------------------------------------------------------------------------------------------
    psnval      10     10        4.5          0         9  Articles in last 3 yrs of PhD
    psnobeq     10     10   .0993443   .0010929  .3005464  Observed proportion
    psnoble     10     10   .8328962   .3005464  .9934427  Observed cum. proportion
    psnpreq     10     10   .0999988   .0000579   .311469  Avg predicted Pr(y=#)
    psnprle     10     10   .8307106   .1839859  .9999884  Avg predicted cum. Pr(y=#)
    psnob_pr    10     10  -.0006546  -.0691068  .1165605  Observed - Avg Pr(y=#)
    ----------------------------------------------------------------------------------------------------------------------
    -------------------------------------------
    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
      Dear Professor Williams,

      I am honored to meet you here. I have read a couple of your articles while taking categorical variables this semester. Thanks to your advice, I uninstalled a previous SPost and installed the SPost13, and now the code works!
      I appreciate it again.

      Best,
      Kiwoong Park

      Comment

      Working...
      X