Statalist


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

Re: st: use of count.


From   Johannes Geyer <[email protected]>
To   [email protected]
Subject   Re: st: use of count.
Date   Thu, 18 Sep 2008 09:48:16 +0200

To me it is not clear what you try to achieve. It is easier to help if you 
explain what variables you have and what you are trying to do using Stata, 
in particular describe an error if it occurs.

I assume you want to count the number of candidates in each state but I 
have no idea what "cnum" and "cname" mean and what "count" is. Is "count" 
a variable? Note that the syntax of the command count is different. And 
remember that "(" ")" parentheses in a by-statement have an important 
meaning: "The varlist1 (varlist2) syntax ... verifies that the data are 
sorted by varlist1 varlist2 and then performs a  by as if only varlist1 
were specified." 

Johannes

[email protected] schrieb am 18/09/2008 09:34:21:

> Hello everyone,
> 
> I have a question :
> 
> I want to do :
> 
> bysort state cnum cname : replace no_of_cand_in_state=count
> 
> This does not work. could someone please tell me how do I fix this ?
> 
> Thank you,
> Ashim.
> *
> *   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/

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