hi,
I am modelling real exchange rates for developing countries and to do that i am using Terasvirta's ESTAR models. Well, yes there exists a zipped folder that replicates terasvirta's 1994 results however the examples that are mentioned in the file are about LSTAR models. Neverthless when i ran the sample code for one of the files lynx.prg provided in the zippped folder ( data was also provided by the zipped folder) i didnt get the results as they are in the TERASVIRTA'S 1994 paper. Here is the code:
OPEN DATA "h:\settings\Personal\LYNX.xls"
CALENDAR(M) 1973
ALL 1982:04
DATA(FORMAT=XLS,ORG=COLUMNS) 1973:01 1982:04 lynx
set x = log(lynx)/log(10)
diff(center) x /xc
source startest.src
do d=1,9
@StarTest(p=11,d=d) xc
end do d
stats x
compute scalef=1.0/sqrt(%variance)
nonlin(parmset=starparms) gamma c
frml flstar = %logistic(1.8*gamma*(x{3}-c),1.0)
compute c=%mean,gamma=2.0
equation standard x
# constant x{1 to 11}
equation transit x
# constant x{1 to 11}
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
frml star lynx = f=flstar,phi1f+f*phi2f
nonlin(parmset=regparms) phi1 phi2
nonlin(parmset=starparms) gamma c
nlls(parmset=regparms,frml=star) x
equation standard x
# x{1}
equation transit x
# x{2 3 4 10 11}
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
nlls(parmset=regparms,frml=star) x
nlls(parmset=regparms+starparms,frml=star) x
stats %resids
I had the following queries:
1. i wasnt able to understand the underlined part of the code.
2. what all changes i need to make to run a code for a ESTAR model given i have done the linearity tests and my delay parameter (d)=1 and lags (p) =1.
3. Also why have the starting values for gamma taken as 2.
thank you
kumar somya
