Announcement

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

  • regdhfe display empty samples

    Hi All,

    I am doing a diff-in-diff regression in a panel dataset.
    As I want to include both firm fixed effects and year*industry fixed effects I used the regdhfe code. More specifically:

    reghdfe dmarketshare lagcash1 CUT21 cash1xCUT21 a(gvkey sicfyear)

    dmarketshare: the year change in marketshare per firm
    lagcash1: the variable of interest: lagged cash holdings of the firm
    CUT2: A treatment dummy
    lagcash1xCUT2: interaction variable
    gvkey: fixed effects for firm
    a,(gvkey sicfyear): include fyear*industry fixed effects



    But it always displays:

    Empty sample, check for missing values or an always-false if statement
    r(2000);

  • #2
    Have you verified that there are at least some observations that do not have any missing value on any of the variables (help misstable)?

    This error message also occurs if a variable is string instead of numeric. You might want to check for that, too.

    Comment


    • #3
      Originally posted by Joseph Coveney View Post
      Have you verified that there are at least some observations that do not have any missing value on any of the variables (help misstable)?

      This error message also occurs if a variable is string instead of numeric. You might want to check for that, too.
      Thank you Joseph! It is really helpful. It turns out that I was using a string variable for clustering.

      Comment

      Working...
      X