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

Re: st: counting


From   chris wallace <c.wallace@qmul.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: counting
Date   Sat, 7 Feb 2004 08:07:17 +0000

Quoting Amit Khandelwal <amit.khandelwal@yale.edu>:

> Suppose I have 5 states and I want to count the number of children in each 
> state. How can I do this without generating a new variable. If I do
> 
> by state: count if child==1
> 
> then r(N) only stores the last state's result.

If you just want a visual display?

tab state if child==1

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