Announcement

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

  • Unbalanced macro panel data problem

    Hi,
    I have a very unbalanced panel data set - 46 countries and 24 years, 1 dependent variable, 16 explanatory variables.
    You can see this below:




    When I run xtset, set my 'global', and run:
    xtreg rev $x, fe
    xtdes if e(sample)
    gen c=1 if e(sample)









    So OK - I only have 16 countries, where for any given year I have a complete set of observations for all variables, of which this only happens 57 times, out of a possible 1104 times.

    I don't understand what this is doing. Is the regression just ignoring everything else? Why does it say my panel is strongly balanced?
    Why is it ignoring all the rest of the observations? Shouldn't N be 46 and T be 24?



    My data looks like this:




    I hope someone can help. Is it because I only have 405 observations for my Dependent variable, so it can only regress against a limited amount of data? But then, if I look at my Y variable, that's still 35 countries for those 405 observations out of a possible 1104.

    EDIT: i've just cut out a load of incomplete data to see if that made any difference - only using 9 countries which had at least 70% complete observations, and I still get similarly weird results, i just don't get what i'm doing wrong.

    thank you
    Last edited by mo richi; 10 Aug 2017, 22:42.

  • #2
    Mo:
    welcome to he list.
    The basic explanation is that Stata listwise deletes observations with missing values in any variable (dependent or independent).
    Besides, as per -xtset- entry in Stata .pdf manual:
    When the dataset contains a time variable, panels are said to be strongly balanced if each panel

    contains the same time points, weakly balanced if each panel contains the same number of observations

    but not the same time points, and unbalanced otherwise.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X