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, statalist.org is already up and running.


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

Re: st: unstacking


From   Abhimanyu Arora <abhimanyu.arora1987@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: unstacking
Date   Mon, 22 Aug 2011 12:46:51 +0200

Thanks very much as always, Nick, very useful.
Best regards
Abhimanyu

On Mon, Aug 22, 2011 at 12:23 PM, Nick Cox <njcoxstata@gmail.com> wrote:
> This problem is discussed within
>
> SJ-7-2  dm0031  . . . . . . . . .  Stata tip 45: Getting those data into shape
>        . . . . . . . . . . . . . . . . . . . . . . . C. F. Baum and N. J. Cox
>        Q2/07   SJ 7(2):268--271                                 (no commands)
>        tip on applications of reshape and solving data
>        management problems
>
> http://www.stata-journal.com/sjpdf.html?articlenum=dm0031
>
> in which a solution like yours is shown. So, it is not clear what is
> wrong without more information from you.
>
> Nick
>
> On Mon, Aug 22, 2011 at 10:49 AM, Nick Cox <njcoxstata@gmail.com> 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
>> <abhimanyu.arora1987@gmail.com> 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/


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