Hello,
i have tried to re-consturct gretl's calculation code for the local whittle estimation
via the mle-command and i am getting very often the failure:
---
Using numerical derivatives
Tolerance = 1.81899e-012
failed to invert OPG matrix GG'
---
Has anyone an idea how i can solve the problem or avoid it? The last value before the
failure for d in log-likelihood function is normally ok...but how can i avoid gretl
stopping the optimization?
My code is this:
------------
#getting a series y
series e=normal()
series y=fracdiff(e,-1)
#defining bandwith m
scalar m=ceil($nobs^(0.6))
#getting the periodogram
Y={y}
F=fft(Y)
S=sumr(F.^2)
S = S[2:(m)+1]/($nobs/2)
omega=seq(1,(m))'.*(2*pi / $nobs)
#defining starting values
scalar d=-1.0
scalar z=8.0
mle ll = ln((h + r))*(-1)
matrix t=z*(omega).^(-2*d)
matrix lt=ln(t)
matrix iota=ones(m,1)
matrix st=S*transp(t.^(-1))
matrix std=diag(st)
series h = transp(iota)*lt
series r = transp(iota)*std
params d z
end mle
------------
Thank you so much in advance!
Kindest regards
_________________________________________________________________
http://redirect.gimas.net/?n=M1003xHotmail2
Alles in einem Postfach – Ich will Hotmail!