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]

st: Problem with Stata handling of large dataset


From   "Palan, Stefan ([email protected])" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Problem with Stata handling of large dataset
Date   Mon, 5 Aug 2013 15:42:10 +0200

Hi everybody,

I have noticed a problem with Stata (SE 12.1, 64 bit) when working with large datasets. When I type the following:


----------------------------------------------------------------------
clear
set obs 63000000
gen long id=_n
gen long y=int(id/5)
gen long z=int((id-1000)/5)
gen long yz=y-z
sum yz
----------------------------------------------------------------------


I get the following output:


----------------------------------------------------------------------
    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
          yz |  63000000         200    .0035635        199        200
----------------------------------------------------------------------


Shouldn't the standard deviation be zero, and min equal max equal mean? If I type


----------------------------------------------------------------------
sum yz if yz==199
----------------------------------------------------------------------


I find that there are 800 observations where yz==199.

Can anybody help me with this problem?

Cheers,
Stefan.

 
 
Stefan Palan
Post-Doc
 
University of Innsbruck
Institute of Banking and Finance 
Universitaetsstrasse 15/4
6020 Innsbruck 
Tel.:  +43 (0) 512 / 507-7579
Fax.: +43 (0) 512 / 507-2846
[email protected]
http://www.palan.biz/academic

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