On Wed, 12 Mar 2014, Allin Cottrell wrote: > This is the fastest version I can come up with on a quick go (if one doesn't > mind having the result as a matrix): > > <hansl> > set stopwatch > scalar T = 10000 > matrix y = zeros(T,1) > scalar iters=10000 > matrix DFT = zeros(iters,1) > > loop i=1..iters --quiet > y = cum(mnormal(T, 1)) > DFT[i] = (T-2) * (mols(y[3:],mlag(y,1)[3:])-1) > endloop > mwrite(DFT, "DFT.mat") > printf "Time taken: %f seconds\n", $stopwatch > </hansl>
Not to mention the fact that this one is the easiest to parallelise if you have the right hardware and you don't mind using the unstable version of gretl (see http://lists.wfu.edu/pipermail/gretl-devel/2014-March/004937.html); but that's experimental for now. Handle with care. ------------------------------------------------------- Riccardo (Jack) Lucchetti Dipartimento di Scienze Economiche e Sociali (DiSES) Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucchetti(a)univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti -------------------------------------------------------
