Announcement

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

  • Error in Prvalue (SPost package) after ordered logistic regression

    Dear Statalisters,

    I am running an ordered logistic regression to research which factors (co)determine organizations gaining access to committees. In order to make more sense of the obtained coefficients and other regression results, I want to conduct predicted probabilities for the minimum, median and maximum of my independent variables and show how change in these (e.g. from the minimum to the median) influences the probabilities. Therefore, I wanted to make use of the -prvalue- command of the SPost 13 package by J. Scott Long and Jeremy Freese, using Stata 15.1.

    I have the following dataset:
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte(q35EU_07 q08) float log_staff byte(q42 q30_04 EU_policies)
    . .      . .  . .
    . 4      . .  . .
    . .      . .  . .
    . .      . .  . .
    . .      . .  . .
    . 3 .90309 1 30 2
    3 3 .60206 3 80 4
    2 2 .30103 3 50 3
    1 2 .30103 4 10 4
    . 2      . .  . .
    end

    Using the following syntax to obtain the predicted probabilities:
    Code:
    ologit q35EU_07 q08 log_staff q42 q30_04 EU_policies, vce(robust)
    prvalue, x(q08=min, log_staff=min q42=min q30:04=min EU_policies=min) level(95) bootstrap save
    I always derive at the same error message r(111) "variable cut1 not found". I do not understand why I get this error message, as i was not aware that the Ancillary parameters (that are given in the ordered logistic regression output) are relevant for getting predicted probabilities for my independent variables. Why is this the case and how can I get the predicted probabilities that I want?
    I would be very grateful for enlightenment.

    Marie Lohrum

  • #2
    The output of help spost13 shows us that prvalue is no longer part of the Spost package. The prvalue command you have is presumably left over from an earlier version of the Spost package.

    I'm guessing that prvalue is not compatible with Stata 15, which uses a new syntax for free parameters. Perhaps you can use version control, something like
    Code:
    version 14.2: prvalue ...
    to successfully run the command. In the long run, however, I think it would be better to determine what Long and Freese recommend as an alternative to prvalue .

    Comment


    • #3
      Actually, if you really really really wanted to use prvalue, you would use version control with the estimation command, e.g.

      Code:
      version 9: ologit q35EU_07 q08 log_staff q42 q30_04 EU_policies, vce(robust)
      prvalue, x(q08=min, log_staff=min q42=min q30:04=min EU_policies=min) level(95) bootstrap save
      User-written post-estimation commands can get zapped when later versions of Stata change the formatting of the ereturned results. So you have to force Stata to use the earlier version.

      But as William says, you probably don't want prvalue anyway. See

      https://www3.nd.edu/~rwilliam/xsoc73994/Margins04.pdf

      https://www3.nd.edu/~rwilliam/xsoc73994/Margins05.pdf
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 19.5 MP (2 processor)

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

      Comment


      • #4
        My thanks to Prof. Williams, whose post led me to discover that my tattered PDFs of his lectures on categorical data analysis have been superseded by versions updated this spring.

        While his post points to two particular lectures, it's well worth the effort to look through the full set, all of which are linked to from

        https://www3.nd.edu/~rwilliam/xsoc73994/

        Comment


        • #5
          Thank you for these very helpful answers! I was already thinking that it might have to do with my version of Stata.
          I will have a look at the documents you shared and try to use the -margins- command for my purposes.

          Comment


          • #6
            Actually one/several advantages of version 9 over 13 SPost is that version 9 accommodates several ways to calculate the se of predictions, whereas 13 only uses the delta method, which is probably not that precise in some/many cases. But clearly version 13 now is the standard version. Hope this helps.

            Jun Xu, PhD
            Professor
            Department of Sociology
            Ball State University

            Comment

            Working...
            X