Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: n-way tabulation


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: n-way tabulation
Date   Tue, 1 Nov 2005 11:09:01 -0000

This is good technique, but also a 
re-invention of what is already provided 
by -contract, zero-. 

On the original question, see also -groups- 
from SSC. 

Nick 
[email protected] 

Joseph Coveney
 
> You can get the cross-tabulation counts by using
> 
> preserve
> contract religion gender age ethnicity
> list, noobs separator(0)
> restore
> 
> The cell counts are in the variable _freq.
> 
> --------------------------------------------------------------
> ------------------
> 
> I forgot to mention that, if you suspect that some cell 
> counts are zero
> (that is, if some combinations are not represented among the 
> original data)
> and if you want those listed, then you would make placeholders for the
> combinations by inserting a -fillin religion gender age 
> ethnicity- command
> after -contract-, fill in the missing values of _freq with zeroes, and
> then -sort- again before -list-.

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