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]

Re: st: anycount .a and .b


From   Jörg Eulenberger <j.eulenberger@web.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: anycount .a and .b
Date   Tue, 03 Jul 2012 19:47:08 +0200

Thanks Nick for the solution.

But i was  not quite correct  by the varnames. Sorry.  Many variables
have different names like: eis01 anzahlki GEBJA01K STU01K KT01K EP01K
name04k.

Now i could  rename all vars but is there any way to avoid this?

Sorry for myincorrectness.

Jörg




Am 03.07.2012 19:17, schrieb Nick Cox:
> gen a_missing = var1 == .a
> gen b_missing = var1 == .b
>
> qui forval j = 2/600 {
>       replace a_missing = a_missing + (var`j' == .a)
>       replace b_missing = b_missing + (var`j' == .b)
> }


*
*   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