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: Resolving reshape problem.
From
Amir Kasaeian <[email protected]>
To
"[email protected]" <[email protected]>
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/