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

Re: st: counting

From   chris wallace <>
Subject   Re: st: counting
Date   Sat, 7 Feb 2004 08:07:17 +0000

Quoting Amit Khandelwal <>:

> 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

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index