Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Identifying unique values with codebook


From   Walter Garcia-Fontes <walter.garcia@upf.edu>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Identifying unique values with codebook
Date   Wed, 16 Jun 2010 15:12:32 +0200

I stumped into a problem when identifying unique values of a numeric
variable using "codebook": if the values are large they will be
identified as the same value.  

For instance I have a variable x with the following values:
0, 1, 2, ... 10 (that is 10 different values)

codebook x 
reports "unique values: 10"

Now do 
gen y = 100000000000000000 + x

codebook y
reports "unique values = 1"

Is this a feature?

-- 
Walter Garcia-Fontes
mailto: walter.garcia@upf.edu - http://puna.upf.edu
Departament d'Economia i Empresa - http://www.econ.upf.edu
Universitat Pompeu Fabra
Ramon Trias Fargas 25-27, 08005 Barcelona, Spain
Tel. +34 93 542 2722 - Fax. +34 93 542 1746

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