Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: r(111) with egen count function


From   "Elizabeth Allred" <[email protected]>
To   <[email protected]>
Subject   st: RE: r(111) with egen count function
Date   Mon, 12 Jul 2010 10:57:44 -0400

Thanks, Michael and Nick. I guess I haven't used either for a while and miss-remembered that they don't do the same thing.

>>> On 7/12/2010 at 10:42 AM, in message
<4A1EC00C854DF24688FFBD6B36D0B46601E4BE33@GEOGMAIL.geog.ad.dur.ac.uk>, "Nick
Cox" <[email protected]> wrote:
> This isn't an -update- problem. 
> 
> The argument saa1 saa2 saa3 is not an expression, so your syntax is
> illegal now and was illegal before the -update-. 
> 
> An expression is here whatever evaluates to a single number for each
> observation. 
> 
> Nick 
> [email protected] 
> 
> Elizabeth Allred
> 
> I just updated my ado files and am now having a problem with the -egen-
> function, -count-. Fortunately, -rownonmiss- works.
> 
> Stata 11.1 completely up-to-date on Windows.
> 
> . egen count1=count(saa1 saa2 saa3)
> saa1saa2saa3 not found
> r(111);
> 
> . egen count2=rownonmiss(saa1 saa2 saa3)
> 
> . tab count2
> 
>      count2 |      Freq.     Percent        Cum.
> ------------+-----------------------------------
>           1 |         58        6.18        6.18
>           2 |        187       19.91       26.09
>           3 |        694       73.91      100.00
> ------------+-----------------------------------
>       Total |        939      100.00
> 
> 
> *
> *   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index