Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: sorting a variable list within each obs.(row)


From   Gawrich Stefan <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: sorting a variable list within each obs.(row)
Date   Tue, 26 Aug 2008 12:52:41 +0200

The "cond" function is useful in this case:

gen v5 = min( cond(v1<0,.,v1), cond(v2<0,.,v2), cond(v3<0,.,v3),
cond(v4<0,.,v4) )

Stefan

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