Statalist


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

Re: st: how to create a new column


From   n j cox <[email protected]>
To   [email protected]
Subject   Re: st: how to create a new column
Date   Sun, 21 Oct 2007 22:43:52 +0100

gen d = max(a, b, c)

Nick
[email protected]

[email protected]

Consider these three columns, a, b, c:


a    b    c    | d
------------------

1    .    .    | 1

.    .    5    | 5

.   0.2   .    | 0.2

2    .    .    | 2


where "." mean no data. Each line has only a box different
from "."? Starting from the first three columns, I would
like to form a new column "d", as in the example above.
*
*   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