Announcement

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

  • "Panel must be strongly balanced" in bacondecomp command

    Today when running the simple regression as below, the code works well

    reghdfe y x1 x2 , a(TYPE2 yr)
    However, when I run the below code with bacondecomp command (https://ideas.repec.org/c/boc/bocode...2ah0nsRMWyhik0)

    Code:
    bacondecomp y x1 x2, a(TYPE2 yr)
    The code generates the error below

    Panel must be strongly balanced, i.e. each panel must have the same set of time points
    with no control variables, must specify the detail option currently (only works without weights)
    invalid syntax
    r(198);
    I am wondering what is the problem here and how to sort it out, thanks in advance
    Last edited by Phuc Nguyen; 26 Jun 2021, 18:47.

  • #2
    Phuc:
    the problem here is that you tried to use on your unbalanced panel a community-contribute module that requires a strongly balanced panel to work.
    Therefore, you may want to consider imputing the missing data (at the risk of ending up with a sample of observations with tenuous relationships with the original one) or to change your analysis after -reghdfe- (which is another community-contributed programme, as the FAQ asks us to mention in our post, and for very good reasons, too).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X