Bookmark and Share

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: RE: Combing Variables


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Combing Variables
Date   Wed, 27 Apr 2011 18:49:34 +0100

Depends on what you mean by "combine". 

Perhaps in your field that has some precise meaning, but not in mine! 

But -egen, max()- would be useless here as it seems you want to combine across observations, in which case it would be a matter of one of the -row*()- functions of -egen-. 

Nick 
[email protected] 

Dennis Kramer

I have the following dataset:

Student_ID     Subject Code     Test1 Year 1     Test1 Year 2     Test
1 Year 3     Test 2 Year1      Test 2 Year 2     Test 2 Year 3
    1                   1                        50

 45                    42
    1                   2                        65

 50                    42
    2                  1                         50
   49
                       42
    2                   2                        65
   50
                       42

I wanted to generate a variables for each year that combines the test
types. I am not sure if I could use the egen max function.


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