Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Add


From   David Kantor <dkantor@jhu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Add
Date   Fri, 20 Feb 2004 10:32:24 -0500

Try,

egen C = rsum(A B)


At 09:49 AM 2/20/2004 -0500, Jorge Tuesta wrote:
How I can add two variables without consider missing-values?

For example i have two variables A anb B:

    A     B
    7     .
    1     3
    3     .
    .     .
    1     4
    .     5


I would like plus A + B = C


    A     B      C
    7     .      7
    1     3      4
    3     .      3
    .     .      .
    1     4      5
    .     5      5
[...]
David Kantor
Institute for Policy Studies
Johns Hopkins University
dkantor@jhu.edu
410-516-5404

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