Announcement

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

  • Error using mchangeplot in ordered logit models

    Hi

    I have odd issues using the spost13 command mchangeplot recently

    to be specific, I fit a simple ordered logit model on a 4 categories ordered variable (political trust) as shown below. This works well, the mchange command does produce the expected results as well

    ologit polint c.lrscale i.male

    mchange lrscale male, amount (sd)


    However, as soon as I try to use mchange plot I get a invalide syntax error (198)

    mchangeplot lrscale poltrust male, symbol(no hardly quiet very) sig(0.05) xtitle(average discrete change)

    this is also the case when I reduce the mchangeplot command to the absolute minimum, simply typing "mchangeplot"

    I already reinstalled the package and I cannot find as far as I can tell there should be no issue with the syntax. Any Ideas how to fix this?


  • #2
    I can't test this right now but you might to put

    Code:
    set trace on
    to see (and show) exactly where the error occurs in the code.

    Detail: I guess you meant to type quite not quiet but I doubt that is the syntax error.

    Comment


    • #3
      thanks! I did run trace, but I do not really understand how to interpret the output. I did run the following stata code:

      ologit polint c.lrscale c.age c.poltrust i.male i.educ3
      mchange lrscale poltrust male, amount (sd) width(8)
      set trace on
      mchangeplot

      The output is very long, I just copied the part where the code stops:

      ------------------------------------------------------------------------------------------------------------------------------------- begin _orme_data_plotpairs ---
      - qui `noisily' di _new " > entering _orme_data_plotpairs"
      = qui di _new " > entering _orme_data_plotpairs"
      - version 11.2
      - args noisily
      - local Clinepvalues "`_orme[Clinepvalues]'"
      = local Clinepvalues ".05"
      - local Cmatrixstub "`_orme[Cmatrixstub]'"
      = local Cmatrixstub ""
      - local Ccatnms `_orme[Ccatnms]'
      = local Ccatnms `"not at all"' hardly quiet very
      invalid syntax
      --------------------------------------------------------------------------------------------------------------------------------------- end _orme_data_plotpairs ---
      --------------------------------------------------------------------------------------------------------------------------------------------------- end _orme_data ---
      --------------------------------------------------------------------------------------------------------------------------------------------------- end _orme_syntax ---
      ------------------------------------------------------------------------------------------------------------------------------------------------------ end mchangeplot ---
      r(198);


      Comment


      • #4
        Alexander Langenkamp knows this but for general information spost13 is a package now downloadable from a Stanford site.

        See https://www.statalist.org/forums/for...post13-is-back especially if you have issues downloading package files.

        I don't know who if anyone is now maintaining this package or providing support but posters to Statalist are reliant on those who use the package more than casually (which doesn't include me). There are several commands which seem interdependent, so I guess it's a case of studying the package very carefully if it seems useful to you.

        Nevertheless I can ask a small question.

        In #1 the text for your ordered categories were labelled


        Code:
        no hardly quite  very
        where once again (#2) I've fixed quiet to quite. So, why is the command now trying to cope with

        Code:
        `"not at all"' hardly quiet very
        which is not the same.

        On general grounds I would expect any package in this area to be supportive of text labels that are one word long, several words long, or a mixture.

        People who do use the package might appreciate a reproducible example, unless you're using a standard dataset and not telling us that here.

        If all else fails, write to the package authors directly.



        Comment


        • #5
          incredible! Thanks, I found the error. Its indeed the label of the outcome categories. If I label it in one word "notatall" instead of "not at all" it works. The command seems to stop running as soon as any label in the outcome is written in multiple words.

          Comment


          • #6
            Glad that worked, but I strongly disagree with any limitation to one-word text labels. If you find that in any of my commands, let me know and I will try to fix it.

            Comment

            Working...
            X