Dear Statalist members,
I want to merge two panel data sets. One contains information regarding 2000 firms over 4 years, and one of the variables is the country they are from, but it also contains time-sensitive information such as net income and total assets. The other data set contains country-information concerning the same four years. I want to match the country information in a particular year to the firm information in that same year based on the country the firm is from. For example, the GDP per capita of Germany in 2013 needs to be added to the observations regarding German firms in 2013, and the GDP per capita of Germany in 2014 needs to be added to the observations regarding German firms in 2014, etc.
How do I do this? Many-to-one merging does not work in this case and I've heard that many-to-many merging provides useless results.
Can anyone help me?
Kind regards,
Elles
Related Posts with How to merge two panel data sets?
stata doesn't recognises the values of variablesDear all, I just was working on excel files (census data) with the following code: Code: clear* …
Same datapoint across different date formatsI am looping over different date variables in a graph, that will be my x-axis. The four variables ar…
Generating Count of Recurring names in Successive Time PeriodsHi Statalist, I had a small question that I was hoping to get help with. I refer to the table below …
Using SMCL in Stata GraphsIs there comprehensive documentation of which SMCL tags do and do not work as intended when producin…
Fixed or random effects with unbalanced panel data?Dear community, I have an unbalanced panel dataset of 165 countries from 1991-2019, in which my dep…
Subscribe to:
Post Comments (Atom)
0 Response to How to merge two panel data sets?
Post a Comment