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

st: RE: use of count.

From   "Martin Weiss" <>
To   <>
Subject   st: RE: use of count.
Date   Thu, 18 Sep 2008 09:44:02 +0200

You probably cannot replace with the string count: if at all, you would have
to count first and the replace with the return value "r(N)".
Also try this:

u auto, clear
egen float mygroups = group(f rep78)
by mygroups, sort : egen float mycount = count(mygroup)


-----Original Message-----
[] On Behalf Of Ashim Kapoor
Sent: Thursday, September 18, 2008 9:34 AM
Subject: st: use of count.

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,
*   For searches and help try:

*   For searches and help try:

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