Announcement

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

  • Time Series Panel Data regression

    Dear all,

    I am working on a dataset with time-series panel data, but I don't know which stata-code corresponds with what I want.
    I know I need to enter: tsset id YEAR in order to set my panel and time variable, but then problems arise.

    I want to cluster at firm-level (id) and perform an OLS regression. Later on i want to include year fixed effects, country-fixed effects and industry fixed-effects by using dummies (i.YEAR)
    I thought I had to enter:
    xtreg depvar indepvar controlvarlist, i (id) fe
    or
    xtreg depvar indepvar controlvarlist, fe vce (cluster id)

    where depvar is my dependent variable, indepvar my independent and controlvarlist a number of control variables (some time varying, some non)

    Then however my independent variable is omitted because of collinearity. This is a non time-varying variable, that might could have to do something with that.
    Is there a way to check for the relationship between this dependent (time-varying) variable and this independent (non-time varying) variable?

  • #2
    Excuse me, I have just read the FAQ and I read that I was expected to enter my real name. I cannot change my user name unfortunately but it is Sven van Hegelsom

    Comment


    • #3
      re-read section 6 of the FAQ; it tells you how to get this changed

      Comment


      • #4
        Goodmorning. Thank you.

        Comment


        • #5
          If a dummy variable is excluded due to perfect collinearity, it must be perfectly correlated with another dummy variable (or a set of dummy variables) or with fixed effects, not with the dependent variable. The dummy variable trap is quite common for multi-level models in that fixed effects, which are input as dummy variables in the equation, are perfectly correlated with other dummy variable(s).
          Rakkoo

          Comment


          • #6
            With the fixed effects estimator, there is no way to get a coefficient estimate for your time-invariant indepvar because it is wiped out from the model by the fixed-effects transformation (subtracting the time averages). With the random effects estimator, you can in general estimate that coefficient if it is not collinear with the set of other control variables. An alternative that lies in between fixed effects and random effects, is is the Hausman and Taylor estimator. See help xthtaylor for further information.
            https://www.kripfganz.de/stata/

            Comment


            • #7
              Sven:
              as per your post, it seems that you have ruled out -xtreg, re- option. Unless your choice is methodologically sound with respect to your research field, you can compare -xtreg, fe - vs xtreg, re- via -hausman-.

              Kind regards,
              Carlo
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment

              Working...
              X