On Tue, 13 Oct 2015, Sven Schreiber wrote:
Am 13.10.2015 um 19:11 schrieb Allin Cottrell:
> On Tue, 13 Oct 2015, Sven Schreiber wrote:
>
>> Am 29.09.2015 um 14:53 schrieb Sven Schreiber:
>>> Am 29.09.2015 um 13:34 schrieb Sven Schreiber:
>>>
>>>>
>>>> (And BTW, there are only separate tests for each equation, don't we
>>>> have any Portmanteau type of test?)
>>>>
>>>
>>> Ok, the test is there alright in the standard var printout, and it
>>> seems to come from VAR_portmanteau_test (GRETL_VAR *var) in
>>> lib/src/vartest.c, but is there any accessor or function to handle it
>>> from the hansl side?
>>
>>
>> Can I re-raise this point? Or have I missed what was said&done about it?
>
> Yes (to re-raise); no (to having missed anything). I'll try to get to
> this but it wouldn't be a bad idea to file it as a feature request.
ok, i will keep an eye on it
You have it now in git, under the accessor $pmanteau.
It's not yet documented, nor really finalized (I initially coded it
by reference to Johansen's 1995 book but I'll have to look back to
remember the details). Anyway, for now it gives you a 4-vector with
the Ljung-Box statistic, its order, the df, and the p-value against
chi-square(df), where (in pseudo-code):
T = VAR->[number of observations]
LB_order = T/4 <= 48 : T/4 : 48
k = VAR->order + is_vecm(VAR)
g = VAR->[number of equations]
df = g * g * (LB_order - k)
The 4 values in the vector should agree with what's printed in the
VAR output (only minimally tested).
Allin