Am 24.04.2018 um 08:27 schrieb Giulio Carlo Venturi:
I am working on inflation time series with Gretl for my econometric thesis.
I have been searching the Internet for a week now trying to find a Gretl
package for Zivot Andrews structural break test without success.
Does anybody know where I might find it?
Hi, I don't think there is one, (it's an old test...) but it is fairly
easy. I give you the following hints how to create the relevant
deterministic terms and perform the test:
series y = TFP # your input variable
k = 4 # lag order
trim = floor(0.1 * $nobs) # 10% trimming
breakdate = $t1 + trim
series DU = (t > breakdate) # level shift
series DTstar = (t < breakdate) ? 0 : t - breakdate # trend segment
series trend = time
ols y const DU trend DTstar y(-1) diff(y(-1 to -k))
tstat = ($coeff(y_1) - 1) / $stderr(y_1)
Now all you have to add is a loop that varies the break date from
$t1+trim to $t2-trim and look for the minimal t-stat. And then of course
use the correct critical values from the literature.
(This is for Model C I think. If you want a different variant, you'd
have to adapt this.)