Hello, I would be very much obliged if you could let me know how to transform the long format of panel data, like this:
country year gdp taxes gini ...
Chile 1970 4.2 17 45
Chile 1971 4.8 18 46
.
.
.
Chile 2010 8.1 26 43
USA 1970 15.2 23 36
USA 1971 16.3 24 35
.
.
.
USA 2010 26.8 37 39
.
.
.
into the wide format:
country vars 1970 1971 ... 2010
Chile gdp 4.2 4.8 ... 8.1
Chile taxes 17 18 ... 26
Chile gini 45 46 ... 43
. .
. .
. .
USA gdp 15.2 16.3 ... 26.8
USA taxes 23 24 ... 37
USA gini 36 35 ... 39
. .
. .
. .
So, many countries, many variables and... yeah, it would save a lot of time if you could help me
Kind regards and thanks in advance.
Bookmarks