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]

Re: st: upper limit on fweights? overflowing into missing values?


From   Richard Williams <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: upper limit on fweights? overflowing into missing values?
Date   Sun, 28 Jul 2013 19:46:18 -0400

According to -help limits-, the maximum number of observations is 2,147,483,647. Your weights give you more than 4 billion cases, well above that. Further, the help also says that this is a theoretical maximum; memory availability will certainly impose a smaller maximum.

On my computer, I specified [fw = 1073741823] on the pwcorr command and it ran. Then I specified [fw = 1073741824] and it did not run. These numbers put you just below and just above the maximum number of cases that Stata allows.

So in short, it appears that your fweighted cases can't exceed the 2 billion+ that Stata allows, and memory restrictions may hold you to even less than that.

Also, you probably need to specify that the fweight variable is type long, e.g.

input y x long fw

Sent from my iPad

On Jul 27, 2013, at 12:36 PM, László Sándor <[email protected]> wrote:

> Hi,
> If you care, here is an example that silently produces missing values.
> I notified Stata Support.
> 
> input y x fw
> 2 1 2147483621
> 1 2 2147483621
> end
> de
> pwcorr y x [fw=fw]
> exit
> 
> Thanks,
> 
> Laszlo
> 
> On Sun, Jul 21, 2013 at 5:08 PM, Nick Cox <[email protected]> wrote:
>> I'd suggest documenting your problems with a reproducible example and
>> sending Stata tech support.
>> 
>> 
>> Nick
>> [email protected]
>> 
>> 
>> On 21 July 2013 21:55, László Sándor <[email protected]> wrote:
>>> Hi,
>>> in Stata/MP 12.1 I am getting missing values with using -pwcorr- with
>>> -fweights- though the feature works fine with other data or if I scale
>>> my weights down. Is it possible to simply have too large fweights,
>>> e.g. if they cannot be of type -long- anymore?
>>> 
>>> If so, why doesn't Stata warn me about this?
>>> 
>>> I vaguely remember some Statalist of Stata blog discussion of this,
>>> but I could not even Google it up, and Stata still did not warn me…
>>> 
>>> Actually, why didn't Stata complain that I did not have integer
>>> fweights if obviously the variable wasn't of type byte, int or long?
>>> 
>>> Thanks,
>>> 
>>> 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/
>> 
>> *
>> *   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/
> 
> *
> *   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/

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index