Bookmark and Share

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]

st: SV: Combining string and numeric variables


From   Christian Trolle <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: SV: Combining string and numeric variables
Date   Wed, 4 Dec 2013 11:29:25 +0000

Is it possible to do it like this

gen Country_Region = group(Country Region), label

and then use reshape wide var (i) (Country Region)


MD, Ph.d. student
Christian Trolle
Department of Endocrinology, MEA, NBG
Aarhus University Hospital
Denmark
Institute of Clinical Medicine
Aarhus University
Denmark
http://clin.au.dk/forskning/forskningsomraader/laegelige-specialer/endokrinologi/medicinsk-forskningslaboratorium-nbg/medarbejdere/studerende/christian-trolle/

http://pure.au.dk/portal/en/persons/christian-trolle(eecc7a92-66dc-4db3-a412-2746d28f75d0).html 



-----Oprindelig meddelelse-----
Fra: [email protected] [mailto:[email protected]] På vegne af Miguel A. Duran
Sendt: 4. december 2013 10:49
Til: [email protected]
Emne: st: Combining string and numeric variables

Hi, statalisters. I have a panel data set in long form. This panel data set has two variables to identify observations, one for country (eg, UK) and one for region (eg, 11 or M0). I have to transform the dataset into wide form.
Nevertheless, to do this, if I am not mistaken, previously I have to combine these two identifying variables (to generate, eg, values such as UKM0). Does anyone know whether this can be done with Stata? Thanks in advance.

Miguel A.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index