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]

Aw: st: RE: Reshape from long to wide and attaching Labels contained in a Variable.


From   "Stefan Schöftner" <[email protected]>
To   [email protected]
Subject   Aw: st: RE: Reshape from long to wide and attaching Labels contained in a Variable.
Date   Fri, 30 Aug 2013 00:24:35 +0200 (CEST)

David,
 
Unfortunately i does not.
My Main Problem connsists of the Fact that the labels i want in my wide dataset, are the "abc, bcd, cda, acb, cda" Values  of the long form variable Title.
the way i put them into the schematic Wide Form might misslead. Because the values dont apply to the whole observation but only one variable of yy1,yy2....yyx and to which can only be seen decisevly in the Long form.
 
Also since the variables yyx can be several thousand doing it the way described would not be worth the hoped-for time saving later one.
 
I think i have to somehow attach the Title (abc) values somhow to the corresponding Code (yyx) in the Long-Fom so that by doing the reshape command the affiliation already exists and it automaticly gives the affiliated title value as Lable.
 
I sincerely hope this didnt get to complicated just now.
 
Best Regards
Stefan
 

Gesendet: Donnerstag, 29. August 2013 um 23:37 Uhr
Von: "Radwin, David" <[email protected]>
An: [email protected]
Betreff: st: RE: Reshape from long to wide and attaching Labels contained in a Variable.
Stefan,

Does this answer your question?

http://www.stata.com/support/faqs/data-management/apply-labels-after-reshape/

David
--
David Radwin
Senior Research Associate
Education Studies Division
RTI International
2150 Shattuck Ave., Suite 800
Berkeley, CA 94704
Phone: 510-665-8274

www.rti.org[http://www.rti.org]


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of "Stefan Schöftner"
> Sent: Thursday, August 29, 2013 2:11 PM
> To: [email protected]
> Subject: st: Reshape from long to wide and attaching Labels contained in a
> Variable.
>
>
>
> Hello Dear Statalist subscribers,
>
> As a fellow reader, i now dare to post my first own question.
> I got actually a rather simple looking issue but it seems not doable also
> i worked on it for several days
>
> I got a  sample of a Data file looking something like this:
>
> Long FORM:
> ID´s repeat therefor i need the wide form.
>
> Obs.          ID       Title             Amount                Code
> 1              xxx       abc              12345                   yy1
> 2              xxx       bcd              54321                   yy2
> 3              xxx       cda              43215                   yy3
> 4              xxx       acb              32154                   yy4
> 5              xxx       cad              21543                   yy4
>
>
> I use a reshape command to bring this dataset into wide form
> so it looks like this
>
> Wide Form:
>
> Obs.          ID        yy1      yy2    yy3    yy4      yy5       Title
>
>
> 1              xxx                                                  abc
> 2              xxx                                                  bcd
> 3              xxx      AMOUNT ---------------------Amount       cda
> 4              xxx                                                 acb
> 5              xxx                                                  cad
>
> What I now desire, would be that the variable "Title" be converted into
> the label text for the according variables yy1-yy5-yyx.
> yyx because the entire dataset consists of several 10.000 observations
> The variable "code" itself would be enough for identification but since im
> going to work a lot more with this sample the change in Label would help
> me quite a bit.
>
> At the current point in time i just drop "Title" and deal with the Coding.
> I would really appreciate any input on how to solve this issue.
>
> Best Regards and Thanks in Advance
> Stefan


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