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]
Re: st: Combining variables
From
Matthew Anstey <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Combining variables
Date
Thu, 15 Aug 2013 19:07:38 -0700
Thanks for allowing me some latitude.
That has helped.
Matt
On 15/08/2013, at 5:15 PM, Nick Cox <[email protected]> wrote:
> From where, or more precisely when, I sit you seem longitudinally challenged.
>
> Seriously: it's not completely clear what you want, and it's always a
> good idea to explain exactly what code you tried and what "without
> success" means.
>
> However, disjoint cross-combinations follow from e.g.
>
> egen age = group(AGE1 AGE2 AGE3 AGE4), label
>
> so that those people 1 1 1 1 will be grouped together and so on.
>
> Your question leaves open what you want to do if the AGE? values
> _don't_ agree, but the command above will group similar responses
> together in any case.
>
> Nick
> [email protected]
>
> On 16 August 2013 00:51, Matthew Anstey <[email protected]> wrote:
>> Good afternoon,
>>
>> I have a single survey dataset that respondents answered questions about multiple patients (up to 4).
>>
>> Thus for the 4 patients the respondents may have described, they are recorded as
>>
>> AGE AGE2 AGE3 AGE4
>> DAYS DAYS2 DAYS3 DAYS4
>> and so on for the 10 characteristics. These are categorical variables (not continuous).
>>
>>
>> I want to create a summary variable for each characteristic, that will combine all the patients together into their categories.
>>
>> For instance,
>>
>> For instance : age has 4 possible categories (groupings 1, 2 , 3 ,4 ). I want to combine AGE grouping 1 with AGE2 grouping 1, with AGE3 grouping 1 with AGE4 grouping 1 and then AGE2 grouping 2 and so on.
>>
>> I have been trying -egen- without success.
> *
> * 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/
*
* 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/