Statalist


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

st: RE: function to calculate frequencies


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: function to calculate frequencies
Date   Mon, 6 Oct 2008 11:42:47 +0100

Not the point, I think. 

-tabulate, missing- indeed counts values present in the data but missing. 

-count- is needed to detect the fact that something is not even present in the data. 

In the auto data, 

. tabulate rep78

. tabulate rep78, miss 

give different results as the second but not the first counts missings too. 

. count if mpg == . 
0 

makes explicit the fact that no observations contain missing values for -mpg-. 

Nick
[email protected] 

Roy Wada

>For example, I would like to obtain the frequency for a variable of a
>number that, perhaps, there aren�t any observation. ( I can�t achieve
>it with tabulate, because it returns only the existing frequencies).
>Are there any function to make this?

The =miss= option of -tabulate- will keep track of missing frequencies.

Please read the help file.


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