Statalist


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

Re: st: a doubt about calculations in stata


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: a doubt about calculations in stata
Date   Sat, 7 Mar 2009 14:05:57 +0000 (GMT)

 
---- 2009/3/6 Rodrigo Briceño wrote:
> > Dear Statalisters. I'm using Stata 9 and I'm
> > trying to generate a new variable that will be 
> >used as an identification for further merging of
> > several databases.
> > From these values I build a formula, that applied in
> > excel produced the desired results:
> >
> > gen
> > id2=LOTE*1000000000+TIPO*100000000+FOLIO*1000+VIV*100+R101*1
> > The thing is that when I applied the formula in Stata
> > the results are wrong.

--- On Fri, 6/3/09, Eva Poen wrote:
> gen double
> id2=LOTE*1000000000+TIPO*100000000+FOLIO*1000+VIV*100+R101*1

For more information on why Eva's solution works see: 
http://www.ats.ucla.edu/stat/Stata/faq/longid.htm

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      

*
*   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