Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: question about the anycount option of egen


From   Ekaterina Hertog <ekaterina.hertog@sociology.ox.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: question about the anycount option of egen
Date   Sat, 20 Feb 2010 19:32:00 +0100

Dear all,

I need to generate a variable which equals a number of times variables in my dataset the name of which starts from nodes equal 1.

I did it in the following way:

egen nodes = anycount(nodes*), v(1)

however now I realise that I want to include a count of all variables the name of which start from nodes, but one. I looked at the help file and it seems I cannot exclude 1 variable in the anycount option of egen and will have to do it in a more roundabout way. I just wanted to confirm if that is the case?

I will be most grateful for any advice,

Warm regards,

Ekaterina

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index