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: -contract- hard-coded to generate frequencies with datatype long, can result in missing


From   László Sándor <sandorl@gmail.com>
To   statalist@hsphsun2.harvard.edu
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index