For some reason I am getting lost with a simple procedure, a grid search over 3 parameters.
My code is simple and goes as follows:
Code: Select all
series t1=gamma+0.1*@trend
series t2=c1+0.1*@trend
series t3=t2
stom(t1,thr1)
stom(t2,thr2)
stom(t3,thr3)
'i=i+1
vector(273) ssr_result
for !u=1 to 273
for !k=1 to 91
for !j=1 to 91
for !i=1 to 91 'this amounts to arrive to 10 in the grid
coef(5) gphi1=phi1_store
coef(5) gphi2=phi2_store
equation grid.ls(showopts) x=gphi1(1)+gphi1(2)*z(-1)+gphi1(3)*y+gphi1(4)*x(-1)+gphi1(5)*y(-1)+(gphi2(1)+gphi2(2)*z(-1)+gphi2(3)*y+gphi2(4)*x(-1)+gphi2(5)*y(-1))*@logit((thr1(!i)/scalef)*(trans+thr2(!j))*(trans+thr3(!k)) )
ssr_result(!u)=@ssr
next
next
next
next
