Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: -return list- after -codebook-


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: -return list- after -codebook-
Date   Thu, 10 Apr 2008 21:13:11 +0100

-codebook- is r-class but it doesn't always leave anything behind.
Usually this is good news. See the manual entry
for the full story. 

Getting the number of distinct values (presumably what you mean by
unique) was raised in a thread started by 
Herve Stolowy only yesterday. Various solutions are discussed at 

FAQ     . . . . . . . . . . . . . . . . . . .  Number of distinct
observations
        . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox and G.
Longton
        4/02    How do I compute the number of distinct observations?
                http://www.stata.com/support/faqs/data/distinct.html

and more could be mentioned. Herve found -distinct- from SSC did what he
wanted. 

Luhang Wang


Does anyone know why I get nothing with -return list- after
-codebook-? I did check the ado file of -codebook- and it is an rclass
command. It also seems a series of r() are well defined in the
program.

My purpose is to get the number of unique values of a variable stored
in a scalar or macro. Any suggestion of achieving this, maybe in other
ways, will be appreciated. 

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