Announcement

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

  • Panel data question

    Dear,

    For my master thesis, I need to do a regression to analyse the effects of climate change on the financial performance in the luxury sector. Before that, I need to let Stata know that it is panel data. I am a bit confused with the xtset command because I have several variables and do not know what is correct. I basically have the id of all the companies, the countries but also the years. Which ones should be part of the panel data? (for example, LVMH is only present in France so the dummy variable for the country takes 1 in this case and 0 for the other countries.

    Also, I need to perform a hausmaan test afterwards to know if it is a fixed or random model.
    I also have two controls variable that are country fixed effect and year fixed effect and I do not know how to perform these.
    Attached Files

  • #2
    Macha:
    I think you should go:
    -xtset id_company Year-
    Then, assuming that you're dealing with a N>T panel dataset, you should consider -xtreg, fe- and -xtreg, re- before testing their specification via -hausman-.
    As it is always the case with queries like yours, you should negotiate with your supervisor how to take the matter further and, even more substantive, you shoul be proficient enough with panel data econometrics. You can strenghten your knowledge of this (not that easy) topic by studying one of the many textbook on panel data regression (see references in -xtreg- entry, Stata .pdf manual).
    As an aside, please follow the FAQ when posting: as you can see, screenshots are deprecated on this forum (and for very good reasons). Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you Carlo!

      When doing this, I get this error: xtset id_company Year
      "repeated time values within panel"

      Do you maybe know how to fix it?

      Thanks in advance

      Comment


      • #4
        Also, I wanted to ask you if you were providing personal classes/assistance for those kinds of issues. I unfortunately do not have the time to conduct research on the panel data regression as I mainly have to focus on the explanation of the results and I do not think that a deep understanding of Stata is required for this thesis.

        Please, let me know if you provide such services

        Comment


        • #5
          Macha:
          1) the usual fix is get rid of -timevar-:
          Code:
          xtset id_company
          That said, this fix comes at the cost of making time-series operators such as lags and leads, unavailable. However, you can still add -i.Year- in the right-hand side of your regression equation.
          2) No, I don't. If I may, I think you're understimating the theoretical knowledge that you should have for managing your research successfully (and autonomously).
          Again, I would discuss with your supervisor (who is paid with your academic tuitions) what exacly she/he expects you to do with this data, just to avoid more serious issues when the runway is in sight.
          Last edited by Carlo Lazzaro; 01 May 2023, 11:02.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment

          Working...
          X