ESTAR Result Analysis

Discussion of models with structural breaks or endogenous switching.
guo
Posts: 23
Joined: Wed Sep 28, 2011 7:43 am

ESTAR Result Analysis

Unread post by guo »

Dear,

Thank you for your precious time and attention.

By applying @startest to TAR model, the result supported ESTAR model.

I got the following results

Code: Select all

Nonlinear Least Squares - Estimation by Gauss-Newton
Convergence in    47 Iterations. Final criterion was  0.0000099 <=  0.0000100
Dependent Variable DLIM_CA_UVP
Monthly Data From 2003:02 To 2010:10
Usable Observations                        90
Degrees of Freedom                         71
Skipped/Missing (from 93)                   3
Centered R^2                        0.3823493
R-Bar^2                             0.2257619
Uncentered R^2                      0.3826579
Mean of Dependent Variable       0.0202328952
Std Error of Dependent Variable  0.9100486108
Standard Error of Estimate       0.8007590807
Sum of Squared Residuals         45.526272474
Regression F(18,71)                    2.4418
Significance Level of F             0.0040804
Log Likelihood                       -97.0361
Durbin-Watson Statistic                2.0203

    Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  PHI1(1)                        0.03582701   0.18263794      0.19616  0.84504209
2.  PHI1(2)                       48.32172401  24.83869727      1.94542  0.05568424
3.  PHI1(3)                      -26.88611407  16.42547093     -1.63685  0.10608606
4.  PHI1(4)                       13.46525574  15.32293549      0.87876  0.38249319
5.  PHI1(5)                       -2.28422959   6.91999407     -0.33009  0.74230300
6.  PHI1(6)                        4.47828477   6.99341036      0.64036  0.52400131
7.  PHI1(7)                        0.93632411   6.60473663      0.14177  0.88766669
8.  PHI1(8)                       -0.63243726   0.12137958     -5.21041  0.00000177
9.  PHI1(9)                       -0.19326097   0.13530089     -1.42838  0.15756719
10. PHI1(10)                      -0.10025404   0.11332316     -0.88467  0.37931873
11. PHI1(11)                       0.00023874   0.00158449      0.15067  0.88065999
12. PHI1(12)                      -0.00200427   0.00169580     -1.18190  0.24118724
13. PHI1(13)                      -0.00129900   0.00173699     -0.74785  0.45702313
14. PHI2(1)                        0.01436400   0.24344109      0.05900  0.95311468
15. PHI2(2)                      -50.55886308  25.92759008     -1.95000  0.05512501
16. PHI2(3)                       25.12088507  20.62218927      1.21815  0.22720018
17. PHI2(4)                      -14.41014344  18.37703166     -0.78414  0.43556699
18. GAMMA                          5.82974026   7.45320937      0.78218  0.43671052
19. C                              0.00181788   0.00106729      1.70327  0.09289062


Here, the results are convergent. GAMMA is not significant. Does this mean GAMMA is 0, so the Transition Function is also 0 in STAR? If so, though PHI(2) is significant here, it should be ignored?

Also, if the results are not convergent, can we regard GAMMA as infinity, so the Transition Function is 1 in STAR?

I am very looking forward to your reply.

Thank you very much.

Best Regards

guo
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: ESTAR Result Analysis

Unread post by TomDoan »

GAMMA is often poorly estimated which may be what you're seeing. However, if that's actually a STAR model (that is, the two branches are autoregressions), your results are suspect since those are very badly behaved autoregressive branches. You have almost no statistically significant regressors, so you probably need to greatly cut back on the size of the branch regressions.
guo
Posts: 23
Joined: Wed Sep 28, 2011 7:43 am

Re: ESTAR Result Analysis

Unread post by guo »

Dear Tom,

Your answer is always so helpful to me :D . Thank you very much :P .
Based on @stats x
I got c and GAMMA.

Here, X represents Z(t-d), dlEX_UVP is the dependent variable.

The independent variable is dlEX_UVP, thus:

Code: Select all

equation standard dlEX_UVP
# constant dlneer{1 to 3} dlppi{1 to 3} dlEX_UVP{1 to 3} c_ipi{1 to 3}

equation transit dlEX_UVP
# constant dlneer{1 to 3}
I want to make sure one thing:

Because gestar is constructed according to X (threshold), not dlEX_UVP:

Code: Select all

frml star dlEX_UVP = phi1f+gestar*phi2f
where,

Code: Select all

compute d=3
stats x
compute scalef=1.0/sqrt(%variance)
nonlin(parmset=starparms) gamma c
*******
frml gestar = 1-exp(-scalef^2*gamma*(x{d}-c)^2)
compute c=%mean,gamma=2.0
Because I separated X and dlEX_UVP in STAR. Is this correct?

By the way, no convergence means GAMMA is infinity, right? Therefore, TAR model?

I am very looking forward to your reply.

Thank you very much for your precious time and attention :D

guo
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: ESTAR Result Analysis

Unread post by TomDoan »

That appears to be set up correctly. It's just looking like your branches have quite a few unnecessary variables---you need to clean those up, particularly with the relatively small data set that you have. Non-convergence doesn't necessarily mean that the optimum for gamma is infinity; it could also mean that there is no real threshold effect so the model is unidentified. Note that ESTAR models can sometimes be "fooled" by outliers, so you want to make sure you're not just picking out one point with the transition function. Doing a scatter graph of the transition variable against the transition function can help with that.
guo
Posts: 23
Joined: Wed Sep 28, 2011 7:43 am

Re: ESTAR Result Analysis

Unread post by guo »

Dear Tom,

I am always very grateful for your kind and useful reply :D .

I found an outlier in X. So I did as follows:

Code: Select all

set offoutlier = -0.02<X<0.02
......
@yulelags(max=10) offoutlier
Then I got the lag for offoutlier is 0.

This means I cannot do the following STAR analysis.

So, if I find the outlier, and how can I exclude it and get proper lagged d and pmax? ( I think mine is wrong).

Thank you very much!

Best Regard

g
Attachments
X scatter graph.xlsx
(16.36 KiB) Downloaded 940 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: ESTAR Result Analysis

Unread post by TomDoan »

That's not going to work at all. I'm not sure what you are intending with

set offoutlier = -0.02<X<0.02

but that will be a series of 0's and 1's depending upon the values of X, and will have very weak connection to the actual values.

At http://www.estima.com/forum/viewtopic.php?f=8&t=1587, I posted an example that does a test for STAR with adjustment for outliers. You might want to try that to see if there really is an ESTAR effect or if you're just picking up an outlier. You also may have to accept the fact that you're trying to force a transition model on a data set that has no clear transition effect.
guo
Posts: 23
Joined: Wed Sep 28, 2011 7:43 am

Re: ESTAR Result Analysis

Unread post by guo »

Dear Tom,

Thank you very much for your very useful replies. I really learned a lot :D .

These days I am concentrating on the outlier in STAR model.

This is the codes I ran:

Code: Select all

open data "D:\Electro New\ESTAR LSTAR to total IM_CO_UVP\IM_CO_UVP dataset used by Rats 2012-8-11.xlsx"
calendar(m) 2003:1
data(format=xlsx,org=columns) 2003:1 2010:10

set lIM_CO_UVP = log(IM_CO_UVP)
set lppi = log(ppi)
set lneer = log(neer)
set lcpi = log(cpi)
set lmc = log(mc)

filter(type=hp,tuning=14400) ipi / trend_ipi
set c_ipi = ipi - trend_ipi

esmooth(seasonal=multiplicative,estimate,$
smoothed=slicp) lIM_CO_UVP
esmooth(seasonal=multiplicative,estimate,$
smoothed=slop) lneer
esmooth(seasonal=multiplicative,estimate,$
smoothed=slcpi) lcpi
esmooth(seasonal=multiplicative,estimate,$
smoothed=slmb) lmc

diff lIM_CO_UVP / dlIM_CO_UVP
diff lppi / dlppi
diff lneer / dlneer
diff lcpi / dlcpi
diff lmc / dlmc

set xc = dlcpi

* Pick contaminated points
*
seed 532343
set outliers = %uniform(0.0,1.0)<.1
set xc = xc + %if(outliers,%ran(2.0),0.0)
*
* Get the weight transition polynomial at the default knots
*
@RobustPoly px
*
* Start with equal weights. Do 10 iterations on weighted least squares
* on the AR model.
*
set weight = 1.0
do iters=1,10
   linreg(weight=weight) xc
   # constant xc{1 to 11}
   compute sigma=sqrt(%seesq)
   set weight %regstart() %regend() = $
      stdu=abs(%resids)/sigma,%if(stdu<2.576,1.0,%if(stdu>3.291,0.0,%polyvalue(px,stdu)/stdu))
end do iters
*
* Apply the STAR test with the chosen weights to the contaminated data.
* Also apply the equally weighted STAR test.
*
@startest(p=11,d=1,weights=weight,title="Outlier-Adjusted STAR Test") xc
@startest(p=11,d=1) xc
However, everytime I run the program to

Code: Select all

@RobustPoly px


Rats will require me to find the
Robuststar.rpf
.

What I am worrying is that if I choose
Robuststar.rpf
, the data I use is no longer the data "IM_CO_UVP dataset used by Rats 2012-8-11.xlsx" I use, but
lynx.dat
.

How can I use
@RobustPoly px
in my analysis? And also what does
px
here mean?

Also, shall I change the codes here in my programming:

Code: Select all

set outliers = %uniform(0.0,1.0)<.1
set xc = xc + %if(outliers,%ran(2.0),0.0)
I am really looking forward to your kind suggestions.

Thank you very much for your precious time.

Best Regards

g
Attachments
lynx.dat
(663 Bytes) Downloaded 1249 times
robuststar.rpf
(1.87 KiB) Downloaded 1256 times
IM_CO_UVP dataset used by Rats 2012-8-11.xlsx
(19.93 KiB) Downloaded 1006 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: ESTAR Result Analysis

Unread post by TomDoan »

I don't think you're understanding the example. I intentionally contaminated a perfectly good set of data to generate an example of the technique. You don't want to do that to your own data.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: ESTAR Result Analysis

Unread post by TomDoan »

How did you pick the form of the two branches in your analysis? The first includes lagged dependent variables, and the second doesn't. That seems very odd. And, given that you aren't starting with a simple AR model, how did you decide that the model requires a threshold effect?
guo
Posts: 23
Joined: Wed Sep 28, 2011 7:43 am

Re: ESTAR Result Analysis

Unread post by guo »

Dear Tom,

Always thank you very much for your kind help.

In ESTAR model, sometimes Gamma is not statistically significant in empirical results,
however, according to the figure in the attachment, it demonstrates that Gamma is not 0.

Please refer to the attachment. Here Theta is the the smoothing equation, and Gamma is the smoothing parameter. C is inflation threshold.

In this case, should I take Gamma as a significant value even though it is not statistically significant in empirical results?

Thank you very much for your precious time.

guo
Attachments
Gamma in ESTAR table&figure.xlsx
(14.37 KiB) Downloaded 903 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: ESTAR Result Analysis

Unread post by TomDoan »

The results don't look unreasonable given the amount of data you have. Gamma is often poorly estimated.
Post Reply