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]
Re: st: anycount .a and .b
From
Jörg Eulenberger <[email protected]>
To
[email protected]
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/