Am 13.09.2017 um 23:38 schrieb Allin Cottrell:
On Wed, 13 Sep 2017, Sven Schreiber wrote:
> Am 13.09.2017 um 23:01 schrieb Allin Cottrell:
>> My impression is that "sane" values of theta have theta_1 around 1.0
>> and theta_2 > theta_1 -- and that such vectors will respect the "zero
>> last lag" condition.
Hm, yes and no. I have manually coded the
equations 2.10/2.12 in
Ghysels' user guide (version 8), that is the zero-last-lag beta case,
and _sometimes_ (but not always) get different results from gretl's
mweights() function with type==2. For example:
<hansl>
function matrix weightcrosscheck(int N, scalar th1, scalar th2)
matrix w = -1 * ones(N,1)
denom = 0
loop i=1..N --quiet
x = (i-1) / (N-1)
w[i] = x^(th1 - 1) * (1-x)^(th2 - 1)
denom += w[i]
endloop
w = w ./ denom
return w
end function
N = 9
## mismatch:
th1 = 1.01
th2 = 1.02
eval weightcrosscheck(N, th1, th2) # last weight: 0.0000
eval mweights(N, {th1, th2}, 2) # last weight: 0.0608
## a matching case (but not th1 < th2):
th1 = 2
th2 = 1
eval weightcrosscheck(N, th1, th2) # last weight: 0.22
eval mweights(N, {th1, th2}, 2) # last weight: 0.22
</hansl>
> (And BTW, what you report on the weighting/summing in R's
midasr
> sounds weird.)
Yep, it seems strange to me too. But it's definitely the case: the
weights returned by midasr's nbeta() function -- and its analogs for the
other parameterizations -- sum to the length of the vector of
hyperparameters. So typically they are twice the size of those given by
Matlab and gretl.
On second thought this might just be an arbitrary identification choice.
If in gretl Sum == 1 and in midasr SumR == 2 then this just means that
the slope hyperparameter in midasr would be half that of gretl, but the
"gross" polynomial coefficients could still be äquivalent.
cheers,
sven