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)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: Re: increasing time burden during resampling
Date   Wed, 30 Dec 2009 11:19:07 -0600

Joe - I think it has something to do with tests using interaction "#" notation. Here's a test .do file I was using:

Contains data from testtime.dta
  obs:         1,764                          
 vars:             6                          30 Dec 2009 11:00
 size:        28,224 (99.9% of memory free)
----------------------------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
----------------------------------------------------------------------------------------------------
itime           int    %9.0g                  
icyt            int    %8.0g                  
jsub            int    %8.0g                  
ished           byte   %8.0g                  
z               float  %9.0g                  
icon            byte   %8.0g                  
----------------------------------------------------------------------------------------------------
Sorted by:  

. summ

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       itime |      1764           2    .8167281          1          3
        icyt |      1764          11    6.057018          1         21
        jsub |      1764    43.78571    46.23181          1        110
       ished |      1764    .3571429    .4792933          0          1
           z |      1698    2.161716    1.369204  -2.302585    6.79425
-------------+--------------------------------------------------------
        icon |      1764    .3571429    .4792933          0          1


//testtime.do
version 9.0
args NIT 
use testtime,clear
forv it=1(1)`NIT' {
timer clear 1
timer on 1
forv i=1(1)21 {
xtreg z itime##ished icon if icyt==`i' ,i(jsub) 

 lincom _b[2.itime#1.ished] -_b[1.itime#1.ished] + _b[2.itime]-_b[1.itime]
 lincom _b[3.itime#1.ished] -_b[1.itime#1.ished] + _b[3.itime]-_b[1.itime]
 lincom _b[3.itime#1.ished] -_b[2.itime#1.ished] + _b[3.itime]-_b[2.itime]

 }
timer off 1
timer list 1
noi di `it',r(t1)
}

and here's the timings for the first 51 iterations:


1 .937
2 .922
3 .953
4 .985
5 1
6 1.046
7 1.063
8 1.109
9 1.157
10 1.203
11 1.25
12 1.328
13 1.36
14 1.406
15 1.5

Now I run it again without the "lincoms" (closing out all Stata processes and launching it again):
. run testtime 15
1 .859
2 .844
3 .844
4 .859
5 .844
6 .844
7 .844
8 .859
9 .859
10 .844
11 .86
12 .843
13 .844
14 .86
15 .875

Al

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index