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: Cannot open .dta file due to size
From
Sergiy Radyakin <[email protected]>
To
[email protected]
Subject
Re: st: Cannot open .dta file due to size
Date
Mon, 14 Jun 2010 15:08:01 -0400
On Mon, Jun 14, 2010 at 1:10 PM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> " 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-
agree,
S.R.
>
>
>
> HTH
> Martin
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Sergiy Radyakin
> Sent: Montag, 14. Juni 2010 18:47
> To: [email protected]
> 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 <[email protected]> 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/
>
*
* 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/