Announcement

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

  • Error "unrecognized command r(199)" only when performing user-written "mmp" command properly

    Dear Statlisters,

    I am using Stata 14.1.

    When I perform the user-written command "mmp" from Lindsey and Sheater (2010), this is what happens:

    1) If I make mistakes, they are properly noticed by Stata:

    mmp
    option mean() required
    r(198);

    mmp, mean(xb)
    option smoother() required
    r(198);

    mmp, mean(xb) smoother()
    option smoother() required
    r(198);


    2) If I perform the command (at least I think) correctly, it doesn't recognize it:

    mmp, mean(xb) smoother (lowess)
    unrecognized command
    r(199);


    Moreover:

    3) If I investigate about the related files, everything seems ok:

    sysdir
    STATA: C:\Program Files (x86)\Stata14\
    BASE: C:\Program Files (x86)\Stata14\ado\base\
    SITE: C:\Program Files (x86)\Stata14\ado\site\
    PLUS: c:\ado\plus\
    PERSONAL: c:\ado\personal\
    OLDPLACE: c:\ado\

    which mmp
    c:\ado\plus\m\mmp.ado


    Furthermore, I find in folder "c:\ado\plus\m" the file "mmp.sthlp" and I can read the help when typing "help (mmp)".

    adoupdate
    (no packages require updating)


    4) The software seems updated:

    adoupdate

    [...]

    update query
    (contacting http://www.stata.com)

    Update status
    Last check for updates: 02 Feb 2016
    New update available: none (as of 02 Feb 2016)
    Current update level: 01 Feb 2016 (what's new)

    Possible actions

    Do nothing; all files are up to date.


    Do you have any suggestion for trouble-shooting this?

    Lindsey C, Sheather S. Model fit assessment via marginal model plots. Stata J. 2010;10(2):215–25

  • #2
    mmp is from the Stata Journal. The first published example

    Code:
     
    sysuse auto
    regress mpg weight foreign
    mmp, mean(xb) smoother(lowess) linear predictors smooptions(bwidth(.66))
    works for me. I see two problems here in your post. The first is that the space in

    Code:
     
    smoother (lowess)
    should be removed. Second, that it seems that some other options are needed in practice.

    Charles Lindsey, the first author, should be able to say more.

    Comment


    • #3
      Thank you.


      some other options are needed in practice.
      Exactly: I found out that at least one among "linear", "predictors" and "varlist" is required in practice.

      Comment


      • #4
        Federico,

        Thank you for your interest in mmp.

        Exactly: I found out that at least one among "linear", "predictors" and "varlist" is required in practice.
        You are right. The help file is unclear on what the required options are. I will revise this in a future update.

        I would recommend using linear and predictors in practice.




        Comment


        • #5
          Thank you, Charles, for your suggestions.

          Federico

          Comment

          Working...
          X