I try to use the procedure of Terasvirta for the Smooth model, but the parameters of a nonlinear part, isn't estimate (phie2 =0.000, for all case)
and the code that i adopt is:
Code: Select all
CALENDAR(M) 1995:1
OPEN DATA "C:\Users\LAPTOP\Desktop\RATS\lnTCER.RAT"
DATA(FORMAT=RATS) 1995:01 2012:11 LNTCER_EGYPTE
stat LNTCER_EGYPTE
*
*
GRAPH(STYLE=LINE,HEADER="séries des taux de change éffectif réel_Egypte") 1
# LNTCER_EGYPTE
set y = LNTCER_EGYPTE
set x = y-y{1}
@DFUNIT y
**optimal ordre of AR(p)
* The YuleLags procedure does a quick, efficient examination of a range
* of AR models for stationary data.
@yulelags(max=20) x
*
*
* The tests STAR
*
do d=1,9
@StarTest(p=3,d=d) x
end do d
*
nlpar(exactlinesearch)
stats x
*
compute scalef=1.0/sqrt(%variance)
*compute scalef=1.8
nonlin(parmset=starparms) gamma c
frml flstar = %logistic(1.8*gamma*(y{7}-c),1.0)
compute c=%mean,gamma=2.0
equation standard x
# constant x{1 to 4}
equation transit x
# constant x{1 to 4}
*
* Convert the linear equations into FRML's with phi1 and phi2 as the
*
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
frml star x = f=flstar,phi1f+f*phi2f
*
nonlin(parmset=regparms) phi1 phi2
nonlin(parmset=starparms) gamma c
nlls(parmset=regparms,frml=star) x
*
* Based upon the initial results, the standard equation is trimmed to
* just y{1} and transit to y{2 3 4 10 11} (The article shows lag 9
* rather than 10, but this specification fits quite a bit better). This
* is now estimated with all the parameters.
*
equation standard x
# constant y{1} x{1 to 4}
equation transit x
# constant y{1} x{1 to 4}
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
*
*
* the new estimation, then including the STAR parameters
compute c=%mean,gamma=2.0
nlls(parmset=regparms+starparms,frml=star) x