Announcement

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

  • xtcsd Command Error

    Hi Dear,

    While running xtcsd, pesaran abs
    I get the following error

    unknown egen function group()
    r(133);

    Can someone please guide me about it?

    Thank you

  • #2
    I wonder whether the code comes from a do-file. If so, it would be interesting to observe the full code.
    Best regards,

    Marcos

    Comment


    • #3
      Hi Marcos,

      Thanks for your response. What is a do-file? How to check the code?

      Comment


      • #4
        A Stata do-file is, well, a file some one creates, from where we can store a sequence of commands, then run the sequence and get the results. In other words, and going directly to the point, I'm wondering what was typed, exactly, I mean, I wish to know if there was a sequence of commands applied to Stata. By sharing exactly what you typed (according tothe FAQ advice), we may know if there is some previous command that is causing this trouble.
        Best regards,

        Marcos

        Comment


        • #5
          Hi Marcos,

          I did not create any do file. But if I can explain how I typed my commands, then after initiating Stata it was like:

          xtset id years, yearly

          ssc install xtcsd

          xtreg Y X1 X2 X3, fe vce(robust)

          xtcsd, pesaran abs

          got the following error that

          unknown egen function group()
          r(133);


          And the same error is there for frees and friedman test also. And yes, I needed to install xtcsd as it was not there previously. And it was installed successfully.

          Outcomes of xtreg, fe were produced and they were fine. Is this information enough? If the do-file gives commands that were run, then the commands were essentially the same which i have mentioned. Also, can I please assure you that I did not perform anything else or run any other commands before this analysis after initiating Stata.

          Can you please share your insights on what could be going wrong?

          Many thanks.

          Comment


          • #6
            Sorry, but I fail to see where is the problem. If there is no command concerning - egen -, the reason for this output remains arcane to me. My last advice on this matter is: be sure to have updated both Stata (is it a very old version?) and the user-written program. If such procedure won't solve the problem, hopefully you'll get further assistance from members who had experienced something on this verge.
            Best regards,

            Marcos

            Comment


            • #7
              I think Marcos has a point. It would be helpful if you could copy the entire code you use. In general my advice would be, always write code in a do file. Otherwise it will be very difficult to reproduce any results!

              xtcsd uses egen `id2' = group(`id'') and id2 is a tempvar and id is the panelvar. This cannot fail because xtreg worked beforehand.

              Comment


              • #8
                Hi Marcos,

                Thanks for the response. I used version 14.2

                Comment


                • #9
                  Hi JanDitzen,

                  Thanks for the response. I actually don't know how to work in a do file. The only thing I know is that there is a do file icon on top of the Stata window.

                  May be it will help if you can please share the process while I wait for further guidance from other members regarding my problem.

                  Thanks again.

                  Comment


                  • #10
                    The do file editor is explained here:
                    https://www.stata.com/manuals/u16.pdf
                    or
                    https://www.kellogg.northwestern.edu...%20do-file.pdf
                    or google:
                    https://www.google.com/search?q=stat...do+file+editor

                    Comment


                    • #11
                      Thanks JanDitzen

                      Comment

                      Working...
                      X