Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Re: increasing time burden during resampling


From   "Feiveson, Alan H. (JSC-SK311)" <alan.h.feiveson@nasa.gov>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Re: increasing time burden during resampling
Date   Tue, 29 Dec 2009 09:19:52 -0600

Joseph - Thanks for your suggestion, but I don't think it's -bs-.  I tested to see what would happen if I didn't resample at all, but kept estimating and testing on the original data - same problem. In this test program, I also took out all the -lincoms- and -test- commands and just redid the estimation. There was still a very small increase in execution time with iteration number, but nowhere near what it was before.

Al

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Joseph Coveney
Sent: Monday, December 28, 2009 9:12 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: Re: increasing time burden during resampling

Al Feiveson wrote:

Hi - I am running Stata 11 on Windows XP and I am implementing a form of
multiple testing using a resampling method as described in Westfall & Young's
text. Basically, for each iteration the method is: 

1)resample the data modified to a joint null situation (I use the Stata -bs-
command for this) 
2) fit a model to the resampled modified data 
3) do a bunch of tests using -test-  
4) save the test results.

These operations are identical for each iteration, yet the time per iteration
increases roughly linearly until it becomes prohibitive to continue. 

If I stop after a given number of iterations, I must close out all Stata
processes before starting again, else the bogged down state still holds.

Previous versions of this that used the estimated coefficients and standard
errors without -test- didn't seem to have this problem. So I suspect it has
something to do with repeated use of the -test- command. Maybe something needs
to be reset or cleared after each iteration?

I tried increasing the memory allocated to Stata, but that didn't seem to help.
I would appreciate any suggestions for improving efficiency here.

--------------------------------------------------------------------------------

Could the problem lie with -bs-?  I think that -bs- keeps track of the original
configuration of the dataset with pointers or hidden variables or something.
If, between iterations, you're not allowing -bs- to restore the original
configuration, then these pointers, hidden variables or whatever will cumulate
linearly with each iteration and tie up resources.

It looks like you've already done the Westfall-Young "maxT" (previous versions
using only coefficients and their standard errors) and are now going for their
"minP" (current version using -test- results).  Is adding -test- to the routine
the only change, or could there also be some difference in how -bs- is used,
e.g., by making changes to the dataset (saving model results in the dataset via,
say, -estimates-) before -bs- has had the chance to restore the dataset and
release resources used in keeping track of its original configuration?

Joseph Coveney


*
*   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   |   What's new   |   Site index