I am trying to create new columns that are the sum of existing columns, but the resulting numbers are not what is expected. As an example, I manually entered the following var1 var2 var3(no decimals); then used egen tot=rowtotal(var*); then used gen add=var1+var2+var3.
The resulting tot and add are okay for smaller numbers, but not for the larger numbers. The last two rows should be 370,370,367 and 964,964,961 respectively. Am I doing something incorrectly? I can't seem to figure it out...
Thanks,
Ryan
var1 var2 var3 tot add
1 5 9 15 15
2 6 10 18 18
3 7 11 21 21
4 8 12 24 24
123456789 123456789 123456789 370370368 370370368
321654987 321654987 321654987 964964928 964964992
*
* 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/