On Thu, 14 Sep 2017, Sven Schreiber wrote:
Am 14.09.2017 um 19:26 schrieb Allin Cottrell:
> if isscalar(ind)
OK, now let's check the influence of this 'eps' thingy which according
to Ghysels is there for numerical stability AFAIU. (Here k2 == 1.02 so
k2-1 == 0.02, and I'm focusing on the final element in the u vector.)
>> u = 1 - eps
u = 1.00000
>> (1-u) .^ 0.02
ans = 0.48633
>> (1-1) .^ 0.02
ans = 0
Thus if we put in a plain and simple 1, then we get the "blackboard
math" solution 0 for the last lag. If instead we use a fancy/fuzzy
1-eps, this turns into 0.49!
So I'm wondering whether the eps cure isn't worse than the original illness?
I agree with you this far: the role of "eps" in Ghysels' code is not
transparent to me; I'm not sure what the "numerical stability" that
it's said to promote really means here.
However, in relation to your example it appears that maybe it's
designed to prevent abrupt changes in weight at the ends of the lag
range. As you compute the weights they jump from and to zero at the
end-points; as Ghysels computes them the profile is smoother.
Actually meeting the advertised condition of "zero last lag" -- on
Ghysels' method -- requires that the coefficients are progressively
shrinking as we near the maximum lag. And that is achieved only if
theta is substantially greater than theta. (For example,
theta = 1, theta >= 2.)