Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: unstacking
From
Abhimanyu Arora <[email protected]>
To
[email protected]
Subject
Re: st: unstacking
Date
Mon, 22 Aug 2011 12:23:30 +0200
Thank you Nick, for confirming that -reshape- was the right way to proceed.
I managed to fix the problem. The values taken by the country_char
variable had spaces so it was dropped after the reshape command.
Cheers
Abhimanyu
On Mon, Aug 22, 2011 at 11:49 AM, Nick Cox <[email protected]> wrote:
> "Didn't work out" does not convey what your precise problem is.
>
> Perhaps
>
> . reshape wide value , ...
>
> Nick
>
> On Mon, Aug 22, 2011 at 10:42 AM, Abhimanyu Arora
> <[email protected]> wrote
>
>> I have 4 variables country_characteristic (Taking values such as GDP,
>> Imports, exports etc.), country, year and value (of the corresponding
>> country_char).
>> 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.
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/