Announcement

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

  • GLS Analysis

    Hi all,
    I am a newbie in stata .I was working with the following data of three variables (visit,travel cost and income) where vist is the dependent variable and travel cost and income are independent variables. But I got stuck in the GLS analysis as it is showing 'must specify panelvar ; use xtset ' (screenshot attached). Can you guys please give me some suggestions about the method of specifying panel variable for that data? Urgent kind help will be highly appreciated.Thanks in advance.
    Attached Files
    Last edited by Sabiha Marine; 20 Jan 2018, 04:57.

  • #2
    Sabiha:
    if you have cross-sectional data, you should use -regress- instead of -xt- commands.
    Anyway, the first step in panel data analysis with Stata is -xtset-ting your data (see -help xtset-).
    If you do not have a time variable, you have simply a one-way data regression and, again, you should go -regress-.
    As a closing-ou remark, please note that crying for help increase the risk to see your quesry left unreplied: be more detailed about your problem, instead. Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thanks for your reply Carlo. If you dont mind, could you please write some more about the one way data regression.I am very new in stata, only 2 days old. I have a deadline ahead and my brain is not working.

      Comment


      • #4
        Sabiha:
        simply, take a look at -regress-, which implements ordinary least square (OLS).
        OLS can be seen as a particular case of panel data regression that includes one wave of data only (that is, a cross-sectional dataset), in that measurement takes place only once (and not several, equally spaced, times, like in a genuine panel dataset).
        In your original post, you coded -xtgls- which is one of the -xt- command for dealing with small N, large T panel dataset (that is, panel data set that include a number of -panelids- that is lower than the number of the data waves). Hence, the first question; is that the case with your dataset?
        In fact is more frequent on this list to read questions related to -xtreg-, another -xt- command for dealing with large N, small T panel dataset (in which the magnitude of -panelid- and -timevar- are reversed vs -xtgls-).
        Either way, -xt- commands requires data to be -xtset- in advance (by the way, I would recommend you to take a comprehensive look at -xtset-, -xtreg- and -xtgls- entries in Stata .pdf manual; I'm also surprised that you teacher/mentor/supervisor did not point you out to one of the several econometrics textbook that cover the issues you're interested in) .
        In sum, you should provide the list with more details about what you're working on to increase your chances of getting (more) helpful replies. Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Dear Carlo
          Thanks for your suggestions.
          Actually my supervisor is travelling for the next couple of weeks. He also recommended to do OLS for the data like you. Let me have a try of it. Thanks Carlo for your great help!

          Comment

          Working...
          X