Another question. I modified the code in order to obtain a multiple regimes model (4 regimes, generated through a complex combination of 3 different threshold equations). The estimation of the model works well, but I'm having trouble with the impulse response functions. Depending how I write this section, the program either crashes (if a use * as a condition separator in the %if function), or the IRF's are equal across regimes (if I use +).
Code: Select all
do i=1,nvar
frml tvarf(i) depvars(i) = %if((thrfrml1{d}>=thresh1)*(thrfrml2{d}<thresh2)*(thrfrml3{d}>=thresh3),$
fitud(&i,1)+%dot(%xrow(smup,&i),bootres),$
%if((thrfrml1{d}>=thresh1)*(thrfrml2{d}<thresh2)*(thrfrml3{d}<thresh3),$
fitud(&i,2)+%dot(%xrow(smdn,&i),bootres),$
%if((thrfrml1{d}<thresh1),$
fitud(&i,3)+%dot(%xrow(sdn,&i),bootres),$
fitud(&i,4)+%dot(%xrow(sup,&i),bootres))))
end do iCode: Select all
set d1 = (thrfrml1{d}<thresh1)+2*(((thrfrml1{d}>=thresh1)*(thrfrml2{d}<thresh2))*(thrfrml3{d}<thresh3))+3*(((thrfrml1{d}>=thresh1)*(thrfrml2{d}<thresh2))*(thrfrml3{d}>=thresh3))Juan