Announcement

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

  • Gsem function and Xt ?

    Dear honourable members,

    I am running a longitudinal data analysis using the gsem command according to the following exemple provided by stata guideline
    https://www.stata.com/manuals13/semexample41g.pdf

    I have a basic question, I don't really understand why its not recomended to run the xt command before the gsem as we do with other command like mixed or xtreg...?
    Why we don't need to specify how the data order should be ?

    could someone explain that to me ?

    Thank you for your help.

  • #2
    What's the xt command?

    Do you mean xtset? I don't recommend using it.* I'm not sure what you think that it does for data order, but it doesn't do anything for mixed and it misleads people about what it does with the time variable for a subsequent xtreg , fe command.

    *Well, maybe if your next command is something like tsfill.

    Comment


    • #3
      Originally posted by Joseph Coveney View Post
      What's the xt command?

      Do you mean xtset? I don't recommend using it.* I'm not sure what you think that it does for data order, but it doesn't do anything for mixed and it misleads people about what it does with the time variable for a subsequent xtreg , fe command.

      *Well, maybe if your next command is something like tsfill.
      Thank you for your reponse. In Stata guideline it is indicated that xtset Declare data to be panel data. based on that we have to specify "xtset panelvar timevar". any way why we don't need to do that with gsem even if we will analyze panel data ?

      Comment


      • #4
        Originally posted by Radhouene DOGGUI View Post
        any way why we don't need to do that with gsem even if we will analyze panel data ?
        It may be a little harsh, but as far as I could tell, xtset seemed practically little more than a convenience command if you didn't feel like typing the i() t() options repeatedly in estimation commands when you wanted to do specification searches. (There are some panel dataset-exploration commands that require xtset beforehand.)

        It was never required for gsem.

        Comment


        • #5
          Thank you joseph

          Comment

          Working...
          X