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

Re: st: RE: basic commands question


From   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: st: RE: basic commands question
Date   Wed, 05 May 2004 15:21:21 -0400

At 08:13 PM 5/5/2004 +0100, you wrote:
> Or..
> why does the following code not work?
>
> . by (var1 var2): egen freq=count(var3)
>
> I want to count the number of occurences  (var3) for each
> year for each
> country.  how do i save this reorganized result in a .dta file?
You need to omit the parentheses:

. by var1 var2: egen freq=count(var3)

(And be sure you've previously sorted on var1 var2).

--Nick Winter


--------------------------------------------------------
Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government [email protected] e
308 White Hall falcon.arts.cornell.edu/nw53 w
Cornell University
Ithaca, NY 14853-4601
*
* 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