Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

RE: st: Extra decimal places

From   Maarten buis <>
To   stata list <>
Subject   RE: st: Extra decimal places
Date   Tue, 8 Jun 2010 08:35:09 -0700 (PDT)

--- Devora Shamah wrote:
> I am having an issue with Stata adding places to decimal values. In 
> preparation to append and merge the datasets I added a decimal number to 
> the id codes based on the school id to ensure that id was unique across 
> all the datasets. 
> For example:
> gen id=  ApplicationTableID+.3
> I have discovered that the actual values range from X.29999 -X.3002.

For the reason see: <>

A solution is:
gen long id=  10 * ApplicationTableID +3

Hope this helps,

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


*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index