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: -contract- hard-coded to generate frequencies with datatype long, can result in missing
From
László Sándor <[email protected]>
To
[email protected]
Subject
st: -contract- hard-coded to generate frequencies with datatype long, can result in missing
Date
Thu, 9 May 2013 18:34:27 -0400
Hi all,
This is just a public service announcement, so you won't lose the
better half of your workday like I just did:
-contract- seems a nifty little official command for a single purpose,
but bit me hard: it is hard-coded to generate frequencies with the
data type long, which can then silently flip over to missing if you
have big data with more than 2 billion observations (probably coming
from fweights from aggregates though, as in my case).
Probably -collapse (count) _freq=byvar1, by(byvar1 byvar2)- is the way
to go. I just knew -collapse- does not like string variables, but for
byvars it does.
My bad.
Laszlo
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/