Statalist


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

Re: st: dummy table


From   Tim Wade <wadetj@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: dummy table
Date   Fri, 20 Feb 2009 21:27:51 -0500

how about:

collapse (max) dum1 dum2 dum3 dum4, by(id)

Tim


On Fri, Feb 20, 2009 at 7:31 PM,  <jota.be@web.de> wrote:
> Dear all
>
> I wanna get from
>
> id      dum1    dum2    dum3    dum4
> 1       1       0       0       0
> 1       0       1       0       0
> 1       0       0       0       1
> 2       0       1       0       0
> 2       0       0       1       0
> 3       1       0       0       0
> 3       0       1       0       0
> 3       0       0       1       0
> 3       0       0       0       1
> 4       0       1       0       0
> 5       1       0       0       0
> 5       0       0       1       0
>
> to
>
> id      dum1    dum2    dum3    dum4
> 1       1       1       0       1
> 2       0       1       1       0
> 3       1       1       1       1
> 4       0       1       0       0
> 5       1       0       1       0
>
>
> Does anyone have an idea?
>
> Thanks!
> _______________________________________________________________________
> DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
> DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a
>
>
> *
> *   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/
>

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