Thank you for your replies Roccardo, Sven and Allin! You were right Riccardo, the syntax in Gauss is just the other way around.
I've got another issue with the "loop for" command. I attached a part of the code. The three loops do not seem to work for some reason. If I run the same procedure line by line everything works fine. I use gretl cvs (2010-10-04) on WinXP. --------------------------------------------------------------- scalar p = 4 scalar q = 4 scalar l = maxc(p|q) scalar h = 60 scalar k = 3 /****************************************************************************** Estimates *******************************************************************************/ a = -0.055581 matrix b = { -0.095324 ; -0.095324 ; 0.13404} b = b' matrix varphi = { -0.27069 ; -0.01546 ; 0.2192 ; -0.04216 } varphi = varphi' matrix vpi = { -0.46627 ; 0.088921 ; 0.12036 ; 0.15333 ; -0.02255 ; -0.46627 ; \ 0.088921 ; 0.12036 ; 0.15333 ; -0.022546 ; 0.70411 ; 0.23645 ; 0.22876 ; -0.8828 ; \ 0.02144 } vpi = mshape(vpi, p, k) #Loops: vphi = zeros(1,l) vphi[1] = 1 + a + varphi[1] loop for (i=2; i=l-1; i+=1) #This loop does not work vphi[i] = varphi[i] - varphi[i-1] endloop vphi[l] = -varphi[l-1] mtheta = zeros(l+1,k) mtheta[1,] = vpi[1,] mtheta[2,] = vpi[2,] - vpi[1,] + b loop for (i=3; i=l; i+=1) #This loop does not work mtheta[i,] = vpi[i,] - vpi[i-1,] endloop mtheta[l+1,] = -vpi[l,] mpsi = zeros(h,k) mpsi[1,] = mtheta[1,] loop for (i=1; i=l; i+=1) #This loop does not work mpsi[1+i,] = vphi[1:i]*mreverse(mpsi[1:i,]) + mtheta[i+1,] endloop ------------------------------------------------------------------------- Cheers, Artur 2010/11/4 Riccardo (Jack) Lucchetti <r.lucchetti(a)univpm.it>: > On Thu, 4 Nov 2010, artur tarassow wrote: > >> Dear Sven and Allin, >> >> Thanks for the reply. I am not sure whether I understood your comments >> correctly. >> >> Let me post some more stuff of the code: > > [...[ >> >> mpsi[1+i,] = vphi[1:i]*mpsi[i:1,] + mtheta[1+i,] > > The problem here seems to be that "mpsi[i:1,]" is not legal in gretl if i>1. > In gauss, "x[4:2]" is equivalent to "mreverse(x[2:4])" in gretl. > > > Riccardo (Jack) Lucchetti > Dipartimento di Economia > Università Politecnica delle Marche > > r.lucchetti(a)univpm.it > http://www.econ.univpm.it/lucchetti > _______________________________________________ > Gretl-users mailing list > Gretl-users(a)lists.wfu.edu > http://lists.wfu.edu/mailman/listinfo/gretl-users >