## SX11. Identifier SEASONS is NOT recognizable. Incorrrect Option Field Parameter Order?
How do I fix this error? Thanks.
Code: Select all
DISPLAY '*******************************************************'
DISPLAY "Asymmetric ERPT in EA"
DISPLAY '*******************************************************'
CALENDAR 1975 1 4
ALLOCATE 2010:4
OPEN DATA
DATA(FORMAT=XLS,ORG=COLS)
PRINT /
*******************************************************'
SET lipc_1 = log(ipc_1)
SET ltc_1 = log(tc_1)
SET lwpx = log(wpx)
SET lpib = log(pib)
*log transformation
*
set dlipc_1 = log(ipc_1) - log(ipc_1 {1})
set dltc_1 = log(tc_1) - log(tc_1 {1})
set dlwpx = log(wpx) - log(wpx {1})
set dlpib = log(pib) - log(pib {1})
*First difference
*
***********************************************
*Unit root tests:
*********************************************
*
@URADF(maxlag=8,sclags=18,det=constant,signif=.05) dlipc_1
@Zivot(maxlag=8,signif=.05,CRIT=AIC,BREAK=intercept) dlipc_1
@LPUnit(maxlag=8,signif=.05,Method=AIC,break=trend) dlipc_1
@URADF(maxlag=8,sclags=18,det=constant,signif=.05) dltc_1
@Zivot(maxlag=8,signif=.05,CRIT=AIC,BREAK=intercept) dltc_1
@LPUnit(maxlag=8,signif=.05,Method=AIC,break=intercept) dltc_1
@URADF(maxlag=8,sclags=18,det=constant,signif=.05) dlwpx
@Zivot(maxlag=8,signif=.05,CRIT=AIC,BREAK=intercept) dlwpx
@LPUnit(maxlag=8,signif=.05,Method=AIC,break=intercept) dlwpx
@URADF(maxlag=8,sclags=18,det=constant,signif=.05) dlpib
@Zivot(maxlag=8,signif=.05,CRIT=AIC,BREAK=intercept) dlpib
@LPUnit(maxlag=8,signif=.05,Method=AIC,break=intercept) dlpib
*
******************************************************
*Cointeration test:
******************************************************
*
LINREG lipc_1 / res
# constant ltc_1 lwpx lpib
*OLS estimation
*
@LAGSELECT(MAXLAG=8,SCLAGS=18,DET=constant,SIGNIF=.05) res
*procedure lagselect on residuals
*
@egtestresids(lags=2) res
*Engle-Granger test
******************
*Gregory-hansen test (level shift):
*****************
*
@GregoryHansen(model=CONSTANT,LAGMETHOD=AIC,MAXLAGS=12,nograph) lipc_1
# constant ltc_1 lwpx lpib
*
******************
*Gregory-hansen test (level and slope shift):
*****************
*
@GregoryHansen(model=REGIMETREND,LAGMETHOD=AIC,MAXLAGS=12,nograph) lipc_1
# constant ltc_1 lwpx lpib
*
****************
*ARDL Model:
*************************
*
LINREG dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*OLS estimation
*
*standard equation is trimmed :
*
LINREG(lwindow=neweywest) dlipc_1
# constant dlipc_1{1 4} dltc_1{0 4} dlwpx{0 2 4} dlpib{1 3 4} seasons{-2 to 0}
*
summarize (%beta(5)+%beta(6)+%beta(7))/(1-(%beta(2)+%beta(3)+%beta(4)))
*
**************
*Tests:
***************
*
stat %resids
*
@RegCorrs(number=4,QSTATS,nograph,report) %resids
*
display "AIC" %aic
*
@mcleodli(number=4) %resids
*
@ARCHTest(lags=4) %resids
*
******
*RESET Tests:
********
*
set resids = %resids
@regreset(h=4) resids
*
*************************************************************************************************
*STR Model
*******************
*
set vtc = log(tc_1) - log(tc_1 {1})
*
stat dltc_1
*
display *.####### %variance
*
display *.####### 1.0/sqrt(%variance)
*
**************************************************************************
*LSTR model:
**************************
nlpar(exactlinesearch)
compute scalef=1.0/sqrt(%variance)
nonlin(parmset=starparms) gamma c
frml glstar = logistic = %logistic(20.46*gamma*(dltc_1{4}-c),1.0)
compute c=%mean,gamma=2.0
*
equation standard dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*
equation transit dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
frml star dlipc_1 = g=glstar,phi1f+g*phi2f
*
nonlin(parmset=regparms) phi1 phi2
nonlin(parmset=starparms) gamma c
*
*
nlls(parmset=regparms,frml=star) dlipc_1
*
* ***********
* Based upon the initial results, the standard equation is trimmed. This is now estimated with
* all the parameters.
*
equation standard dlipc_1
# constant dlipc_1{4} dltc_1{0 2 3} dlwpx{0 1 2} dlpib{0} seasons{-2 to 0}
*
equation transit dlipc_1
# constant dlipc_1{4} dltc_1{0 2 3} dlwpx{0 1 2} dlpib{0} seasons{-2 to 0}
*
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
compute c=%mean,gamma=2.0
*
* We have to re-estimate this since we changed the specification.
*
nlls(parmset=regparms+starparms,frml=star,trace) dlipc_1
*
**************
*Tests:
***************
*
stat %resids
*
*Test d'absence d'autocorrelation residuelles :
*
@RegCorrs(number=4,QSTATS,nograph,report) %resids
*
display "AIC" %aic
*
*Tests d'absence d'effets ARCH :
*
@mcleodli(number=4) %resids
*
@ARCHTest(lags=4) %resids
*
*************************************************************************
*Fonction de transition :
*************************************************************************
*
set cc = %beta(26)
set Seuil = cc(t)
set F_Transition = glstar(t)
set V_Transition = dltc_1{4}
scatter
# V_Transition F_Transition / 10
*
nonlin coef1 coef2 coef3 coef4 coef5 coef6 coef7
compute coef1 = %beta(2)
compute coef2 = %beta(3)
compute coef3 = %beta(4)
compute coef4 = %beta(5)
compute coef5 = %beta(15)
compute coef6 = %beta(16)
compute coef7 = %beta(17)
*
**********************
*ERPT when G=0 :
**********************
*
compte SR = coef2
compte LR = (coef2+coef3+coef4)/(1-(coef1))
*
Display SR LR
*
summarize (%beta(3)+%beta(4)+%beta(5))/(1-(%beta(2)))
*
**********************
*ERPT when G=1 :
**********************
*
compte SR_g = (coef2+coef5)
compte LRg = (coef5+coef6+coef7)/(1-(coef1))
compte LR_g = (coef2+coef3+coef4+coef5+coef6+coef7)/(1-(coef1))
*
display SR_g LRg LR_g
*
summarize (%beta(3)+%beta(4)+%beta(5)+%beta(15)+%beta(16)+%beta(17))/(1-(%beta(2)))
summarize %beta(3)+%beta(15)
*
*
frml pt_sr = coef2+F_Transition*coef5
*
set ERPT_SR = pt_sr
*
frml pt_lr = LR+F_Transition*LRg
*
set ERPT_LR = pt_lr
*
*print / F_Transition ERPT
*
SCATTER(STYLE=DOTS,OVERLAY=DOTS,OVCOUNT=2,pattern,key=below,nokbox) 2
# V_TRANSITION F_TRANSITION
# V_TRANSITION ERPT_SR
*
SCATTER(STYLE=DOTS,OVERLAY=DOTS,OVCOUNT=2,pattern,key=below,nokbox) 2
# V_TRANSITION F_TRANSITION
# V_TRANSITION ERPT_LR
*
GRAPH(STYLE=LINE,OVERLAY=LINE,scale=both,OVCOUNT=1,$
klabel=||"Past Depreciation (Left scale)","Threshold","Short-run ERPT (Right scale)"||,key=below,nokbox,pattern) 3
# V_TRANSITION / 8
# Seuil / 3
# ERPT_SR / 1
*
GRAPH(STYLE=LINE,OVERLAY=LINE,scale=both,OVCOUNT=1,$
klabel=||"Past Depreciation (Left scale)","Threshold","Long-run ERPT (Right scale)"||,key=below,nokbox,pattern) 3
# V_TRANSITION / 8
# Seuil / 3
# ERPT_LR / 1
*
*
*****************************************************************************************************
*ESTR model :
**************************
*
nlpar(exactlinesearch)
compute scalef=1.0/sqrt(%variance)
nonlin(parmset=starparms) gamma c
frml glstar = exponential = 1-exp(-20.46^2*gamma*(dltc_1{4}-c)^2)
compute c=%mean,gamma=2.0
*
equation standard dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*
equation transit dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
frml star dlipc_1 = g=glstar,phi1f+g*phi2f
*
nonlin(parmset=regparms) phi1 phi2
nonlin(parmset=starparms) gamma c
*
*
nlls(parmset=regparms,frml=star) dlipc_1
*
* ***********
* Based upon the initial results, the standard equation is trimmed. This is now estimated with
* all the parameters.
*
equation standard dlipc_1
# constant dlipc_1{4} dltc_1{0 2 3} dlwpx{0 1 2} dlpib{0} seasons{-2 to 0}
*
equation transit dlipc_1
# constant dlipc_1{4} dltc_1{0 2 3} dlwpx{0 1 2} dlpib{0} seasons{-2 to 0}
*
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
compute c=%mean,gamma=2.0
*
* We have to re-estimate this since we changed the specification.
*
nlls(parmset=regparms+starparms,frml=star,trace) dlipc_1
*
**************
*Tests:
***************
*
stat %resids
*
*Test d'absence d'autocorrelation residuelles :
*
@RegCorrs(number=4,QSTATS,nograph,report) %resids
*
display "AIC" %aic
*
*Tests d'absence d'effets ARCH :
*
@mcleodli(number=4) %resids
*
@ARCHTest(lags=4) %resids
*
*************************************************************************
*Fonction de transition :
*************************************************************************
*
set cc = %beta(26)
set Seuil = cc(t)
set F_Transition = glstar(t)
set V_Transition = dltc_1{4}
scatter
# V_Transition F_Transition / 10
*
nonlin coef1 coef2 coef3 coef4 coef5 coef6 coef7
compute coef1 = %beta(2)
compute coef2 = %beta(3)
compute coef3 = %beta(4)
compute coef4 = %beta(5)
compute coef5 = %beta(15)
compute coef6 = %beta(16)
compute coef7 = %beta(17)
*
**********************
*ERPT when G=0 :
**********************
*
compte SR = coef2
compte LR = (coef2+coef3+coef4)/(1-(coef1))
*
Display SR LR
*
summarize (%beta(3)+%beta(4)+%beta(5))/(1-(%beta(2)))
*
**********************
*ERPT when G=1 :
**********************
*
compte SR_g = (coef2+coef5)
compte LRg = (coef5+coef6+coef7)/(1-(coef1))
compte LR_g = (coef2+coef3+coef4+coef5+coef6+coef7)/(1-(coef1))
*
display SR_g LRg LR_g
*
summarize (%beta(3)+%beta(4)+%beta(5)+%beta(15)+%beta(16)+%beta(17))/(1-(%beta(2)))
summarize %beta(3)+%beta(15)
*
*
frml pt_sr = coef2+F_Transition*coef5
*
set ERPT_SR = pt_sr
*
frml pt_lr = LR+F_Transition*LRg
*
set ERPT_LR = pt_lr
*
*print / F_Transition ERPT
*
SCATTER(STYLE=DOTS,OVERLAY=DOTS,OVCOUNT=2,pattern,key=below,nokbox) 2
# V_TRANSITION F_TRANSITION
# V_TRANSITION ERPT_SR
*
SCATTER(STYLE=DOTS,OVERLAY=DOTS,OVCOUNT=2,pattern,key=below,nokbox) 2
# V_TRANSITION F_TRANSITION
# V_TRANSITION ERPT_LR
*
GRAPH(STYLE=LINE,OVERLAY=LINE,scale=both,OVCOUNT=1,$
klabel=||"Past Depreciation (Left scale)","Threshold","Short-run ERPT (Right scale)"||,key=below,nokbox,pattern) 3
# V_TRANSITION / 8
# Seuil / 3
# ERPT_SR / 1
*
GRAPH(STYLE=LINE,OVERLAY=LINE,scale=both,OVCOUNT=1,$
klabel=||"Past Depreciation (Left scale)","Threshold","Long-run ERPT (Right scale)"||,key=below,nokbox,pattern) 3
# V_TRANSITION / 8
# Seuil / 3
# ERPT_LR / 1
*