Statalist


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

st: RE: function to calculate frequencies


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
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
n.j.cox@durham.ac.uk 

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