Announcement

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

  • Problem using "countfit" command

    Hi!

    I'm attempting to use the "countfit" command to compute average predicted probabilities from Poisson and Negative Binomial models, in order to assess model fit. I have encountered a problem when executing the code, however, in that when I enter the command, Stata returns the error message "command countfit is unrecognized" (with "r(199)" in blue underneath).

    Obviously countfit is a command, so I'm not quite sure why this is happening.

    The code I am entering is:

    count fit ncigs female age2 married income degree degree voc alevel olevel cse childish anxiety health poor, maxcount(80) prm nograph noestimates nofit

    (My model regresses the number of cigarettes smoked on potential determinant factors. I included maxcount(80) as this is the maximum number of cigarettes smoked, per person, in the dataset.)

    Any help you could offer would be very much appreciated!

    Many thanks,

    Will

  • #2
    Obviously countfit is a command, so I'm not quite sure why this is happening.
    Well, actually, no it isn't obvious. In fact, it isn't true. There is no -countfit- command in official Stata. There is a user-written command by that name which is part of the spost13 package. If you want to install that package on your computer, you can find it at net describe spost13_ado, from(http://www.indiana.edu/~jslsoc/stata). But until you do that, Stata will report that it's unrecognized.

    If you have previously installed the spost13 package and are getting this error message, then somehow, your ado files have been changed. But the first step to fixing the problem would, in any case, be to re-install the package. So do that. And if you then continue to have problems, post back with details.

    Comment


    • #3
      Actually, while countfit is a command (although not obviously so), it is not part of the Stata distribution. It is user-written software that you need to install in order to make use of it. It is part of the spost13 package, and the support page for that package is at http://www.indiana.edu/~jslsoc/spost13.htm. Check out the installation instructions linked to from that page.

      Added in edit: this is scary, my wording choices are starting to mirror Clyde's, even though our posts crossed in the ether.

      Comment


      • #4
        I, too , am having troubles with countfit. I downloaded spost13ado and ran the countfit command agan, same message. "Vuong test is not appropriate for testing zero-inflation. Specify option
        forcevuong to perform the test anyway." I would be happy to forcevuong and ignore the output, but no luck.

        Comment


        • #5
          Stan Davis , so why don't you just add the forcevuong option to countfit? If you are having problems, show your code and output using code tags. See pt 12 in the FAQ.
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

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

          Comment

          Working...
          X