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: Splitting a dataset efficiently/run regression repeatedly in subsets
From
Neil Shephard <[email protected]>
To
[email protected]
Subject
Re: st: Splitting a dataset efficiently/run regression repeatedly in subsets
Date
Mon, 15 Nov 2010 15:37:39 +0000
Depending on how much physical RAM you have and whether you're using a
32-bit or 64-bit OS (preferably later to allow access to RAM > 1Gb)
you might consider using a -tempfile- to hold your data and reload
from. A simplified example (not storing coefficients...
use sim, clear
tempfile t
save `t', replace
forval s=1/50000 {
qui use `t' if(run == `s'), clear
regress x y
}
Whether its actually quicker I've no idea, but it will certainly save
on read/writes to disc/network drive.
Neil
--
"Our civilization would be pitifully immature without the intellectual
revolution led by Darwin" - Motoo Kimura, The Neutral Theory of
Molecular Evolution
Email - [email protected]
Website - http://kimura-no-ip.org/
Photos - http://www.flickr.com/photos/slackline/
*
* 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/