Kapetanios, Shin and Snell (2003)
Kapetanios, Shin and Snell (2003)
Hello,
I am trying to replicate the sample size and power performance of the t-test in Kapetanios, Shin and Snell (2003) under the alternative of an ESTAR model. Is there a code for this? Also, what changes would I need to make to the code for the power performance of the Dickey-Fuller test under the alternative of AR(1) in order to compute the power under the ESTAR? Essentially, I have difficulties in generating DGP for ESTAR.
Thanks alot!
I am trying to replicate the sample size and power performance of the t-test in Kapetanios, Shin and Snell (2003) under the alternative of an ESTAR model. Is there a code for this? Also, what changes would I need to make to the code for the power performance of the Dickey-Fuller test under the alternative of AR(1) in order to compute the power under the ESTAR? Essentially, I have difficulties in generating DGP for ESTAR.
Thanks alot!
Re: Monte Carlo Simulations: Size and Power of the tests
This will do one of the power calculations. You have to change the N, TCRITICAL (to match N), GAMMA and THETA settings to get a different experiment.
Code: Select all
*
* Kapetanios, Shin and Snell(2003), "Testing for a unit root in the
* nonlinear STAR framework", Journal of Econometrics, vol 112, 359-379.
*
* Power calculations
*
compute ndraws=20000
compute nburn=50
*
compute n=50
compute tcritical=-2.22
*
compute gamma=-0.5
compute theta=1.0
*
compute nend=nburn+n
set y 1 nend = 0.0
set tnl 1 ndraws = 0.0
do draw=1,ndraws
set y 2 nend = y{1}+gamma*y{1}*(1-exp(-theta*y{1}^2))+%ran(1.0)
set ycubed = y{1}^3
set dy = y-y{1}
linreg(noprint) dy nburn+1 nburn+n
# ycubed
compute tnl(draw)=%tstats(1)
end do draw
sstats(mean) 1 ndraws (tnl<tcritical)>>power
disp "Power for N=" n "Gamma=" gamma "Theta=" theta powerRe: Monte Carlo Simulations: Size and Power of the tests
Thank you Tom! The procedure works great!
I am not sure about the line where you say, I need to change TCRITICAL (to match n). I thought there's only one set of critical values?
Also on
I am not sure about the line where you say, I need to change TCRITICAL (to match n). I thought there's only one set of critical values?
Also on
, what does the bracketed (1) mean? If I were to linreg on more than one term for example #ycubed ysquared, would this change %tstat(1) into %tstat(2) ?compute tnl(draw)=%tstats(1)
Re: Monte Carlo Simulations: Size and Power of the tests
You're correct. They only provide one setsofitel_a wrote:Thank you Tom! The procedure works great!
I am not sure about the line where you say, I need to change TCRITICAL (to match n). I thought there's only one set of critical values?
%TSTATS(1) is the t-statistic on the first regressor. I assume that you would want to do a joint test on ycubed and ysquared (which you would do with EXCLUDE), but I'm not sure what that's testing. The KSS test is based upon the assumption that the series shows unit root behavior in a region near zero, but is mean-reverting farther away (in a symmetrical fashion). The combination of the symmetry and the centering at zero reduces the unit root test to a test on the cube. The existence of a squared term in the expansion would mean that the process is explosive in one direction and mean-reverting in the other.sofitel_a wrote:Also on, what does the bracketed (1) mean? If I were to linreg on more than one term for example #ycubed ysquared, would this change %tstat(1) into %tstat(2) ?compute tnl(draw)=%tstats(1)
Re: Monte Carlo Simulations: Size and Power of the tests
Hi,Tom
I find you pasted here part code of "Kapetanios, G., Shin, Y. & Snell, A. 2003. Testing for a unit root in the nonlinear STAR framework.Journal of Econometrics 112: 359-379." , can I get all of the code?In addition, I also very interested in LSTAR unit boot code of"Leybourne, S., Newbold, P. & Vougas, D. 1998. Unit roots and smooth transitions. Journal of Time Series Analysis 19: 83-97." , could you help me?
I find you pasted here part code of "Kapetanios, G., Shin, Y. & Snell, A. 2003. Testing for a unit root in the nonlinear STAR framework.Journal of Econometrics 112: 359-379." , can I get all of the code?In addition, I also very interested in LSTAR unit boot code of"Leybourne, S., Newbold, P. & Vougas, D. 1998. Unit roots and smooth transitions. Journal of Time Series Analysis 19: 83-97." , could you help me?
Re: Monte Carlo Simulations: Size and Power of the tests
The KSS test is done quite simply by regressing dy on y{1}^3 and comparing the t-statistic with the critical values from the paper. Leybourne, Newbold and Vougas is behind a pay wall, but doesn't seem to get used much in practice. Have you looked at Enders-Granger instead?Future wrote:Hi,Tom
I find you pasted here part code of "Kapetanios, G., Shin, Y. & Snell, A. 2003. Testing for a unit root in the nonlinear STAR framework.Journal of Econometrics 112: 359-379." , can I get all of the code?In addition, I also very interested in LSTAR unit boot code of"Leybourne, S., Newbold, P. & Vougas, D. 1998. Unit roots and smooth transitions. Journal of Time Series Analysis 19: 83-97." , could you help me?
Re: Kapetanios, Shin and Snell (2003)
Hello
i would to use the Kapentanios and al. 2003, but in the text that precise that it use the de-meaned data to have the T (NL)? and to compare the value with the critical value correspondante
??
i would to use the Kapentanios and al. 2003, but in the text that precise that it use the de-meaned data to have the T (NL)? and to compare the value with the critical value correspondante
??
Re: Kapetanios, Shin and Snell (2003)
I'm not really sure what you're saying. Yes. You take the mean or trend out of the data, then use the proper column in the lookup table of critical values.
Re: Kapetanios, Shin and Snell (2003)
thank for information
i finally used the original series with the critical value: %
1% -2.82
5% -2.22
10% -1.92
i finally used the original series with the critical value: %
1% -2.82
5% -2.22
10% -1.92
Re: Kapetanios, Shin and Snell (2003)
Hello Mr. Doan,TomDoan wrote: ↑Tue Aug 21, 2012 11:37 am This will do one of the power calculations. You have to change the N, TCRITICAL (to match N), GAMMA and THETA settings to get a different experiment.
Code: Select all
* * Kapetanios, Shin and Snell(2003), "Testing for a unit root in the * nonlinear STAR framework", Journal of Econometrics, vol 112, 359-379. * * Power calculations * compute ndraws=20000 compute nburn=50 * compute n=50 compute tcritical=-2.22 * compute gamma=-0.5 compute theta=1.0 * compute nend=nburn+n set y 1 nend = 0.0 set tnl 1 ndraws = 0.0 do draw=1,ndraws set y 2 nend = y{1}+gamma*y{1}*(1-exp(-theta*y{1}^2))+%ran(1.0) set ycubed = y{1}^3 set dy = y-y{1} linreg(noprint) dy nburn+1 nburn+n # ycubed compute tnl(draw)=%tstats(1) end do draw sstats(mean) 1 ndraws (tnl<tcritical)>>power disp "Power for N=" n "Gamma=" gamma "Theta=" theta power
Could you explain ndraw and nburns and these values, 20000 and 50, are selected emprical or same for all tests?
Re: Kapetanios, Shin and Snell (2003)
Those are probably out of the original paper. NBURN is to give the process (which is started arbitrarily at 0) time to achieve something similar to its stationary distribution. Numbers like 50 and 100 are typical for that; 50 is probably fine. NDRAWS is arbitrary. 20000 is quite a few.
Re: Kapetanios, Shin and Snell (2003)
Thank you for answer Mr. Doan. When Gamma=0 Theta=0 case we could calculate size then?TomDoan wrote: ↑Wed Nov 20, 2024 7:25 am Those are probably out of the original paper. NBURN is to give the process (which is started arbitrarily at 0) time to achieve something similar to its stationary distribution. Numbers like 50 and 100 are typical for that; 50 is probably fine. NDRAWS is arbitrary. 20000 is quite a few.
Re: Kapetanios, Shin and Snell (2003)
That would be used to get the critical values. You pick the size(s) yourself.
Re: Kapetanios, Shin and Snell (2003)
I mean size properties calculations
size properties code could be as follow? or how could I correct the code?
*
* Kapetanios, Shin and Snell(2003), "Testing for a unit root in the
* nonlinear STAR framework", Journal of Econometrics, vol 112, 359-379.
*
* Size properties calculations
*
compute ndraws=20000
compute nburn=50
*
compute n=50
compute tcritical=-2.22
*
compute gamma=0.0
compute theta=0.0
*
compute nend=nburn+n
set y 1 nend = 0.0
set tnl 1 ndraws = 0.0
do draw=1,ndraws
set y 2 nend = y{1}+gamma*y{1}*(1-exp(-theta*y{1}^2))+%ran(1.0)
set ycubed = y{1}^3
set dy = y-y{1}
linreg(noprint) dy nburn+1 nburn+n
# ycubed
compute tnl(draw)=%tstats(1)
end do draw
sstats(mean) 1 ndraws (tnl<tcritical)>>power
disp "Size for N=" n "Gamma=" gamma "Theta=" theta power
Re: Kapetanios, Shin and Snell (2003)
You may be getting confused about terminology. With gamma=theta=0, you are simulating under the null (simple random walk). The tcritical value is what the authors came up with by doing just that, which (if it's the .05 level, which I believe it is) should reject roughly 5% of samples under the null. (That's basically by definition). Size is an attribute under the null---you pick the size you want and determine the critical value; power is an attribute under an alternative (gamma and theta are non-zero)---you use the critical value and see what percentage of samples reject.