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]

RE: st: Cannot open .dta file due to size


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Cannot open .dta file due to size
Date   Mon, 14 Jun 2010 19:10:13 +0200

<>

" See the guide on working with large data files in Stata here:
http://www.cpc.unc.edu/research/tools/data_analysis/statatutorial/misc/large
_files"




But careful, the last recommendation on the page Sergiy is quoting seems
dubious: To select a 10% sample, 

-use if runiform()>0.4 & runiform()<.0.5 using bigfile.dta- 

is not a good strategy. It will select 60% of the observations after the
first part is processed, and then half of the 60%, i.e. 30%.


***
clear*
set obs 10000
gen x=rnormal()
gen int id=_n
save bigfile, replace
use if runiform()>0.4 & runiform()<0.5 using bigfile.dta
di in r "Nobs: " _N ", percentage: " `=_N/100' "%"
***

If you really want 10% with this strategy, make sure you are referring to
the same draw from the uniform distribution, i.e. via 

-use if inrange(runiform(),.4,.5) using bigfile.dta-



HTH
Martin


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Sergiy Radyakin
Sent: Montag, 14. Juni 2010 18:47
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Cannot open .dta file due to size

See the guide on working with large data files in Stata here:
http://www.cpc.unc.edu/research/tools/data_analysis/statatutorial/misc/large
_files
Best, Sergiy


On Mon, Jun 14, 2010 at 11:54 AM, miyu Lee <miyu.lee1@googlemail.com> wrote:
> I have a huge dataset (200 GB) which I cannot open on STATA. Is there
> any way I can make STATA to open the set only for selected variables
> or choose the first, say, 100 observations only?
>
> Thanks in advance for any recommendations, Miyu
> *
> *   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/
>

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


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


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