Announcement

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

  • #16
    Dear Carlo,

    I'm trying to find out the time dummies(which is the world component of TFP growth varies across time) from the growth rate of TFP of each country at time t. i generated the growth rate of TFP of each country at time t from the panel data of TFP data in the total economy of each country. in the equation there's also a country fixed effect, then the time dummies together with the residuals. Here are the following codes i tries based on the info you've given above,


    . gen g_TFPA = D.TFPA / L.TFPA
    (25 missing values generated)

    . xtset g_TFPA
    panel variable: g_TFPA (unbalanced)

    . xtreg g_TFPA i.Period, fe
    the panel variable g_TFPA may not be included as an independent variable


    i feel like i got stuck at the step of generating the time dummies and the country fixed effect. i would really appreciate it if you could give me some advice on the commands!! Thanks a lot!

    Comment


    • #17
      Jinghui:
      welcome to this forum.
      The general rule is that you should include in -xtset- the following terms in the following order (that canoot be reversed):
      Code:
      xtset panelis timevar
      That said, the regressand in your -xtreg- code is unclear.
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment


      • #18
        Hi Carlo,

        Thanks for your reply!

        I tried xtset TFPA Period

        but it turns out that
        repeated time values within panel

        Since the g_TFPA (growth rate) was generated from the basic TFPA so when i tried:

        xtset g_TFPA

        xtreg TFPA i.Period, fe

        nearly all the time dummies were omitted... do you have any advice on this?

        Thanks a lot!

        Comment


        • #19
          Jinghui:
          1) if Stata complains about -repeated time values within panel- the usual fix is to -xtset- your data with -panelid- only. Unfortunately, this fix comes at the cost of making the use of time-series related operators, such as lags and leads, unfeasible;
          2) by construction, the -fe- estimator wipes out all the time-invariant variables. Hence, there's no fix to that but change estimator. See the community-contributed module -mundlak in addition to -xtreg,re- (I assume that you're dealing with a continuous regressand).
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #20
            Hi everyone. Thank you for your suggestions and your time.

            I have a similar situation: panel data of companies with 25000 observations in 30 countries and 10 years. Regression with country and year fixed effects. I would like to include a 2015 time dummy (about half of the period). STATA does not return collinearity problems but the doubt concerns the correctness of the approach.
            The same applies to a Europe vs USA dummy. Is such a dummy collinear with country fixed effects?
            Below is the code in brief. I use the regress command.

            regress ind dep_vars i.country_code i.year, vce(cluster id)

            The code below is what I estimate, it's correct?
            regress ind dep_vars i.country_code i.year time_dummy, vce(cluster id)
            regress ind dep_vars i.country_code i.year country_group_dummy, vce(cluster id)


            Thanks for your suggestions.

            Comment


            • #21
              Alberto:
              welcome to this forum.
              1) -ind- is probably your dependent variable;
              2) -dep_vars- are probably your predictors;
              3) if you have a panel dataset, you should go -xtreg,fe-;
              4) run your panel data regerssion and share what you coded and what Stata gave you back with the list via CODE delimiters (see the FAQ on these topics). Thanks.
              Kind regards,
              Carlo
              (StataNow 18.5)

              Comment

              Working...
              X