Announcement

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

  • Is it necessary to declare data set as panel data?

    Hi,

    if my data are panel-data (observations are unique by city and year), is it necessary to declare them as such, using, of course, the "xtset"?
    In terms of results and coefficients interpretation, what's the difference between not delcaring and regressing using "reg", to regressing using "xtreg" after declaration?

    Thanks a lot,
    Ben

  • #2
    Well, if all you are going to do is a fixed-effects linear regression, -reg ... i.city- will be equivalent to -xtset city- followed by -xtreg ..., fe-, so using -xtset- is not required. When I say equivalent, I mean that the coefficients and uncertainty estimates will be the same and they can be interpreted in the same way. The output layout is different: -xtreg, fe- does not give any estimates for the city effects themselves. -reg- does give estimates for the city effects, but since these effects are unidentifiable, the estimates that you get for the city effects from -reg i.city- are not interpretable anyway unless you pay careful attention to what the base (omitted) category is.

    But there is a whole range of -xt- commands. Run -help xt- to see them. You can only use them if you first -xtset- your data.

    And remember that the equivalence of -reg ... i.city- with -xtreg ..., fe-does not carry over to logistic or other non-linear regression models.

    I'm curious why you even raise the question. Why would you want to avoid -xtset-? It's a one line command with the simplest syntax imaginable and the execution time is imperceptibly small.
    Last edited by Clyde Schechter; 13 Apr 2019, 11:17.

    Comment


    • #3
      Hi Clyde,
      Thanks a lot for the thorough explanation.
      I don't want to avoid it so much, simply an ametaur when it comes to econometrics and Stata. I'm writing a paper for school and ran into this unfamiliar method, so I wanted to make sure I'm not missing anything.
      Thanks again!

      Comment

      Working...
      X