Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: unstacking

From   Abhimanyu Arora <>
Subject   st: unstacking
Date   Mon, 22 Aug 2011 11:42:11 +0200

Dear statalist
I have 4 variables country_characteristic (Taking values such as GDP,
Imports, exports etc.), country, year and value (of the corresponding
The end result that I would like to see is the following form
country    year    GDP    Imports     Exports       (variable values
now being variable names)

I tried the following command

.reshape wide var, i(country year) j(country_char) string

but didn't work out.

Would be thankful for a solution
Best regards
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index