Announcement

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

  • Using reghdf with an unbalanced panel data set

    Hi all,

    I am doing a study which tests the effect of a specific period on firms' liquidity.

    I have firm-level daily data. From which I create a weekly data set using the weekly average. Then I construct my dependent and explanatory variables using weekly data. My variable of interest, which represents a specific time of a year is a dummy variable.

    The reason I create weekly variables and not monthly variables is that my variable of interest, which represents 30 days in a year. It can starts and finishes any day in a month, as an example in 2015 it started on May 16th and not May 1st.

    My sample is strongly unbalanced, and if I make it balanced, I lose loads of observations.

    I am using a firm-fixed effect regression and cluster standards errors by both firms and weeks. I use reghdfe code written by @Sergio Correia .

    reghdfe dep-var Variable-of-Interest indep-var, absorb(firmcode) vce(cluster firmcode tw )


    It works ok, and I have not received any errors, but I think testing an unbalanced panel may not be correct. I appreciate any thought you may have on this.

    Many thanks
    Mona
    Last edited by Mona Yaghoubi; 18 Aug 2019, 21:16.

  • #2
    Dear Mona,

    I do not know much about the reghdfe code so please take these comments with a pinch of salt. In Correia (2016) (found at; http://scorreia.com/research/hdfe.pdf) the author seems to imply that previous solutions only work on strongly balanced data and that his method corrects for these issues (so you can used unbalanced data). I would suggest that you have a good read of the paper yourself. Additionally, the fact you have no received errors is a good indication that an unbalanced data set is okay, other user written code (such as xtgcause) often returns an error code stating balanced data is required if this is indeed the case.

    Kind regards,
    Jordan

    Comment


    • #3
      Hi Jordan,

      Many thanks for the link, I'll have a good read of the paper.

      Best
      Mona

      Comment

      Working...
      X