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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: Resolving reshape problem.


From   Amir Kasaeian <amir_kasaeian@yahoo.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Resolving reshape problem.
Date   Sun, 10 Mar 2013 17:16:26 -0700 (PDT)

Dear all,



I have a big problem in dealing with my data set and really need your contribution.
My data set includes variables such as ID number (subjects), date, gender, and some other clinical measurements like fbs, tc, ha1c and sb.
Total number of observations are 30000.
The problem is that I have some repeated measurements for clinical variables but they are listed below each other in the data files with the same ID.
I should do all my analysis in stata 11. So, data form is "long" in stata that should reshape to "wide" form.
By "duplicates" commands I found that max number of repeated is 7 in about 2000 observation in total.
I know I should use the reshape command but I have problem in using i & j. Should I generate a variable before using the command?
How should I write codes for converting my data?

Can anyone help me to resolve this problem.
Your contribution be appreciated in advance.

Many thanks.
Amir

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index