Announcement

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

  • eform cannot be used in xtitsa

    I am analyzing panel data using the XTITSA command: xtitsa count econindex b1.m, single trperiod(2020m3) vce(robust) posttrend figure replace

    ‘econindex’ is the composite scale, including poverty, public assistance, and unemployment. They are time constant.

    My question is why said xtitsa command generated the error message below:
    eform cannot be used in xtitsa
    r(198);

    Alternatively, I included the individual variables instead of the composite scale: xtitsa count poverty publicassistance unemployment b1.m, single trperiod(2020m3) vce(robust) posttrend figure replace. This xtitsa successfully produced the results without any error message.

    It would be greatly appreciated if you tell me why I had the error message in the presence of the composite scale. Thank you.


    . describe econindex4 poverty femaleheaded unemploy

    storage display value
    variable name type format label variable label
    ----------------------------------------------------------------------------------------------------------------------------------------------
    econindex4 float %9.0g
    poverty double %12.0g %Poverty
    femaleheaded double %12.0g %Female Headed
    unemploy double %12.0g %Unemploy





  • #2
    first, the help file is quite clear on this: "xtitsa is a wrapper for xtgee so all available options are allowed except "eform"."

    second, why do you want this option? the answer may help someone either clear up some confusion or suggest a work-around; or you could write to the author (email is at the bottom of the help file)

    Comment


    • #3
      Originally posted by Rich Goldstein View Post
      first, the help file is quite clear on this: "xtitsa is a wrapper for xtgee so all available options are allowed except "eform"."

      second, why do you want this option? the answer may help someone either clear up some confusion or suggest a work-around; or you could write to the author (email is at the bottom of the help file)
      Rich,

      Thank you for the response and advice. For clarification, I did not choose any eform option, as noted in my prior post. That's why I have asked why I had such error message. The error message occurred when I included the composite scale, econindex, in the model.

      Comment


      • #4
        sorry for the mis-reading

        Comment


        • #5
          Ariel Linden I think I have found the problem which is a typo in the code: the code tests for the presence of eform in the following way:
          Code:
          if regexm("`0'", substr(" ef", 1, 2))==1 {
          however, the "2" in this code should be a "3"; as written it is looking for the presence of any word starting with an "e" in the command when it really wants to look for any word starting with "ef"

          and, actually, it would be better not to do it that way either as someone might have a variable name that starts with "ef" -

          however, you can use this piece of information to use the ado file - you can either (1) just change the varname from "econindex" to something else that does not start with "e"; or (2) you can clone the program and give it a different name and fix the typo

          but in the long run, it would be best if the author re-wrote that line to look explicitly for either " eform" or ",eform"

          in case anyone is interested in how I figured this out, I typed:
          Code:
          view xtitsa.ado, adopath
          at the command line and then did a search on "eform" within the file
          Last edited by Rich Goldstein; 29 Apr 2023, 10:58.

          Comment


          • #6
            Rich,

            Thank you for the help. My problem has been solved with the new variable name.

            Comment


            • #7
              Hi Rich,

              Thanks for catching that error in the line of my code!

              FYI, it is intended to evaluate "ef" rather than "eform" because XTGEE allows the user to specify the abbreviated version.

              Cheers,

              Ariel

              Comment

              Working...
              X