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]

AW: st: AW: Reshaping a Dataset


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: AW: Reshaping a Dataset
Date   Fri, 23 Jul 2010 16:32:11 +0200

<> 


Begs the question: How come the data are organized in this fashion? I would not know how to conduct an analysis given such a data structure. Maybe you can fill us in.



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von drreg@earthlink.net
Gesendet: Freitag, 23. Juli 2010 15:06
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: AW: Reshaping a Dataset

Yes, that is correct.


-----Original Message-----
>From: Martin Weiss <martin.weiss1@gmx.de>
>Sent: Jul 23, 2010 8:55 AM
>To: statalist@hsphsun2.harvard.edu
>Subject: st: AW: Reshaping a Dataset
>
>
><> 
>
>The first table does not wrap well, so it is hard to tell what the -varname-s really are. It looks as if the columns contain both strings, to hold the site and county names, and numeric data, correct?
>
>
>
>HTH
>Martin
>
>
>-----Ursprüngliche Nachricht-----
>Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von drreg@earthlink.net
>Gesendet: Freitag, 23. Juli 2010 14:47
>An: Statalist
>Betreff: st: Reshaping a Dataset
>
>I've been working on this for a while now, but obviously I do not yet understand what -reshape- needs to do its work.
>
>Here is some data from the dataset:
>
>site	  Crouse   Garinger   Arrowood   County Line   Rockwell   Enochville   Monroe
>county	  Lincoln  Burton     Burton     Burton        Chance     Chance       Union
>date							
>20050701	    0.082	           0.083                    0.08	
>20050709            0.076      0.076	
>20050720            0.084                               0.079			
>20050721                       0.08        0.085			
>20050722						0.078	
>20050724						0.08	
>20050725  0.101     0.081      0.095       0.078        0.087       0.079
>
>I want to reshape the dataset to look like:
>
>date      county     site           conc
>20050701  Lincoln    Crouse           .
>20050701  Burton     Garinger       0.082
>20050701  Burton     Arrowood         .
>20050701  Burton     County Line    0.083
>20050701  Chance     Rockwell         .
>20050701  Chance     Enochville      0.08
>20050701  Union      Monroe           .
>etc.  etc.
>
>Can anyone assist me with this? Thanks much.
>
>reg
>*
>*   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/


*
*   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