Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Manipulating data


From   "Arnold Levinson" <[email protected]>
To   "Statalist" <[email protected]>
Subject   st: Manipulating data
Date   Tue, 22 Mar 2005 09:10:51 -0700

Stata friends,

I've received an Access file with multiple data tables. Measurements on
individuals are linked between tables by a coded identifier. I don't know
Access programming, but have converted to Stata files using StatTransfer. I
find that each table has two "super-column" variables, one containing the
name of the actual measurement variable, the other containing the response
value for each participant; where an original variable allowed multiple
responses per individual, there are multiple rows. Easy enough to separate
the measurement variables, but is there an easy way to redistribute multiple
responses on an individual into multiple new variables?
For example:
Participant 1 answered "3" and "5" to VARNAME. The data now look like this:
participant    VARNAME
    1                3
    1                5

I'd like it to become something like:
participant    VARNAMEa    VARNAMEb
    1                    3                        5

Thanks in advance for thoughts.
Arnold H. Levinson, Ph.D.
Assistant Professor of Preventive Medicine & Biometrics
University of Colorado at Denver & Health Sciences Center
Associate Scientist
AMC Cancer Research Center
303.777-8801
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index