On Wed, 8 Sep 2004, denis lalountas wrote:
 Now I want to compare the actual type I errors of a traditional 
 t-test and its bootstrapped version(Mackinnon -bootstrap inference 
 in econometrics -Durbin/Godfrey t-test). For doing this I have to 
 construct two nested loops. 
I've now read McKinnon's paper on this, and have a better grasp of 
what you're trying to do.  I agree: it seems that this really does 
require nested loops.
With one level of looping, it is possible to carry out a Monte Carlo 
analysis of an ordinary statistic and/or calculate the value of a 
bootstrap statistic.  But you want to implement a Monte Carlo analysis 
of the performance of a bootstrap statistic, so we need a bootstrap 
loop embedded in a Monte Carlo loop, as in your sample script.
Actually, McKinnon's analysis of the Durbin-Godfrey t-statistic has 
three levels of looping, since he embeds the procedure you describe 
within an outer loop that ranges over possible values for the 
autocorrelation coefficient for the dependent variable (which is fixed 
at 0.99 in your example).
I think it is time to add nested loops to gretl.  I plan to release 
version 1.3.0 of gretl fairly soon, and I'll see if I can get nested 
loops working for that release.
Allin Cottrell