Hello everyone,

I have to say at first that I'm far from being a Stata expert, but I have to use it for my master's thesis and I hope you can help me.

So I have panel data from four different sources in total and I managed to merge them together, but the data set is unbalanced; the data sources neither cover all the same years nor all the same countries, but of course they overlap to great extend. Is there a command to get an overview for every country (id) for which timespan (year) my explanatory variables are available and drop specific countries and years afterwards to get a balanced panel?

And a second question where I don't know whether I should open a seperate thread for it: When I use the command
xtsum id year var1 var2 etc.
there is no within variation (standard deviation) in countries, but some between variation in years. I thought that shouldn't exist? Or does it have to do with the unbalanced data? What do I do about it?

Help would be highly appreciated! Btw of course I googled before asking, but didn't find anything that helped me. If there is more information you need, please tell me. Thank you in advance.